New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Memory issues on OpenVZ + Ubuntu + burst memory
Hi, I'm getting some big problems with memory on a VPS with 1024 MB burst memory but 512 MB guaranteed. Most of the RAM is being taken up by cached memory, and it seems like the OS thinks it has enough RAM so it doesn't clear this cached memory; but then, when it has to do something like fork for an operation, it fails because there's not enough RAM.
I was wondering how to configure the cached memory behavior (setting a limit on it or something) in /etc/sysctl.conf; I found some things from DuckDuckGo but they weren't very clear.
Comments
A fork error might stem from your container's UBC limits.
Sure, was I not clear in OP?
The memory is taken by cached memory and the burstable memory appears to be inavailable, so it's failing to fork. What I was asking is how to limit cached memory WITHOUT removing it completely or clearing it every fifteen minutes.
Oh I read it, don't worry.
As for your actual question though, you cannot limit the memory used for caching in a practical manner.
linuxatemyram.com
If that is not the case, check if you have the ram available on the host node.
Is there any other way to resolve the conflict between guaranteed RAM / burst RAM then? I mean there's lots of settings that are related to it, but I don't know which ones to use.
Most of this doesn't seem to apply here, because the problem here is that the VM doesn't realize it can't use any more RAM even though it has 1024 MB believed to be available; but in other situations there's no point to have free RAM.
Well that's the problem, RAM isn't available on the host node. I have 512 MB guaranteed RAM, 1024 MB burst RAM, and the VPS is using 540 MB and becomes unusable.
This is on OneAsiaHost BTW, but I think my BuyVM has similar issues sometimes, although never as severe because host node I guess usually has enough RAM for BuyVM.
The VPS shouldn't use the burst memory for cache. It is designed that way.
Also the VPS should use the memory that is deemed to your instance before using the burst as well.
$ free -m total used free shared buffers cached Mem: 1024 547 476 0 0 404 -/+ buffers/cache: 143 880 Swap: 0 0 0
That looks normal? Where do you see this issue?
Everywhere.
$ apt-get upgrade Segmentation faultsts... 0%
$ apt-get update ... Reading package lists... Done FATAL -> Failed to fork.
More importantly, PHP says failed to fork in web application.
It seems like maybe there is an issue on the host node.
Have you tried restarting the server?
Have you put a ticket in?
I have seen this from multiple people using the Ubuntu distro for openvz
Move to debian
There are some issues with burst ram, but may also be a misconfiguration, even tho knowing OAH I doubt it. Perhaps the node did run out of memory ?
Well so far they said that RSS is useless on OpenVZ and only VIRT matters... which is the exact opposite of what would be true on any normal system without the conflict between burst memory / actual memory.
They specifically mentioned one process using 1.3 GB of virtual RAM, yet Apache and MySQL are each using 570 MB so I don't see why that'd be a problem. And a lightweight C++ application is using another 500 MB. They seem to be suggesting that I shouldn't run anything on their servers...
This is the quiet common resultant.
There is plenty of other providers.
Bluevm
@maounique
Catalyst @jarland
Ramnode
Buyvm
etc.
Not sure I see your point. I have VPS with RamNode, BuyVM, Prometeus, lots of others and have never had this issue (well actually a bit with BuyVM, but nothing that caused fail to fork and huge problems). I'm running the same software.
Or, if you're saying that there are others to choose from, none of those host in Asia.
Based on the above trials and errors, I can only recommend questioning the HW node's memory usage.
Who do you have in Asia, if I may ask? (might be an idea to get linode in Japan, though they are expensive they are heavily reliable.)
I thought I said, OneAsiaHost.
Edit: they removed my burst memory per my request, I'll see if there are still issues.
Edit2: yep, my issue is resolved I think. Still wondering how people manage to use VPS that have burst memory though, it seems like a big hassle.
woops see that now.
I know you need asia, but is there a more defined spot you are aiming for?
Well, I wasn't really asking about providers, just asking about the memory problems and how to work with burst memory. After removing burst memory it seems to be working quite nicely.
I can fully put my money on the host node is out of memory.
And out of swap too? Because that's what counts. And i sincerely doubt it.
Also another thing I'm still wondering is about the comment that RES is pretty useless in OpenVZ, and that VIRT is what matters. (http://www.lowendtalk.com/discussion/comment/260556#Comment_260556)
I dont know whats with openVZ and Burst memory. I had 1 gb guranteed ram and 1.5 Gb burstable ram.
I ran simple wordpress and some other stuff , the ram usage was 800 mb or so , sometimes even more then 1 gb. Then i requested the host to change it to vswap ( the tech guy gave me exteremly stupid answer , different story). After that , memory is always around 300 to 450 mb with 20-30 mb vswap usage sometimes.
I wonder why i was using 800+mb with burstable ram , and 350 - 450 mb with vswap. never understood , but i think i will always prefer vswap with openvz now.
Was this also on OneAsiaHost, or different provider? Just curious.
Also found this: http://www.lowendbox.com/blog/why-i-dont-like-openvz-vps-plans-with-large-burstable-memory/
@perennate so cat /proc/user_beancounters and tell us on which lines you have "failcnt" more than zero. Failcnt is the last (5th) column.