OpenVZ Forum


Home » General » Support » RHEL6 kernel and cache/free memory
RHEL6 kernel and cache/free memory [message #43457] Tue, 13 September 2011 00:16 Go to next message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

After upgrading kernel from debian 2.6.32-openvz-amd64 to RHEL6 Linux thor 2.6.32-042stab035.1, i have problem with free memory.
It almost never (literally, never) goes below 9GB.
So as cache almost never goes over 7GB.

vmstat:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
7 1 0 9446020 813240 7463328 0 0 713 452 109 23 14 5 60 20


Are there any significant changes in memory commitment in rhel6?
Maybe some kind of reserve for guest nodes?

p.s. server has 24GB of RAM, and it has plenty of stuff to cache Smile
Re: RHEL6 kernel and cache/free memory [message #43520 is a reply to message #43457] Sun, 18 September 2011 15:10 Go to previous messageGo to next message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

Bump.

Atm i see that page cache isnt working inside containers only.
VE0 caching is ok, but in containers only 200-300MB is used for cache.

And server still has around 10GB of free memory.

[Updated on: Sun, 18 September 2011 15:12]

Report message to a moderator

Re: RHEL6 kernel and cache/free memory [message #43535 is a reply to message #43520] Mon, 19 September 2011 19:16 Go to previous messageGo to next message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
raver119 wrote on Sun, 18 September 2011 11:10
Bump.

Atm i see that page cache isnt working inside containers only.
VE0 caching is ok, but in containers only 200-300MB is used for cache.

And server still has around 10GB of free memory.


Are you using new memory config files inside containers? You cannot use old Beancounter oriented RHEL5 config files for RHEL6 nodes. At least that is what I have found. You must use new config files that are designed for new memory management technique.

Files are located in /etc/sysconfig/vz-scripts on the Node. You should have sample conf files such as ve-vswap-512m.conf-sample. You need to use those for container configuration on RHEL6 nodes. If you use the old beancounter oriented config files such as ve-vps.basic.conf-sample on RHEL6 nodes then wierd things happen. At least that is what I have found.

Also, do you understand how memory caching works? It will try take advantage of all available memory by gradually filling up over time as the system is used. Do not confuse that with unavailable memory. All cached memory is available to the system if it needs it so it is the same as free memory in that respect.

With RHEL6 cached memory now happens (visually) inside the container as well. Not sure if the Node treats it any differently or if it just makes it visible inside the container now. I could not find any documentation on that. Only documentation I found is on vswap which I guess is related to the new memory management technique but is not required. I currently just set vswap to 0.

[Updated on: Mon, 19 September 2011 19:26]

Report message to a moderator

Re: RHEL6 kernel and cache/free memory [message #43540 is a reply to message #43535] Mon, 19 September 2011 19:32 Go to previous messageGo to next message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

mustardman wrote on Mon, 19 September 2011 15:16

First of all, are you using new memory config files inside containers? You cannot use old RHEL5 config files for RHEL6 nodes. At least that is what I have found. You must use new config files that are designed for new memory management technique.

Files are located in /etc/sysconfig/vz-scripts on the Node. You should have sample conf files called ve-vswap-512m.conf-sample. You need to use those. If you use the old beancounter oriented config files such as ve-vps.basic.conf-sample on RHEL6 nodes then wierd things happen. At least that is what I have found.

Yea, after upgrading to RHEL6 i've updated configs to VSwap.

mustardman wrote on Mon, 19 September 2011 15:16

Also, do you understand how memory caching works? It will try take advantage of all available memory by gradually filling up over time as the system is used. Do not confuse that with unavailable memory. All cached memory is available to the system if it needs it so it is the same as free memory.

The system is just using it as temporary storage until such time as the data is requested again or it needs to allocate it for new use.

Yea, i do understand. And the problem is that memory is used as cache but it goes free within 1-2 minutes, without any visible reason. And this results in low cache usage.

I've filled bug at bugzilla with some additional info: bugzilla.openvz.org/show_bug.cgi?id=1985

[Updated on: Mon, 19 September 2011 19:33]

Report message to a moderator

Re: RHEL6 kernel and cache/free memory [message #43543 is a reply to message #43540] Mon, 19 September 2011 21:05 Go to previous messageGo to next message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
Are you doing anything on the containers? Cached memory is visible on containers now. I haven't noticed anything like that but I am not using those older Kernels. I believe there were some problems with that kernel you are using. Kernel panics.
Re: RHEL6 kernel and cache/free memory [message #43544 is a reply to message #43457] Mon, 19 September 2011 21:16 Go to previous messageGo to next message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

Yep, sure i do almost everything in containers. 1500 IOPS is average disk activity only for files in CTs, so there's alot of things to cache.

However i'm gonna fallback to RHEL5 today.
Re: RHEL6 kernel and cache/free memory [message #43576 is a reply to message #43457] Wed, 28 September 2011 06:12 Go to previous messageGo to next message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

Well, as i see, RHEL5 kernel has no issues with cache:

Mem: 24625128k total, 24134024k used, 491104k free, 433044k buffers
Swap: 24073208k total, 0k used, 24073208k free, 14136992k cached


So, it's definitely RHEL6-OpenVZ kernel issue - just boot into another kernel, and problem "is gone".

[Updated on: Wed, 28 September 2011 06:14]

Report message to a moderator

Re: RHEL6 kernel and cache/free memory [message #43582 is a reply to message #43576] Wed, 28 September 2011 15:51 Go to previous messageGo to next message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
raver119 wrote on Wed, 28 September 2011 02:12
Well, as i see, RHEL5 kernel has no issues with cache:

Mem: 24625128k total, 24134024k used, 491104k free, 433044k buffers
Swap: 24073208k total, 0k used, 24073208k free, 14136992k cached


So, it's definitely RHEL6-OpenVZ kernel issue - just boot into another kernel, and problem "is gone".


Did you file a bug report? The kernel guys really seem to be on top of this stuff and fix it quite quickly.
http://bugzilla.openvz.org/
Re: RHEL6 kernel and cache/free memory [message #43583 is a reply to message #43582] Wed, 28 September 2011 15:53 Go to previous message
raver119 is currently offline  raver119
Messages: 18
Registered: September 2011
Location: Ukraine
Junior Member

mustardman wrote on Wed, 28 September 2011 11:51
raver119 wrote on Wed, 28 September 2011 02:12
Well, as i see, RHEL5 kernel has no issues with cache:

Mem: 24625128k total, 24134024k used, 491104k free, 433044k buffers
Swap: 24073208k total, 0k used, 24073208k free, 14136992k cached


So, it's definitely RHEL6-OpenVZ kernel issue - just boot into another kernel, and problem "is gone".


Did you file a bug report? The kernel guys really seem to be on top of this stuff and fix it quite quickly.
http://bugzilla.openvz.org/


Three posts above, i've posted a link to bugreport Smile
Previous Topic: centos 6 network scripts
Next Topic: Guide about choose RHEL
Goto Forum:
  


Current Time: Sun Nov 17 17:35:02 GMT 2024

Total time taken to generate the page: 0.03355 seconds