[Rack] Improvements to cgroups on m2.

Ben Kochie ben at nerp.net
Mon May 13 14:58:21 UTC 2013


I have made some improvements to the cgroup handling on m2.

On boot, a number of things don't get setup correctly because threads were 
not being imported into the right container.  This is fixed.

I also added an on-boot updater that should catch everything that is 
managed by upstart:

/usr/local/sbin/update-upstart-cgroups.sh

This script is safe to run at any time.  It is useful if you need to 
adjust the limits for things in upstart.

I also updated the usage tool to report percent of cgroup use.

root at m2:~# get-cgroup-memory-use.sh
   in-use    %      max    %    limit  cgroup
-------------------------------------------------------------
        0   0%        0   0%   262144  users
     1200   7%     1876  11%    16384  udevd
     1856  11%     3536  22%    16384  rsyslogd
    20784   8%   108100  41%   262144  posfix
   113784  22%   227092  43%   524288  mysqld
     9652  29%    19412  59%    32768  munin-node
     1232   4%     1564   5%    32768  monit
    29396  15%    58920  30%   196608  memcached
    97592  37%    97800  37%   262144  mailman
     1452   9%     2052  13%    16384  getty
      692   4%     1512   9%    16384  dbus-daemon
      460   0%    16384   6%   262144  cron
      652   2%     1676   5%    32768  clamsmtp
    78368  40%   196608 100%   196608  clamav-freshclam
   239840  61%   393216 100%   393216  clamav-daemon
    12356  19%    12480  19%    65536  bind9
     1296   8%     2592  16%    16384  avahi-daemon
     1032   6%     1700  10%    16384  auditd
      184   1%      496   3%    16384  atd
   107136  10%   295600  28%  1048576  apache2
      164   1%      456   3%    16384  acpid
=============================================================
   204792  10%        0   0%  2051776  Default

-ben


More information about the Rack mailing list