You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__What steps will reproduce the problem?__
1. Start memcached with a big memory limit (e.g. -m 1024)
2. Populate this memcached instance with a rate of 1 MB per second, where
each item has a validity timeout of 16 seconds. Use random strings or
numbers as keys.
__What is the expected output?__
It is expected that the memory allocated by memcached is about 16 MB (+some
overhead), because after filling memcached with 16MB worth of data, the
items start to become invalid, thus, the rate of items becoming invalid is
the same as the rate of new items. Thus, the amount of memory needed
remains rougly 16MB.
__What do you see instead?__
The memory allocated by memcached increases, until reaching a limit at
around 1024MB. Thus, memcached consumes much more memory than needed.
Memcached should be conservative with memory, and free old (invalid) items
first before requesting new memory from the operating system.
__What version of the product are you using? On what operating system?__
memcached 1.2.2 on Linux 2.6.18-6-amd64
__Please provide any additional information below.__
Original issue reported on code.google.com by xuan--20...@baldauf.org on 6 Feb 2009 at 10:48
The text was updated successfully, but these errors were encountered:
Personally I would not call this a bug, but more an enhancement request (You
specified that memcached could use 1GB memory and it does not use more than 1GB
memory..)
By trying to reclaim expired items before we try to allocate new memory we will
not
grab the mutex protecting the slab allocator.
I have created a patch at:
http://github.com/trondn/memcached/commit/83da85eca91c3dd9777f1479e7d5b1c30156db
fb
Original comment by trond.no...@gmail.com on 17 Mar 2009 at 11:46
Original issue reported on code.google.com by
xuan--20...@baldauf.org
on 6 Feb 2009 at 10:48The text was updated successfully, but these errors were encountered: