Re: How is CPU usage calculated?
Le 2010-10-18 16:35, Adam Vande More a écrit : On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon free...@optiksecurite.comwrote: I just reread it and it isn't clearer what is using the CPU so much. Can you please give me a little more explanation? A line in top(1) like: CPU: 0.0% user, 0.0% nice, 0.4% system, 0.4% interrupt, 99.3% idle does not describe how much CPU is being used, but rather a percentage of time spent in each of the processor states. It's saying of the CPU cycles that are being used, this is what it breaks down as. Since MySQL is a userland application, you'd expect the value of user to be quite high if that was only thing running on your system and it was under high load. You can infer how much CPU is being used from the line, but there are better and more accurate methods generally of getting that information especially with SMP systems. Thank you for the explanation. Would you be kind enough to point me to a method so I can know for sure that it's MySQL that is taking that much CPU ? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
Le 2010-10-15 03:17, Bas Smeelen a écrit : From: Martin Turgeon [mailto:free...@optiksecurite.com] To: freebsd-questions@freebsd.org Sent: Thu, 14 Oct 2010 21:46:13 +0200 Subject: How is CPU usage calculated? Hi list! I did a strange observation yesterday night. The CPU usage reported by top doesn't match what is indicated under it. I was seeing around 80-90% user, 5% system, 1% interrupt and 10% idle. But the process details under it doesn't match. mysqld was taking around 250% (WCPU) with a few httpd processes at 1-2%. The system is running GENERIC 8.0-REL on a Xeon E5630 (quad core with hyperthreading so 8 CPUs). MySQL and Apache each have their own jail (I don't think it will matter but just in case) I understand why the mysqld process take more than 100% but how can I know what's taking the rest? Why doesn't the total user CPU usage match the total of the CPU usage of each process? Is there a link with hyperthreading? There sure is a logical answer and I would really like to know it :) Yes if you have multiple cpu's, cores or hyperthreading than each unit can be used up to 100% Mysql has multiple threads, you can check with top -P to see the multiple cores and when top is running give the command H (capital H) to see the threads of each process Thanks for your reply! I didn't knew about -H to show individual threads, but my problem isn't there. My problem is that the summary printed in the first lines doesn't match the total of the process detailled under the summary. For example, I have a user CPU usage est 83.1% in the summary, but the only process worth mentionning in the list is mysqld that is taking 255.52% WCPU. That's far less than half the CPU power but 83% is far more. It's that difference that I don't understand. How is this possible? Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
On Mon, Oct 18, 2010 at 1:54 PM, Martin Turgeon free...@optiksecurite.comwrote: I didn't knew about -H to show individual threads, but my problem isn't there. My problem is that the summary printed in the first lines doesn't match the total of the process detailled under the summary. For example, I have a user CPU usage est 83.1% in the summary, but the only process worth mentionning in the list is mysqld that is taking 255.52% WCPU. That's far less than half the CPU power but 83% is far more. It's that difference that I don't understand. How is this possible? man 1 top 83.1% doesn't mean what you think it does. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
Le 2010-10-18 15:12, Adam Vande More a écrit : On Mon, Oct 18, 2010 at 1:54 PM, Martin Turgeon free...@optiksecurite.comwrote: I didn't knew about -H to show individual threads, but my problem isn't there. My problem is that the summary printed in the first lines doesn't match the total of the process detailled under the summary. For example, I have a user CPU usage est 83.1% in the summary, but the only process worth mentionning in the list is mysqld that is taking 255.52% WCPU. That's far less than half the CPU power but 83% is far more. It's that difference that I don't understand. How is this possible? man 1 top 83.1% doesn't mean what you think it does. I just reread it and it isn't clearer what is using the CPU so much. Can you please give me a little more explanation? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
Martin Turgeon free...@optiksecurite.com writes: Le 2010-10-18 15:12, Adam Vande More a écrit : On Mon, Oct 18, 2010 at 1:54 PM, Martin Turgeon free...@optiksecurite.comwrote: I didn't knew about -H to show individual threads, but my problem isn't there. My problem is that the summary printed in the first lines doesn't match the total of the process detailled under the summary. For example, I have a user CPU usage est 83.1% in the summary, but the only process worth mentionning in the list is mysqld that is taking 255.52% WCPU. That's far less than half the CPU power but 83% is far more. It's that difference that I don't understand. How is this possible? man 1 top 83.1% doesn't mean what you think it does. I just reread it and it isn't clearer what is using the CPU so much. Can you please give me a little more explanation? They are calculated over different time periods, averaged in different ways (that's they weighted part), and processes only show up until they exit. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon free...@optiksecurite.comwrote: I just reread it and it isn't clearer what is using the CPU so much. Can you please give me a little more explanation? A line in top(1) like: CPU: 0.0% user, 0.0% nice, 0.4% system, 0.4% interrupt, 99.3% idle does not describe how much CPU is being used, but rather a percentage of time spent in each of the processor states. It's saying of the CPU cycles that are being used, this is what it breaks down as. Since MySQL is a userland application, you'd expect the value of user to be quite high if that was only thing running on your system and it was under high load. You can infer how much CPU is being used from the line, but there are better and more accurate methods generally of getting that information especially with SMP systems. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re[2]: How is CPU usage calculated?
Здравствуйте, Adam. Вы писали 18 октября 2010 г., 23:35:55: AVM On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon AVM free...@optiksecurite.comwrote: I just reread it and it isn't clearer what is using the CPU so much. Can you please give me a little more explanation? AVM A line in top(1) like: AVM CPU: 0.0% user, 0.0% nice, 0.4% system, 0.4% interrupt, 99.3% idle AVM does not describe how much CPU is being used, but rather a percentage of AVM time spent in each of the processor states. It's saying of the CPU cycles AVM that are being used, this is what it breaks down as. Since MySQL is a AVM userland application, you'd expect the value of user to be quite high if AVM that was only thing running on your system and it was under high load. AVM You can infer how much CPU is being used from the line, but there are better AVM and more accurate methods generally of getting that information especially AVM with SMP systems. some times ago I was interested in this question also. From this explanations I undestand nothing. you'd expect the value of user to be quite high if that was only thing running on your system and it was under high load. 1. 'values of user' which value??? or value of what??? 2. 'quite high' how much it is? 3. 'high load' how I can detect that high load??? in man pages no usefull info except description of options. there are no examples how %idle system etc are calculated what is WCPU and CPU and how they are calculated NO EXAMPLES no example how find processes which take hole CPU time\ top is powerfull tool, but whiout docs it seems useless. that is sad -- С уважением, Коньков mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How is CPU usage calculated?
From: Martin Turgeon [mailto:free...@optiksecurite.com] To: freebsd-questions@freebsd.org Sent: Thu, 14 Oct 2010 21:46:13 +0200 Subject: How is CPU usage calculated? Hi list! I did a strange observation yesterday night. The CPU usage reported by top doesn't match what is indicated under it. I was seeing around 80-90% user, 5% system, 1% interrupt and 10% idle. But the process details under it doesn't match. mysqld was taking around 250% (WCPU) with a few httpd processes at 1-2%. The system is running GENERIC 8.0-REL on a Xeon E5630 (quad core with hyperthreading so 8 CPUs). MySQL and Apache each have their own jail (I don't think it will matter but just in case) I understand why the mysqld process take more than 100% but how can I know what's taking the rest? Why doesn't the total user CPU usage match the total of the CPU usage of each process? Is there a link with hyperthreading? There sure is a logical answer and I would really like to know it :) Yes if you have multiple cpu's, cores or hyperthreading than each unit can be used up to 100% Mysql has multiple threads, you can check with top -P to see the multiple cores and when top is running give the command H (capital H) to see the threads of each process DISCLAIMER: This e-mail is for the intended recipient(s) only. Access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited. If you have received it by mistake please let us know by reply and then delete it from your system. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How is CPU usage calculated?
Hi list! I did a strange observation yesterday night. The CPU usage reported by top doesn't match what is indicated under it. I was seeing around 80-90% user, 5% system, 1% interrupt and 10% idle. But the process details under it doesn't match. mysqld was taking around 250% (WCPU) with a few httpd processes at 1-2%. The system is running GENERIC 8.0-REL on a Xeon E5630 (quad core with hyperthreading so 8 CPUs). MySQL and Apache each have their own jail (I don't think it will matter but just in case) I understand why the mysqld process take more than 100% but how can I know what's taking the rest? Why doesn't the total user CPU usage match the total of the CPU usage of each process? Is there a link with hyperthreading? There sure is a logical answer and I would really like to know it :) Thanks in advance, Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org