1.關於Solaris offline CPU Thread,
提供如下所述方式, 若目前
提供如下所述方式, 若目前
2 socket, 每個socket有8 core, 每個core有8 個thread,
但僅想讓DB使用一個socket的license
可以把指令放在/etc/rc2.d的某一支script下, 例如S25psradm
#!/bin/sh
psradm -f 64-127
|
設定完畢後重開機, 並驗證:
psrinfo
|
Ref:
2.針對Linux環境原來也可以offline CPU processor
ref: http://linuxnewgen.blogspot.tw/2010/12/enable-and-disable-cpu-in-rhel.html
ref: http://linuxnewgen.blogspot.tw/2010/12/enable-and-disable-cpu-in-rhel.html
enable and disable CPU in RHEL
Release:
RedHat Enterprise Linux Server 5
Problem:
Need to disable and enable the processor
Solution:
1) To disable the cpu use the below command
# echo 0 > /sys/devices/system/cpu/cpuX/online
Note: Here X indicates the cpu number
2) To enable the cpu use the below command
# echo 1 > /sys/devices/system/cpu/cpuX/online
3) To check the number of cpu in a server use the below command
# grep "processor" /proc/cpuinfo | wc -l
把script放到init.d 成為service :
# chkconfig: 345 99 01
#! /bin/sh
case "$1" in
start)
echo 0 > /sys/devices/system/cpu/cpu1/online
cat /proc/cpuinfo |grep processor
;;
stop)
echo "re-enable cpu processors"
echo 1 > /sys/devices/system/cpu/cpu1/online
cat /proc/cpuinfo |grep processor
;;
esac
exit 0
2.新增dis_cpu 成為 service
chkconfig --add dis_cpu
3.reboot後, 使用指令check
cat /proc/cpuinfo |grep processor
沒有留言:
張貼留言