Re: Tuning memcached on ubuntu x86_64 (2.6.35)
Is it normal to have a 16 percent virtual memory overhead in memcached on x86_64 linux? memcached STAT bytes is reporting 3219 megabytes of data, but virtual memory is 16 percent higher at 3834. Resident memory is 14 percent higher at 3763 megabytes. Is there a way to tune linux/memcached to get memcached to consume less virtual memory? Are you using some bizarre VM system where virtual memory actually matters? I can start up apps with terabytes of VM allocated just fine. The overhead in RSS is normal. you lose some memory to buffers, pointers, the hash table structure, etc.
Re: Tuning memcached on ubuntu x86_64 (2.6.35)
On 21. juli 2011, at 19.16, dormando wrote: Is it normal to have a 16 percent virtual memory overhead in memcached on x86_64 linux? memcached STAT bytes is reporting 3219 megabytes of data, but virtual memory is 16 percent higher at 3834. Resident memory is 14 percent higher at 3763 megabytes. Is there a way to tune linux/memcached to get memcached to consume less virtual memory? Are you using some bizarre VM system where virtual memory actually matters? I can start up apps with terabytes of VM allocated just fine. The overhead in RSS is normal. you lose some memory to buffers, pointers, the hash table structure, etc. Are you running out of virtual memory ;) Please note that you may also tune the slab classes if your object size doesn't match the default slabclasses causing a poor memory utilization... Trond
Re: Tuning memcached on ubuntu x86_64 (2.6.35)
On Jul 21, 1:41 pm, Trond Norbye trond.nor...@gmail.com wrote: Are you running out of virtual memory ;) Well, the problem is that memcached will use swap, when it runs out of resident memory. When swap space fills up, memcached will crash under load. Yesterday, I had the -m option set to 3700 (or 3700 megabtyes), since I have a 4GB system. But, I started getting evictions when the dataset reached the size of 3219.9 megabytes. As I mentioned above, I started getting evictions at 3763 megabytes of RSS and 3834 megabytes of VSZ. Is the -m option the size of the dataset or is it the size of resident memory? Today, I increased the -m option to 8000 (or 8000 megabytes) to see what would happen. I only have 3954 megabytes total memory in the system. Now, memcached is filling up the swap space. I assume that I will start getting evictions when the virtual memory is full. It seems to me that I should avoid touching the swap space, since memcached can become unstable when using swap space. But, last week, I got into trouble because I set the -m option close to the total available memory on the system, and I guess that I had the value set too high, since the swap space filled up and memcached crashed. Today, I am trying to duplicate the issue that I saw last week. David