Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Memory issues on OpenVZ + Ubuntu + burst memory - Page 2
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.

Memory issues on OpenVZ + Ubuntu + burst memory

2

Comments

  • perennateperennate Member, Host Rep
    edited April 2013

    Well, the burst memory is disabled already.

    cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit failcnt X: kmemsize 19105488 41865216 9223372036854775807 9223372036854775807 0 lockedpages 0 16 9223372036854775807 9223372036854775807 0 privvmpages 260191 280211 9223372036854775807 9223372036854775807 115 shmpages 945 959 9223372036854775807 9223372036854775807 0 dummy 0 0 0 0 0 numproc 97 162 9223372036854775807 9223372036854775807 0 physpages 95235 262134 0 131072 0 vmguarpages 0 0 9223372036854775807 9223372036854775807 0 oomguarpages 41311 41311 9223372036854775807 9223372036854775807 0 numtcpsock 35 39 9223372036854775807 9223372036854775807 0 numflock 10 18 9223372036854775807 9223372036854775807 0 numpty 2 3 9223372036854775807 9223372036854775807 0 numsiginfo 0 36 999999 999999 0 tcpsndbuf 669392 824304 9223372036854775807 9223372036854775807 0 tcprcvbuf 573440 2609408 9223372036854775807 9223372036854775807 0 othersockbuf 84768 2417256 9223372036854775807 9223372036854775807 0 dgramrcvbuf 0 25760 9223372036854775807 9223372036854775807 0 numothersock 92 98 9223372036854775807 9223372036854775807 0 dcachesize 8078719 30369812 2147483646 2147483646 0 numfile 929 1140 9223372036854775807 9223372036854775807 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 28 28 999999 999999 0

  • So it did fail only on privvmpages, which is the total amount of RAM (here called guaranteed+burstable).
    I blame java. It's a horrible cludge.

  • Need a Ubuntu minimal

  • jarjar Patron Provider, Top Host, Veteran
    edited April 2013

    @rds100 said: I blame java

    Yeah, vSwap would be more appropriate for normal java performance. That or just far more RAM allotted than actually necessary. OpenVZ is going through some growing pains still. It remains that vSwap seems unstable on high capacity nodes, and some things simply work more "as expected" with vSwap. I'd like to see that first one change in the near future.

  • yomeroyomero Member
    edited April 2013

    Ubuntu.... yiak!

    Ontopic, your "free" output seems normal, but dunno, maybe if you are using java stuff, better to get another server with a RHEL6 kernel.

  • I was having this issue on a vps with 64mb ram. Moved to debian and it works beautifully.

  • perennateperennate Member, Host Rep
    edited April 2013

    @yomero said: Ontopic, your "free" output seems normal

    Problem is that the VPS only has 512 MB guaranteed RAM though.

  • The problem actually seems to be that ubuntu is a memory fricken hog.

  • MaouniqueMaounique Host Rep, Veteran
    edited April 2013

    vSwap for the win !
    I prefer the server reboot once in a while than my app crashing every day.
    On Java, unless very small app, you have to use .32 if you wish for an (almost) predictable behaviour.

  • perennateperennate Member, Host Rep
    edited April 2013

    @Maounique said: On Java, unless very small app, you have to use .32 if you wish for an (almost) predictable behaviour.

    Seems to work fine without burst. Also it is pretty small, it works with -Xmx70m.

  • Going from support tickets, I can firmly say that 12.x and newer Ubuntu installs are the cause of most OS specific support ticket issues.

  • perennateperennate Member, Host Rep
    edited April 2013

    Well, now I can't seem to use more than 300 MB, the command earlier now shows:

    privvmpages 130315 131072 131072 131072 72641

    Does that indicate the host node is out of memory? All of the other rows are 0 for the last column.

    Edit: context of this is now I'm only using 300 MB of 512 MB guaranteed RAM (no burst RAM anymore), yet already processes are starting to say out of memory. Java isn't running, both Java and apt-get update run out of memory when I try to execute them.

  • MunMun Member

    Move to a new host, or request a transfer to a new node.

  • perennateperennate Member, Host Rep

    If the issues persist then I probably will (or maybe switch to KVM), but I do want to know if the problem is with the host node or just with Ubuntu/Java. Because if it's with the host node then I'm switching away from them because they don't seem to have realized they have a problem for 24 hours, but if it's with Ubuntu/Java then it's not their fault I guess.

  • MunMun Member

    Do you have to use Ubuntu? How about swapping to Debian?

  • perennateperennate Member, Host Rep
    edited April 2013

    So the problem is definitely just with Ubuntu and not with the VPS? They said the host node has lots of memory still. And this statement is correct?

    OneAsiaHost: Memory calculation is always by VSZ, for a very simple reason. Your process requested for so much memory in reserve, and the OS grants you the memory. While the process doesn't use 100% of the memory, the memory IS reserved for the process and the process can use it anytime. OpenVZ has to calculate based on VSZ because it doesn't know when the process may use 100% of the requested memory, if it calculates based on actual use, it'll be killing random processes everytime it uses more actual memory than allowed.

    The reason I'm confused is because I'm running the same processes (actually more than the same processes) on other VPS but haven't had issues with the same configuration, I guess it might be the kernel not .32 but still seems strange.

  • edited April 2013

    This is a problem with the node, as the memory is overcommitted.
    It happened to me with Urpad in 2011 and with Burst this year.
    Clearly there are too many VPS'. If it is not fixed quickly (and in my cases it wasn't), the only solution is to migrate to another node or host.

    BTW, this is an interesting thread and I don't know that particular situation, but when after a reboot and only sshd is running, you get a memory error just typing 'ls', there is clearly a problem outside the scope of the VPS.

  • What problem with the node, he has 131072 pages of 4kb each = 512MB.
    72641 times he has tried to allocate more than 512MB - this is what the failcnt shows.

    @perennate what do you have running on that VPS? Can you show us the result of "ps axu" ?

  • MunMun Member

    Ubuntu might not be the issue, but debian is generally lighter and more stable.

  • perennateperennate Member, Host Rep

    Currently just MySQL and Apache are running:

    mysql 413 0.0 1.0 523204 43168 ? Ssl 18:56 0:00 /usr/sbin/mysqld root 761 0.0 0.2 199848 8760 ? Ss 18:57 0:00 /usr/sbin/apache2 -k start www-data 772 0.0 0.2 202648 9608 ? S 18:57 0:00 /usr/sbin/apache2 -k start www-data 820 0.0 0.2 203796 10280 ? S 19:00 0:00 /usr/sbin/apache2 -k start www-data 821 0.0 0.2 203800 10784 ? S 19:00 0:00 /usr/sbin/apache2 -k start www-data 822 0.0 0.2 204056 10916 ? S 19:00 0:00 /usr/sbin/apache2 -k start

    I'm not sure if the fail count was before or after restart. The virtual memory these are using is much greater than the 512 MB allocated, but really RES is what I'd think would matter even on VM..

  • Really, running apache on a 512 MB OpenVZ VPS is not a good idea. Consider switching to something lighter.

  • perennateperennate Member, Host Rep

    @rds100 said: Really, running apache on a 512 MB OpenVZ VPS is not a good idea. Consider switching to something lighter.

    That doesn't explain why none of my other VPS with similar configuration (also OpenVZ) don't have these issues though:

    cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit failcnt 291: kmemsize 24945425 93429760 268435456 268435456 0 lockedpages 0 16 65536 65536 0 privvmpages 578354 2950926 9223372036854775807 9223372036854775807 0 shmpages 34338 35746 9223372036854775807 9223372036854775807 0 dummy 0 0 0 0 0 numproc 125 1110 9223372036854775807 9223372036854775807 0 physpages 111760 194354 0 131072 0 vmguarpages 0 0 9223372036854775807 9223372036854775807 0 oomguarpages 128234 136715 9223372036854775807 9223372036854775807 0 numtcpsock 275 1248 9223372036854775807 9223372036854775807 0 numflock 11 18 9223372036854775807 9223372036854775807 0 numpty 11 21 9223372036854775807 9223372036854775807 0 numsiginfo 0 36 9223372036854775807 9223372036854775807 0 tcpsndbuf 5232528 21769744 9223372036854775807 9223372036854775807 0 tcprcvbuf 13132792 38962544 9223372036854775807 9223372036854775807 0 othersockbuf 119448 399672 9223372036854775807 9223372036854775807 0 dgramrcvbuf 0 1269352 9223372036854775807 9223372036854775807 0 numothersock 130 190 9223372036854775807 9223372036854775807 0 dcachesize 7069931 74886268 134217728 134217728 0 numfile 1660 2635 9223372036854775807 9223372036854775807 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 24 24 9223372036854775807 9223372036854775807 0

    free -m total used free shared buffers cached Mem: 512 436 75 0 0 144 -/+ buffers/cache: 292 219 Swap: 512 232 279

    www-data 2601 0.0 1.6 355448 8908 ? S 16:15 0:00 /usr/sbin/apache2 -k start www-data 9331 0.0 1.7 355332 9408 ? S 17:18 0:00 /usr/sbin/apache2 -k start www-data 9341 0.0 1.3 354928 7212 ? S 17:19 0:00 /usr/sbin/apache2 -k start www-data 11025 0.0 1.6 355320 8872 ? S 12:28 0:00 /usr/sbin/apache2 -k start www-data 23711 0.0 1.3 354928 7236 ? S 19:23 0:00 /usr/sbin/apache2 -k start root 27153 0.0 1.2 354848 6480 ? Ss Mar21 0:51 /usr/sbin/apache2 -k start mysql 1046 0.0 2.2 1235800 11712 ? Ssl Mar08 11:26 /usr/sbin/mysqld user 5858 1.1 4.7 1153288 25008 pts/11 Ssl+ Mar21 606:32 ./host 8.cfg user 5879 0.2 6.3 1093412 33340 pts/13 Ssl+ Mar21 161:47 ./host 7.cfg user 5905 0.1 4.7 1079060 24736 pts/15 Ssl+ Mar21 63:26 ./host 6.cfg user 5924 0.1 3.7 1080720 19448 pts/16 Ssl+ Mar21 65:28 ./host 5.cfg user 5947 3.2 4.4 1151200 23208 pts/17 Ssl+ Mar21 1781:32 ./host 4.cfg user 10971 0.2 8.8 1089748 46536 pts/5 Sl+ Apr15 38:54 ./host 3.cfg user 12224 0.1 8.2 887760 43296 pts/3 Sl+ Apr19 18:36 ./host 2.cfg user 14395 0.9 6.9 1146316 36396 pts/1 Sl+ Apr06 300:25 ./host 1.cfg

  • @perennate said: privvmpages 578354

    This one is with 2.25GB of ram.

  • perennateperennate Member, Host Rep
    edited April 2013

    @rds100 said: This one is with 2.25GB of ram.

    No, it has 512 MB of RAM.

  • @perennate said: No, it has 512 MB of RAM.

    Run top. How much memory do you see?

  • perennateperennate Member, Host Rep
    edited April 2013

    top - 21:46:29 up 119 days, 17:32, 2 users, load average: 0.41, 0.27, 0.19 Tasks: 63 total, 2 running, 61 sleeping, 0 stopped, 0 zombie Cpu(s): 2.1%us, 3.1%sy, 0.0%ni, 90.4%id, 0.0%wa, 0.0%hi, 0.0%si, 4.4%st Mem: 524288k total, 443256k used, 81032k free, 0k buffers Swap: 524288k total, 238120k used, 286168k free, 146012k cached

    $ free -m total used free shared buffers cached Mem: 512 432 79 0 0 142 -/+ buffers/cache: 290 221 Swap: 512 232 279

  • dmmcintyre3dmmcintyre3 Member
    edited April 2013

    He would be using 2.25gb ram if he was on 2.6.18 openvz (no vswap) and the page size is the default.

  • Then it must be a different kernel. What's ther kernel on the first and second VPS? uname -a

  • perennateperennate Member, Host Rep

    No problem VPS:

    Linux s2 2.6.32-042stab061.2 #1 SMP Fri Aug 24 09:07:21 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux

    New VPS:

    Linux s14 2.6.32-042stab068.8 #1 SMP Fri Dec 7 17:06:14 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux

  • So both are real 2.6.32 based, nothing to do with "burst ram" then. That's weird.

Sign In or Register to comment.