stephenn
10-11-2002, 09:06 AM
Hi,
What is the CPU load has to be normally?, I mean avarage load
for CPU.
Thanks
What is the CPU load has to be normally?, I mean avarage load
for CPU.
Thanks
![]() | View Full Version : CPU load stephenn 10-11-2002, 09:06 AM Hi, What is the CPU load has to be normally?, I mean avarage load for CPU. Thanks Pillhead 10-11-2002, 09:10 AM hmm, below 1 ? :P 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. goldenplanet 10-11-2002, 09:19 AM 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. mdrussell 10-11-2002, 09:39 AM 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. stephenn 10-11-2002, 09:55 AM 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 mdrussell 10-11-2002, 10:00 AM 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 stephenn 10-11-2002, 01:54 PM Hi, From teh PID id, can I fidn who is owner, If the owner is nobdy. Can I find who is executing? Thansk Pillhead 10-11-2002, 02:37 PM 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 Pillhead 10-11-2002, 04:43 PM 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 ;) bitserve 10-12-2002, 03:59 AM 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. stephenn 10-12-2002, 12:30 PM How do I find which scripts or which is using all resources. I tried top command and didn't show more info. thanks jstanden 10-13-2002, 06:48 PM 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! shann 10-15-2002, 11:48 PM Hi jstanden Thansk you so much. Webdude 10-16-2002, 01:47 AM 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 :rolleyes: and please please please dont think 1.00 equals 100%. Anyone who says so needs to go pick up a few yellow books. nexcess.net2 10-16-2002, 02:50 AM 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." tazzy 10-16-2002, 03:05 AM Did you read the rest of his post :confused: bitserve 10-16-2002, 06:53 AM 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. Webdude 10-16-2002, 12:40 PM 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? bitserve 10-16-2002, 04:32 PM 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. Webdude 10-16-2002, 04:49 PM 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% mdrussell 10-16-2002, 05:02 PM 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. Webdude 10-16-2002, 05:05 PM Matt, you confusing cpu and load average. They arent the same. nexcess.net2 10-16-2002, 09:29 PM Originally posted by Webdude So a load average of 5.0 is a load average of 5% 5% of what webdude? Alan - Vox 10-16-2002, 10:27 PM Have you ever filled a cup with water more than 100% Yes i have, but thats for another topic. hbouma 10-17-2002, 12:46 PM 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 Techark 10-17-2002, 01:04 PM 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. -------------------------------------------------------------------------------- bitserve 10-17-2002, 11:23 PM 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. |