Announcement

Collapse
No announcement yet.

Cpanel LVE and TOP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cpanel LVE and TOP

    Cpanel LVE and TOP show diferent results

  • #2
    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 ?

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment

        Working...
        X