OpenVZ Forum


Home » General » Discussions » Memory & SWAP
Re: Memory & SWAP [message #9800 is a reply to message #9794] Tue, 23 January 2007 09:17 Go to previous messageGo to previous message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
When you fork your new task inherits all memory from its parent. Thus if your task has allocated 128M of private anonymous mappings and forks new system can potentially eat 256M of memory - if this exceeds privvmpages we don't allow forking.

SWAP isn't limited now - it's just accounted into oomguarpages. When system becomes low of memory it starts to oom kill tasks taking oomguarpages into account.

When VE eats all provvmpages no swapout starts - only when the whole system runs out of mem.

Also note, that freeing memory consists of 3 stages:
1. shrink kernel caches
2. sysncing file caches to disk
3. swapping anonymous pages out

so if kernel caches were shrinked no user pages go away.


http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: disk space usage
Next Topic: Any news on a new kernel branch?
Goto Forum:
  


Current Time: Wed Jun 25 13:44:28 GMT 2025

Total time taken to generate the page: 0.03182 seconds