PDA

View Full Version : High CPU Load



bigboy
05-18-2006, 09:33 AM
Hello

I need Optimize server High CPU Load

Server Optimization Request

I have a server

Intel Xeon 2.8GHz

chatwizrd
05-18-2006, 10:34 AM
It doesnt look like your utilizing the hyperthreading technology at all on freebsd.

What does the command below display?



syctl machdep.hyperthreading_allowed


If it is 0 then do the following:



sysctl machdep.hyperthreading_allowed=1

echo machdep.hyperthreading_allowed=1 >> /etc/sysctl.conf

bigboy
05-18-2006, 10:43 AM
server Dell SC1425 hyperthreading technology ?

chatwizrd
05-18-2006, 10:46 AM
Originally posted by bigboy
server Dell SC1425 hyperthreading technology ?

You still need to enable hyperthreading with those commands to get it to run on freebsd. I also guarantee since your running a xeon 2.8 that it does have hyperthreading.

bigboy
05-18-2006, 11:02 AM
add to sysctl.conf ?

#ee /etc/sysctl.conf



sysctl machdep.hyperthreading_allowed=1

echo machdep.hyperthreading_allowed=1

chatwizrd
05-18-2006, 11:07 AM
Only add this to /etc/sysctl.conf



machdep.hyperthreading_allowed=1


To get it to change without rebooting do this command as root



sysctl machdep.hyperthreading_allowed=1


Make sure that you at least add it to sysctl.conf so that it loads when you reboot.

bigboy
05-18-2006, 11:13 AM
ee /etc/sysctl.conf
add to sysctl.conf


machdep.hyperthreading_allowed=1




mars# sysctl machdep.hyperthreading_allowed=1

machdep.hyperthreading_allowed: 0 -> 1


Thank you

chatwizrd
05-18-2006, 11:28 AM
Ok now that you have done that.

Run the command



top


You will see a column that is a "C" this is your hyperthreading column and you will see numbers 0-4 depending how many cpus you have. As long as the column is not listing only 0's then you have it working good.

This should also help tremendously with your server loads.

bigboy
05-18-2006, 11:37 AM
Dear Sir

now CPU no high load

Colum C have 1,0

last pid: 94434; load averages: 0.15, 0.12, 0.12 up 23+06:15:58 01:28:42
214 processes: 2 running, 212 sleeping
CPU states: 0.9% user, 0.0% nice, 0.9% system, 0.9% interrupt, 97.3% idle
Mem: 781M Active, 754M Inact, 318M Wired, 59M Cache, 112M Buf, 91M Free
Swap: 4096M Total, 28M Used, 4068M Free

PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
63834 mysql 20 0 83856K 61568K kserel 1 824:27 0.88% 0.88% mysqld
93661 apache 4 0 74496K 52656K sbwait 0 0:02 0.78% 0.78% httpd
93668 apache 4 0 74240K 48072K sbwait 0 0:01 0.34% 0.34% httpd
93699 apache 4 0 72572K 45664K sbwait 0 0:01 0.15% 0.15% httpd
938 root 96 0 8536K 3428K select 1 9:30 0.00% 0.00% snmpd
46495 root 96 0 31012K 2748K select 1 0:41 0.00% 0.00% perl
25252 root 96 0 41888K 29852K select 1 0:36 0.00% 0.00% perl
918 clamav 20 0 20664K 236K kserel 1 0:30 0.00% 0.00% clamd
908 root 96 0 2328K 1488K select 1 0:27 0.00% 0.00% proftpd
944 root 96 0 5632K 572K select 1 0:23 0.00% 0.00% snmptrapd
699 root 8 0 1396K 244K nanslp 1 0:19 0.00% 0.00% cron
414 root 96 0 1324K 280K select 0 0:15 0.00% 0.00% syslogd
39921 root 8 0 872K 268K nanslp 1 0:08 0.00% 0.00% da-popb4smtp

bigboy
05-19-2006, 03:05 AM
Hello chatwizrd

add line to /boot/loader.conf?

machdep.hyperthreading_allowed=1


kernel compiler and its options
gcc version 2.95.4 20020320 [FreeBSD]
COPTFLAGS = -O -march=pentium
Hyper Threading Technology is enabled by BIOS and sysctl
machdep.hlt_logical_cpus=0
machdep.hyperthreading_allowed=1


http://www.finetune.co.jp/~lyuka/interests/radio/gps/hp-gps.html

http://www.mail-archive.com/freebsd@fug.com.br/msg12006.html

chatwizrd
05-19-2006, 10:41 AM
You do not need it in loader.conf if you put it in /etc/sysctl.conf

bigboy
05-19-2006, 07:21 PM
add to sysctl.conf?

machdep.hlt_logical_cpus=0

chatwizrd
05-20-2006, 04:40 PM
Originally posted by bigboy
add to sysctl.conf?

machdep.hlt_logical_cpus=0

No you dont need to do anything with this setting.

kke
06-28-2006, 11:25 AM
I have "C" column showing 0 & 1 in #top
This should mean my server using Hyperthreading, is this correct?

but when I try to check with
#sysctl machdep.hyperthreading_allowed
it's show error message like this
sysctl: unknown oid 'machdep.hyperthreading_allowed'
What's wrong?

chatwizrd
06-28-2006, 06:02 PM
Originally posted by kke
I have "C" column showing 0 & 1 in #top
This should mean my server using Hyperthreading, is this correct?

but when I try to check with
#sysctl machdep.hyperthreading_allowed
it's show error message like this
sysctl: unknown oid 'machdep.hyperthreading_allowed'
What's wrong?

What exact version of freebsd are you using?

Display me the output from command:

uname -a

kke
06-28-2006, 11:24 PM
#uname -a
FreeBSD xxx.xxxx.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Fri May 5 17:13:51 ICT 2006 xxx@xxx.xxxx.com:/usr/src/sys/i386/compile/SMPMAX i386

#cat SMPMAX
~~~
options SMP
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=15
options IPSTEALTH
options QUOTA
~~~

chatwizrd
06-29-2006, 10:21 AM
Well you may have to look through the sysctl settings. Maybe you have it loaded with loader.conf instead.

You can display all sysctl settings with:

sysctl -a

Also can check /etc/sysctl.conf or /boot/loader.conf

kke
06-30-2006, 12:29 PM
my loader.conf is empty
and this is all "machdep" output from sysctl -a

machdep.adjkerntz: -25200
machdep.disable_rtc_set: 0
machdep.wall_cmos_clock: 1
machdep.conrclk: 1843200
machdep.gdbspeed: 9600
machdep.conspeed: 9600
machdep.enable_panic_key: 0
machdep.apm_suspend_delay: 1
machdep.apm_standby_delay: 1
machdep.apm_swab_batt_minutes: 0
machdep.disable_mtrrs: 0
machdep.cpu_idle_hlt: 1
machdep.guessed_bootdev: 2686451712
machdep.hlt_cpus: 0
machdep.panic_on_nmi: 1
machdep.tsc_freq: 3000120008
machdep.i8254_freq: 1193182
machdep.acpi_timer_freq: 3579545
machdep.acpi_root: 1037904
machdep.hlt_logical_cpus: 0
machdep.logical_cpus_mask: 2
----end----

Can I add
machdep.hyperthreading_allowed=1
to the sysctl.conf and reboot ?

My server is Dell SC1425 Xeon 3.0G
2x512MB ECC 1R

bigboy
07-01-2006, 04:06 AM
AMD64(939) Athlon 3000+

add line to sysctl.conf ?


machdep.hyperthreading_allowed=1