(dv) 4.0:Use Resource Alerts and beancounters to analyze system resource limits

  • This page was last modified on February 3, 2011, at 09:10.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Contents


AccountCenter Status

Your AccountCenter contains a monitoring tool you can use to check on server health. Please see (dv) 4.0:Server status for details.

Resource Alerts

If you suspect your server may be overusing its resources, check your Resource Alerts (formerly QoS Alerts in Plesk 8.6).

  1. Sign into the Plesk Power User Panel as admin or root. You can access this panel directly at https://example.com:4643, or you can:
    1. Log into the Server Administration Panel.
    2. Click on Tools & Utilities in the left sidebar. See Figure 1:

      Figure 1. Click on Tools & Utilities on the left.


    3. Scroll down to the Server Management section, then click on the Manage Your Container link. See Figure 2:

      Figure 2. Click on Manage Your Container.


      Your Power User Panel will open in a new tab or window.

  2. Click on Resource Alerts on the left. See Figure 3:

    Figure 3. Click on Resource Alerts.


  3. Here, all of your recent resource alerts will be displayed. See Figure 4:

    Figure 4. Here, you can see any recent resource alerts.


  4. If you have encountered any resource alerts recently, you will see errors similar to these:

    Plesk virtuozzo qos alerts.png

    • Yellow - You are approaching your purchased resource limit.
    • Red - You are approaching the current physical machine resource limit.
    • Black - You have gone over the current system limit. Indicates a crash.
    • Green - Back to normal, safe operating limits.

    Check the System resource limits section below for details on what the types of alerts mean.

Beancounters

If you want hard numbers rather than the graphics provided by the QoS Alerts, check your beancounters.

  1. Log into your server as a root or sudo user via SSH.
  2. Run this command:
    cat /proc/user_beancounters
    
  3. You should see output like the following:
    Version: 2.5
    uid  resource           held    maxheld    barrier      limit    failcnt
    30173: kmemsize        4905005    4923306   24577665   27035431         62
    lockedpages           0          0       1200       1200          0
    privvmpages       51381      51386     451859     471859          3
    shmpages           6024       6024      34475      34475          0
    dummy                 0          0          0          0          0
    numproc              42         42        600        600          0
    physpages         23564      23566          0 2147483647          0
    vmguarpages           0          0     262144 2147483647          0
    oomguarpages      25270      25272     262144 2147483647          0
    numtcpsock           15         15        600        600          0
    numflock             11         11        960       1056          0
    numpty                1          1         60         60          0
    numsiginfo            0          0       1024       1024          0
    tcpsndbuf        225836     225836    5734955    8192555        507
    tcprcvbuf        245760     245760    5734955    8192555          0
    othersockbuf      12972      12972    2867477    5325077          0
    dgramrcvbuf           0          0    2867477    2867477          0
    numothersock         16         16        600        600          0
    dcachesize       531278     534223    5368543    5529600          0
    numfile            2324       2333      20000      20000          0
    dummy                 0          0          0          0          0
    dummy                 0          0          0          0          0
    dummy                 0          0          0          0          0
    numiptent            14         14        200        200          0
    

    What the columns mean:

    • uid - The user ID number.
    • resource - The type of limit in question. See the next section for details.
    • held - The amount of this resource being used now.
    • maxheld - The maximum amount of this resource used in the last 15 seconds.
    • barrier - The dedicated amount of this resource you have purchased.
    • limit - The total available amount of this resource currently free on the physical machine. (i.e. you may get lucky with extra resources.)
    • failcnt - The number of times you have exceeded the limit for this resource.

    Numbers that indicate a memory size are in bytes.

System resource limits

The most common system resource limits you may reach are described briefly below. For a detailed technical explanation of each limit, and for parameters not shown below:

  1. Visit the Parallels Virtuozzo manual
  2. Click on Index.

    Virtuozzo index.png

  3. Find your parameter in the alphabetical listing.

    Oomguarpages.png

  4. If you are hitting too many system resource limits, you may need to optimize your system usage, or upgrade your (dv) Dedicated-Virtual Server.

    kmemsize

    kmemsize is the kernel memory of the server. This limit is closely tied to your CPU use, and is smaller than your RAM. You can reach your kmemsize limit by:

  • Running too many processes on your server at the same time.
  • Running just a few CPU-intensive processes.

Run 4.0:Memory_optimization_and_troubleshooting#Tracking_down_resource-hogging_processes top to view your current open processes.

privvmpages

privvmpages is the RAM of the server. You can reach your privvmpages limit by:

  • Running processes that require intensive server memory.

Run 4.0:Memory_optimization_and_troubleshooting#Tracking_down_resource-hogging_processes top to view your current open processes.

This article at maxgarrick.com has a good visual representation of how kmemsize and privvmpages memory work.

tcpsndbuf

tcpsndbuf is the number of connections being used to serve data, which strongly correlates to the amount of data being served by Apache. You can reach your tcpsndbuf limit by:

  • Using Apache to serve too much content to too many people at the same time.

The best way to determine why you are reaching this particular resource limit is to look at the traffic on all of your sites, especially which pages and files are being requested the most. For example, if hundreds of people are trying to view the same streaming video within a minute of each other, it's probably this item that is causing you to reach the limit. Of course, it's possible that the requests are spread out over many different items as well, which will make this more difficult to analyze. You can check your traffic and web requests by viewing your web statistics.

othersockbuf and numothersock

othersockbuf and numothersock refer to your server's internal "sockets." Sockets are what processes internal to the server use to talk to one another. For example, MySQL and PHP talk to each other through a socket. "othersockbuf" also includes some processes that go through the internet - it is the total size of UNIX-domain socket buffers, UDP, and other datagram protocol send buffers. You can reach your othersockbuf or numothersock limit by:

  • Running too many internal processes that have to connect to each other.

Run top to view your current open processes.

numfile

numfile is the number of files open on your server concurrently. You can reach your numfile limit by:

  • Opening too many files at once.

Run this command in SSH to view all open files:

lsof | wc -l