Results 1 to 27 of 27

Thread: CPU load

  1. #1
    Join Date
    Aug 2002
    Posts
    259

    CPU load

    Hi,

    What is the CPU load has to be normally?, I mean avarage load
    for CPU.


    Thanks

  2. #2
    hmm, below 1 ?

    it varies from 0.00 to 1.00, however if it goes to say 1.50 or 2.00 or something like that then that means that more than one process is running that combined, is more cpu power than is available, for example 2.00 is 200% cpu usage [which isnt good]

    Mine stays at 0.00-0.01, I have almost a 1000 unique visitors daily to one of the 10 or so websites on my box.

    Ocasianly it can go up to 0.26 or something, but drops pretty quickly, its usually if im compiling something.

  3. #3
    Join Date
    Jul 2002
    Location
    Kolding, Denmark
    Posts
    292
    Average load is a general system load, not CPU-load - at least if you're talking about a UNIX-based system.

    If you have a system that lacks RAM you'll usually see the general load go upwards while the CPU is shown to be at least partially idle because the disk system becomes the bottleneck when heavy swapping occurs.

    Acceptable average load? We generally don't accept a load above 2 during the last 5 minutes (the middle number in top) on our shared hosting servers but others may have different preferences.
    Best regards,

    Anders C. Madsen
    Golden Planet Support - http://www.goldenplanet.com

  4. #4
    Join Date
    Nov 2001
    Location
    London
    Posts
    4,857
    A cpu load of 1 does not mean 100% CPU utilization - something which many people overlook.

    It's hard to state what good CPU load because they will vary. You can have a CPU load of 2 yet 85% of the CPU will be idle, which will be fine, yet you can have a CPU load of under 1 with < 10 % idle, which, obviously, is not so good.

    Remember that with dual processor machines, you should generally double what you would call an acceptable CPU load.
    Matthew Russell | Namecheap
    Twitter: @mattdrussell

    www.namecheap.com - hosting from a registrar DONE RIGHT!

  5. #5
    Join Date
    Aug 2002
    Posts
    259

    thanks

    Hi,

    When I look at WHM, Normally it says

    0.6(2 cpus) - o.75 ( 2 cpus) Which is good. 2 cpus means by??

    Some times it goes to 8, 9 12 ....

    How could I get notification by the time to find out who is using all resources.

    Is any I dea?

    Thanks

  6. #6
    Join Date
    Nov 2001
    Location
    London
    Posts
    4,857
    2 CPUs means you're on a dual processor server.

    Those loads you posted are pretty low, and _should_ (it's hard to tell without seeing idle percentages) be fine - but if it is constantly raising to 12, then it may be a little overloaded - but again, it's impossible to say for sure, because idle percentages still could be fairly high.

    Matt
    Matthew Russell | Namecheap
    Twitter: @mattdrussell

    www.namecheap.com - hosting from a registrar DONE RIGHT!

  7. #7
    Join Date
    Aug 2002
    Posts
    259

    hi

    Hi,

    From teh PID id, can I fidn who is owner, If the owner is nobdy. Can I find who is executing?

    Thansk

  8. #8

    Re: hi

    If the owner is nobody, then it is likely that the user has root privelages, as a none root user cannot execute a process that can su to another user, unless they have the password for that use..

    Some how they have got root priveleages or mabey it is a suid program, but root must have made it suid first, so if processes are cropping up as other users that dont have access to the system, nobody inparticular[as the shell is normally set to no login] then you have probably been comprimised, if your sure you didnt launch them as root.

    Originally posted by stephenn
    Hi,

    From teh PID id, can I fidn who is owner, If the owner is nobdy. Can I find who is executing?

    Thansk

  9. #9
    Oh yeah, btw, theres plenty of processes that run as nobody that would launch yourself, but im assuming here that your *absolutley* sure the process is nothig to do with something you as the root user has installed and ran.

    Before anyone mentions it and has to correct me

  10. #10
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Even if your CPU utilization is at 0.1%, if you have a load of 12, then you have 11 processes that are waiting on CPU time, which is usually not good and is causing someone a delay.

    I guess this might be okay if the programs you have running like to spawn children that like to wait on each other.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  11. #11
    Join Date
    Aug 2002
    Posts
    259

    hi

    How do I find which scripts or which is using all resources. I tried top command and didn't show more info.


    thanks

  12. #12
    Join Date
    Aug 2001
    Location
    Orange County, CA
    Posts
    532
    In "top" you can hit "o" and sort by CPU usage or memory.

    You could run a: "ps -auxw | more".

    You could uncomment Apache's "server-status" line in the httpd.conf, and view yourdomain.com/server-status

    You could log into MySQL from the shell and type "show full processlist" and "status".

    "tail -f" the system/mail logs, run a "tcpdump". If using tcpdump through SSH, use "tcpdump | grep -v \.ssh" to have it not display all the data going over SSH to your machine (which generates more connections to your machine it needs to report, etc.)

    If you have router level/NIC and bandwidth utilization logs/charts, check those.

    Just a few off the top of my head, hope that helps!
    Jeff Standen, Chief of R&D, WebGroup Media LLC. - LinkedIn
    Cerb is a fast and flexible web-based platform for business collaboration and automation. http://www.cerbweb.com/

  13. #13
    Join Date
    Jun 2002
    Posts
    51
    Hi jstanden

    Thansk you so much.

  14. #14
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    Ok, first of all it is what it says it is, just like you were taught in school. 1=1. So 1.00 is 1%. 100 is 100%.

    Just because you read on other threads of posts of people that "think" 1 = 100% doesnt make it so. It can also go over 100% as well. A dual cpu can easily hit 200%.....but it's like a balloon, how much is 100%?. It's a guess by the system. I have seen dual systems as high as 400.00. Is it really 400% load? I doubt it. The system was guessing and once it hit 100% it had no choice but to keep increasing that number once 100 was reached.

    Ok, so you want to know what a process is? You want to know what's running as nobody, fine. I will answer that since no-one else seems to know.

    You see a process who's number is on the left which, for example, is 483756. To find out what that process is, do

    ls -al /proc/483756

    Look for
    cwd -> /path/to/whats/running
    in there.

    This is of course, assuming you are running linux. Better write that all down, because I dont repeat myself

    and please please please dont think 1.00 equals 100%. Anyone who says so needs to go pick up a few yellow books.

  15. #15
    Ok, first of all it is what it says it is, just like you were taught in school. 1=1. So 1.00 is 1%. 100 is 100%.
    Actually I'm pretty sure 1.00 is not 1% and 100 is not 100%.

    For a definition of what load average is actually a measure of, visit here:
    http://cdl.best.vwh.net/NeXT/tips/0036.html
    "...average number of jobs (processes) that are ready to run when the process scheduler examines its queue."
    Paul Oehler
    http://nexcess.net

  16. #16
    Join Date
    Jul 2002
    Posts
    924
    Did you read the rest of his post
    Unlimited Space & Bandwidth
    http://localhost/
    Providing hosting since 17/99/3003

  17. #17
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Originally posted by Webdude
    The system was guessing and once it hit 100% it had no choice but to keep increasing that number once 100 was reached.
    CPU load has nothing to do with percentage of utilization, and there's no guessing involved.

    Ok, so you want to know what a process is? You want to know what's running as nobody, fine. I will answer that since no-one else seems to know.

    You see a process who's number is on the left which, for example, is 483756. To find out what that process is, do

    ls -al /proc/483756

    Look for
    cwd -> /path/to/whats/running
    in there.
    The cwd link is just to the processes current working directory. This might actually show the user's home directory if you're using suexec, so it might be helpful. But this information and more is available with lsof, which is what I would recommend using.

    lsof -p 483756

    You could also do an strace on the process for more information:

    strace -p 483756

    and please please please dont think 1.00 equals 100%. Anyone who says so needs to go pick up a few yellow books.
    I'm sure you realize that when doing math equations, 100% does equal 1.00.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  18. #18
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    The 'load average' is typically just a printout of the Unix kernel variable
    called 'avenrun', a contraction of 'average number runnable', which is the
    average number of jobs (processes) that are ready to run when the process
    scheduler examines its queue.
    If 1=100%, please explain how a system can hit 400 and on up to 800 or more. We are talking about load average, not CPU%. Some of you seem to be getting confused on that. Have you ever filled a cup with water more than 100%. That's a trick I would like to see.

    As for the quote above, it's incorrect. It does back up my claim that 1.00 does not = 100%, but it is also wrong because it claims that 1 equals 1 process waiting in queue. WTF?? So it's claiming a system can only handle two processes at once?? That is wrong. The default process limit for linux is 8192. Depending on your server, that limit may need raising because it can easily hit that many running processes in a single instance.

    As for the /proc/# thing. If someone is running a script that is running as nobody (or a php script) and you are trying to find who's script is causing probs, that will tell you where the script is running from and allow you to catch your culprit. CGI will run as nobody if you are not running SuEXEC......which I dont know why in the world anyone wouldnt be runnig it...

    All in all, there are tons of professionals that disagree on what 1.00 actually means. Those of you who think 1=100% will need to back it up. This means you will need to explain several things. One, when that number hits 400.00 that means the load (by your definition) is at over 4000%. I beleieve Tim Greer has seen some load avs that were over 1000.00. Now, by general standards we all live by, a load of 10,000 on anything is too much.

    So to say that linux developers would develop something that doesnt equal common math really doesnt make sense. Regardless where math comes into play, 1 always equals 1. By your definition, a $1.00 equals a hundred bucks. Even in binary data, 1=1. Why in the world would any developer move away from that?

  19. #19
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Have you've never done any math equations with percentages?

    99% = .99
    50% = .5
    100% = 1

    You seem to still be confused in thinking that load average has anything to do with percentage of CPU utilization. It doesn't. It's the number of processes waiting on CPU time. Also, the kernel does not need to guess how many processes are waiting.

    BTW: The "default" max number of processes on my Linux kernel is 4080.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  20. #20
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    It's load average, and I am not confusing with CPU. In % math, anything under 1 is less than 1%. That's how % works.

    0.5 is half a percent. 1.0 is one percent, and 20.0 is 20 percent. Just like a dollar. $0.50 is half a dollar. The math is always the same, regardless if you use load averages or money change. Anything on the right side of the dot is less than one. It's a percent of one.

    So a load average of 5.0 is a load average of 5%

  21. #21
    Join Date
    Nov 2001
    Location
    London
    Posts
    4,857
    Your theory would mean a CPU load of 100 is 100% CPU usage, which is incorrect.

    $0.50 is 50% of a dollar, anything under 1 does not necessarily have to be less than 1%. You can only work out a percentage if you have the full value.
    Matthew Russell | Namecheap
    Twitter: @mattdrussell

    www.namecheap.com - hosting from a registrar DONE RIGHT!

  22. #22
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    Matt, you confusing cpu and load average. They arent the same.

  23. #23
    Originally posted by Webdude
    So a load average of 5.0 is a load average of 5%
    5% of what webdude?
    Paul Oehler
    http://nexcess.net

  24. #24
    Join Date
    Nov 2000
    Location
    Dundee, UK
    Posts
    1,366
    Have you ever filled a cup with water more than 100%
    Yes i have, but thats for another topic.

  25. #25
    Originally posted by SplashHost.com


    Yes i have, but thats for another topic.
    I wonder if that is the inspiration for your company (splashhost)name.

    Hal

  26. #26
    Join Date
    Apr 2002
    Location
    USA
    Posts
    5,779
    With all this fighting over waht load Avreage means I had to go look it up, here is what I came up with with.What Does "Load Average" Mean?



    --------------------------------------------------------------------------------

    The load average numbers give the average number of jobs in the run queue over the last 1, 5, and 15 minutes. (These three time periods may vary from one vendor's Unix system to another, but are usually 1, 5 and 15 minutes.) In other words, the n-minute load average is the number of processes competing for the attention of the CPU(s) at any moment, averaged over n minutes.

    The lowest possible load average is zero, the highest unlimited, though we rarely see load averages exceeding 20, and even 10 is unusual. A load average of one or two is about typical.



    --------------------------------------------------------------------------------

  27. #27
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Originally posted by Webdude
    It's load average, and I am not confusing with CPU. In % math, anything under 1 is less than 1%. That's how % works.

    0.5 is half a percent. 1.0 is one percent, and 20.0 is 20 percent. Just like a dollar. $0.50 is half a dollar.
    So in one case .5 is half a percent (.5%), and in the other it's 50% (half)?

    The math is always the same, regardless if you use load averages or money change. Anything on the right side of the dot is less than one. It's a percent of one.

    So a load average of 5.0 is a load average of 5%
    You're still confused. There is no percentage involved in CPU load. What are you referring to? 5% of what?

    Monte, thank you for that definition, but some how we got off topic. The discussion was originally not about load averages, it was about load.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •