(dv):Use QoS Alerts and beancounters to analyze system resource limits
- This page was last modified on February 21, 2011, at 11:23.
From (mt) Community Wiki
Contents |
QoS Alerts
If you suspect your server may be overusing its resources, check your QoS Alerts, which stands for Quality of Service Alerts.
- Sign into Plesk as admin or root.
- Click on Virtuozzo in the column on the left.
- Click on QoS Alerts.
- If you have encountered any resource alerts recently, you will see output like this:
- 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.
- Log into your server as a root or sudo user via SSH.
- Run this command:
cat /proc/user_beancounters
- 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:
- Visit the Parallels Virtuozzo manual
- Click on Index.
- Find your parameter in the alphabetical listing.
- Running too many processes on your server at the same time.
- Running just a few CPU-intensive processes.
- Running processes that require intensive server memory.
- Using Apache to serve too much content to too many people at the same time.
- Running too many internal processes that have to connect to each other.
- Opening too many files at once.
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:
Run top to view your current open processes.
privvmpages
privvmpages is the RAM of the server. You can reach your privvmpages limit by:
Run 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:
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:
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:
Run this command in SSH to view all open files:
lsof | wc -l




