1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Mauro Vale
  2. Monday, 21 June 2010
  3.  Subscribe via email
Cpanel LVE and TOP show diferent results
Rate this post:
  1. 21.06.2010 06:06:08
  2. # 1
Mauro Vale Accepted Answer
Posts: 2
Joined: 21.06.2010
0
Votes
Undo
Hi,

We are using CPANEL and cloudlinux, and configured all users to have 10% of CPU.

When we run lveps -p -d it show something like this:


LVE REF PNO PID TNO TID UID GID CPU MEM I/O
505 1 2 --- 2 --- N/A N/A 4% 5084 N/A
--- --- 30785 --- 30785 nobody nobody 0% 1760 N/A
--- --- 517 --- 517 user1 user1 5% 3324 N/A
503 1 2 --- 2 --- N/A N/A 9% 5084 N/A
--- --- 30779 --- 30779 nobody nobody 0% 1760 N/A
--- --- 516 --- 516 user2 user2 10% 3324 N/A

User1 has ben manually set to use only 5%.

But if we run top we can see that the PHP the user is runing uses 2x CPU:

516 user2 25 0 97724 7908 4584 R 21.9* 0.8 0:19.05 php X
517 user1 25 0 97724 7896 4572 R 11.9* 0.8 0:09.45 php

* - CPU used.

Is this the correct way LVE works ?
  1. 21.06.2010 07:06:21
  2. # 2
Igor Seletskiy Accepted Answer
Posts: 1201
Joined: 09.02.2010
0
Votes
Undo
First of all: If this is SMTP server with multiple cores, try pressing SHIFT-I, that will show percentage of CPU usage per core, instead of per all CPUs
In top it makes sense to show as percentage of single Core, as process in this case cannot use more then one CPU.
With LVE we always show percentage of total, as it is multiple processes that are running.

Second: lveps -d calculates usage over 30 seconds interval.
top resolution is 1 second. All the time that php sleeps, or simply is not running for that user at that time might not be accounted for.
  1. 21.06.2010 11:06:26
  2. # 3
Mauro Vale Accepted Answer
Posts: 2
Joined: 21.06.2010
0
Votes
Undo
Hi, Igor

Yes you are right I forgot that top shows SMP CPU, using SHIF-I it shows same consistency of CPU using TOP and lveps.

Thank you
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.