Re: Re: shared memory on php servers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/12/4 Stuart Dallas <stuart@xxxxxxxx>

> On 4 Dec 2012, at 10:51, rene7705 <rene7705@xxxxxxxxx> wrote:
>
> > I would also like to hear any thoughts on how to efficiently add,
> > delete and edit data in this large and deep array structure from
> > multiple sessions at nearly the same time..
> >
> > On Tue, Dec 4, 2012 at 11:49 AM, rene7705 <rene7705@xxxxxxxxx> wrote:
> >> Hi folks..
> >>
> >> I'm wondering, what's the fastest way to put a large and deep array()
> >> structure in shared memory on a PHP server?
>
> Split the data up into smaller pieces. There's rarely a valid reason to
> store a huge array of data as a single blob. It's an array, so it breaks up
> by the first level of keys at the very least.
>
> Look at APC, memcached, and redis. These are the most popular ways to
> store data in shared memory. Note that APC is a PHP extension so you can
> only access the shared memory from one machine, whereas memcached and redis
> are separate daemons so you can access them from multiple servers.
>
> Also, as Sebastian says, a database is another option unless you have a
> good reason to want the data in shared memory rather than a DB.
>

Beside that you can have Databases in memory too, like SQLite on a
tmpfs-mount, or a specialized memory-persistent database engine :)


>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
github.com/KingCrunch

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux