0

I am running Ubuntu 14.04 LTS inside a OpenVZ (Virtuozzo) container. There are basic services running (Apache, Postfix, Dovecot, MariaDB, OpenVPN, LDAP, memcached, php-fpm, nscd) and I am already hitting some limits as seen in /proc/user_beancounters, in particular kmemsize:

Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
 79053013:  kmemsize                 39057604             41549824             41943040             50331648                   18

This after only about 12 hours uptime; before there were lots (hundreds) of failures with kmemsize, shmpages, tcpsndbuf.

My questions would be:

  • is it possible that some of the services leak resources (which don't get released even if I restart them), or that resource usage increases in time even without leaks?
  • how can I see restricted resource usage with better granularity, so that I know what to tweak?
  • any tips/links on lowering those in question (in particular kmemsize, shmpages)?
  • any guesses which service is the most resource-hungry?
eudoxos
  • 343
  • 2
  • 3
  • 11

1 Answers1

1

The defaults are usually too low for these. 41MB is fairly small for kmem and shmpages should be somewhere near half your RAM size (1/2 vmguarpages).

UBC parameters have their uses, especially if you like burstable RAM as opposed to swap, but the parameters usually need tweaking or an experienced admin/host to assign proper limits.

Vswap has been the default for OpenVZ for a while now which makes these UBC limits a thing of the past. I suggest you look into switching to a vswap config if you're having troubles with these UBC parameters.

Devon
  • 780
  • 1
  • 9
  • 20
  • How can I check if there is vswap support and how to enable itm, from within the container? It is a VPS managed by 1und1.de of which customer support sucks big time when it comes to technical things. – eudoxos Mar 18 '15 at 10:28
  • 1
    You can't modify anything from inside the container. Find a better provider. – Devon Mar 18 '15 at 17:39