first time user with out of memory question

Janning Vygen vygen at planwerk6.de
Mon Jun 12 08:59:03 UTC 2006


Am Montag, 12. Juni 2006 10:42 schrieb Garth Webb:
> On Mon, 2006-06-12 at 09:48 +0200, Janning Vygen wrote:
> > Am Sonntag, 11. Juni 2006 15:24 schrieb Ivan Krstic:
> > > Janning Vygen wrote:
> > > > and stats slab produced "out of memory" message, too. At this time it
> > > > was impossible for many users to login to our web application.
> > >
> > > If memcached failure means your users can't log in, then you're using
> > > it incorrectly.
> >
> > Why? You could say same thing about disks: If disk failures mean your
> > users cant login, then you're using disk incorrectly.
>
> There's an important difference here; if something disappears from your
> disk, its a failure.  If something disappears from your cache, then it
> was probably pushed out, or the cache was cleared, or the cache was
> turned off, etc, etc.

it would be fine if data disappears. But memcached should not send "out of 
memory" when i try to set a value. It should push out older data. so i argue 
that disapearing data is ok in case of a memory cache, but i should always be 
able to save data in any case.

> The point here is that a cache under normal conditions is non-permanent,
> non-guaranteed storage with many possible ways data can disappear.
> Under normal conditions, disk must be permanent and guaranteed.  Memory
> under normal conditions must be guaranteed, and permanent while the
> power is on.
>
> If you rely on memcached to store something permanently, then you risk
> data loss under normal, non-error conditions.  This is why it is not a
> good design to rely on a caching system as the only place data is
> stored.  Any system using a cache must have permanent canonical storage
> for that data.

I dont rsik any data loss. the user ist just logged out. Thats ok for me as 
the oldest (session) record is normally not needed anymore.

> In the case of session management, memcached will make access to your
> session data faster by eliminating the need to query the disk or the DB
> on every request after the session is initially created.  However, if
> the cache experiences a miss or is down, the session management should
> fall back to disk or DB automatically.

Yes your are right, and i am searching quite a while for a good solution for 
php session management. And i thought memcached was the best solution but 
maybe i have to search for something different, but as fast and distributable 
as memcached.

Janning


More information about the memcached mailing list