以前から噂のUbuntu10.04にミラクルパッチ。時間が経過したけど特にパッチを当てた副作用の報告もないので当ててみることにしました。
体感的には、少し早くなっています。OpenOfficeの初回起動には結構時間がかかっていましたがパッチを当てたあとは明らかに早くなっています。
Ubuntu10.04の場合は下記の赤い文字を入力するだけで良いので簡単です。
どうして効果があるのかは失念しました。
hoge@hoge-desktop:~$ cd /tmp
hoge@hoge-desktop:/tmp$ wget http://launchpadlibrarian.net/59511828/cgroup_patch
--2011-11-14 23:37:02-- http://launchpadlibrarian.net/59511828/cgroup_patch
launchpadlibrarian.net をDNSに問いあわせています... 91.189.89.228, 91.189.89.229
launchpadlibrarian.net|91.189.89.228|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 3476 (3.4K) [text/plain]
`cgroup_patch' に保存中
100%[======================================>] 3,476 --.-K/s 時間 0s
2011-11-14 23:37:02 (82.7 MB/s) - `cgroup_patch' へ保存完了 [3476/3476]
hoge@hoge-desktop:/tmp$ chmod +x cgroup_patch
hoge@hoge-desktop:/tmp$ sudo ./cgroup_patch
[sudo] password for hoge:
Patching [/home/hoge/.bashrc]...
Adding the patch...
if [ "$PS1" ] ; then
mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
echo $$ > /dev/cgroup/cpu/user/$$/tasks
echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
fi
Patching [/etc/rc.local]...
Adding the patch...
Making backup of /etc/rc.local in /etc/rc.local.backup.txt
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
exit 0
Making [/etc/rc.local] executable
Creating [/usr/local/sbin/cgroup_clean]...
#!/bin/sh
if [ "$*" != "/user" ]; then
rmdir /dev/cgroup/cpu/$*
fi
Making [/usr/local/sbin/cgroup_clean] executable
DONE. The patch has been applied. Restart your computer...
hoge@hoge-desktop:/tmp$
体感的には、少し早くなっています。OpenOfficeの初回起動には結構時間がかかっていましたがパッチを当てたあとは明らかに早くなっています。
Ubuntu10.04の場合は下記の赤い文字を入力するだけで良いので簡単です。
どうして効果があるのかは失念しました。
hoge@hoge-desktop:~$ cd /tmp
hoge@hoge-desktop:/tmp$ wget http://launchpadlibrarian.net/59511828/cgroup_patch
--2011-11-14 23:37:02-- http://launchpadlibrarian.net/59511828/cgroup_patch
launchpadlibrarian.net をDNSに問いあわせています... 91.189.89.228, 91.189.89.229
launchpadlibrarian.net|91.189.89.228|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 3476 (3.4K) [text/plain]
`cgroup_patch' に保存中
100%[======================================>] 3,476 --.-K/s 時間 0s
2011-11-14 23:37:02 (82.7 MB/s) - `cgroup_patch' へ保存完了 [3476/3476]
hoge@hoge-desktop:/tmp$ chmod +x cgroup_patch
hoge@hoge-desktop:/tmp$ sudo ./cgroup_patch
[sudo] password for hoge:
Patching [/home/hoge/.bashrc]...
Adding the patch...
if [ "$PS1" ] ; then
mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
echo $$ > /dev/cgroup/cpu/user/$$/tasks
echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
fi
Patching [/etc/rc.local]...
Adding the patch...
Making backup of /etc/rc.local in /etc/rc.local.backup.txt
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
exit 0
Making [/etc/rc.local] executable
Creating [/usr/local/sbin/cgroup_clean]...
#!/bin/sh
if [ "$*" != "/user" ]; then
rmdir /dev/cgroup/cpu/$*
fi
Making [/usr/local/sbin/cgroup_clean] executable
DONE. The patch has been applied. Restart your computer...
hoge@hoge-desktop:/tmp$
あと、再起動すれば完了。
0 件のコメント:
コメントを投稿