Date: Fri, 15 Oct 2010 09:17:19 +0200 From: "Bas Smeelen" <b.smeelen@ose.nl> To: freebsd-questions@freebsd.org Subject: Re: How is CPU usage calculated? Message-ID: <20101015071719.1536f19e@mail.ose.nl>
next in thread | raw e-mail | index | archive | help
From=3A Martin Turgeon =5Bmailto=3Afreebsd=40optiksecurite=2Ecom=5D To=3A freebsd-questions=40freebsd=2Eorg Sent=3A Thu=2C 14 Oct 2010 21=3A46=3A13 +0200 Subject=3A How is CPU usage calculated=3F Hi list! =20 I did a strange observation yesterday night=2E The CPU usage reported by= =20 top doesn=27t match what is indicated under it=2E I was seeing around 80-= 90=25=20 user=2C 5=25 system=2C 1=25 interrupt and 10=25 idle=2E But the process d= etails=20 under it doesn=27t match=2E mysqld was taking around 250=25 =28WCPU=29 wi= th a few=20 httpd processes at 1-2=25=2E The system is running GENERIC 8=2E0-REL on a= Xeon=20 E5630 =28quad core with hyperthreading so 8 CPUs=29=2E MySQL and Apache e= ach=20 have their own jail =28I don=27t think it will matter but just in case=29= =20 I understand why the mysqld process take more than 100=25 but how can I= =20 know what=27s taking the rest=3F Why doesn=27t the total user CPU usage m= atch=20 the total of the CPU usage of each process=3F Is there a link with=20 hyperthreading=3F =20 There sure is a logical answer and I would really like to know it =3A=29= Yes if you have multiple cpu=27s=2C cores or hyperthreading than each unit= can be used up to 100=25 Mysql has multiple threads=2C you can check with top -P to see the multiple= cores and when top is running give the command H =28capital H=29 to see th= e threads of each process =20 DISCLAIMER=3A This e-mail is for the intended recipient=28s=29 only=2E Acce= ss=2C disclosure=2C copying=2C distribution or reliance on any of it by anyone else is prohibited=2E If yo= u have received it by mistake please let us know by reply and then delete it from your system= =2E
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101015071719.1536f19e>