Thursday, August 9, 2012
Sunday, June 24, 2012
case study: irqbalance is not useful for AMD SMP
The original usage of IRQBALANCE is for Intel SMP (symmetric multi-processing CPU) that distributes attendant interrupts (IRQ) over the processors and cores. It is designed for finding a balance between power savings and optimal performance. Obviously, it is developed for Intel SMP at the moment of 2006 (you can find the article here), a time when Intel quad-core CPU has double group of two-cores sharing a single level 2 (L2) cache.
However, time always changes and IT industry flies faster. When AMD released its third generation SMP CPU in 2007, take quad-core Opteron™ for example, there is no shared L2 cache. All L1 and L2 caches are dedicated to reduce cache pollution, while they are sharing a large L3 cache for buffering main memory.
So IRQBALANCE is obsolete. Its latest release code is irqbalance-0.56, which is published at the same period in 2006. At old time, system may get some benefits from balancing IRQ distributed among groups of cache domains. Now, with dedicated L2 cache in AMD SMP, IRQ balancing will dampen performance, especially for Linux network stack of large steaming packets, where threading performance is much more critical than load balancing. Because each L2 cache is a separated one, switching IRQ between cores even between multi-way CPU sockets will increase cache missing rates. As a result, performance for handling SFB IRQ is decreased. On the other hand, if the same CPU handles the same IRQ almost all the time, the IRQ handler function will unlikely leave the CPU cache, boosting the kernel performance.
There are some complains about IRQBALANCE. Here, a Chinese post shows an example: <irqbalance服务可能拖累双核、多核cpu>. Also another example is here:
<Improving desktop performance in Fedora 14 by disabling irqbalance>.
To disable IRQBALANCE is quite easy. In Ubuntu, it is as follows:
ubuntu: set ENABLED=0 in /etc/default/irqbalance or sudo apt-get purge irqbalance
In Fedora, it is as follows:
fedora: service irqbalance stop or chkconfig irqbalance off or yum remove -y irqbalance
So IRQBALANCE is obsolete. Its latest release code is irqbalance-0.56, which is published at the same period in 2006. At old time, system may get some benefits from balancing IRQ distributed among groups of cache domains. Now, with dedicated L2 cache in AMD SMP, IRQ balancing will dampen performance, especially for Linux network stack of large steaming packets, where threading performance is much more critical than load balancing. Because each L2 cache is a separated one, switching IRQ between cores even between multi-way CPU sockets will increase cache missing rates. As a result, performance for handling SFB IRQ is decreased. On the other hand, if the same CPU handles the same IRQ almost all the time, the IRQ handler function will unlikely leave the CPU cache, boosting the kernel performance.
There are some complains about IRQBALANCE. Here, a Chinese post shows an example: <irqbalance服务可能拖累双核、多核cpu>. Also another example is here:
<Improving desktop performance in Fedora 14 by disabling irqbalance>.
To disable IRQBALANCE is quite easy. In Ubuntu, it is as follows:
ubuntu: set ENABLED=0 in /etc/default/irqbalance or sudo apt-get purge irqbalance
In Fedora, it is as follows:
fedora: service irqbalance stop or chkconfig irqbalance off or yum remove -y irqbalance
Sunday, June 17, 2012
Wednesday, May 30, 2012
Ubuntu 12.04: install Grub2 on a separated partition, not MBR
I am not talking about repairing Grub2 inside Ubuntu 12.04, I am talking about install Grub2 on a separated partition, not on Master Boot Record (MBR). The command line is simple, but not like what I used before:
option 1, not work:
testuser@pc:~$ sudo grub-install /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
option 2, not work:
testuser@pc:~$ sudo mount /dev/sda1 /mnt
testuser@pc:~$ sudo grub-install --boot-directory=/mnt/boot /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
option 3, not work:
testuser@pc:~$ sudo mount /dev/sda1 /mnt
testuser@pc:~$ sudo grub-install --force --boot-directory=/mnt/boot /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: cannot read `/mnt/boot/grub/core.img' correctly.
option 1, not work:
testuser@pc:~$ sudo grub-install /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
option 2, not work:
testuser@pc:~$ sudo mount /dev/sda1 /mnt
testuser@pc:~$ sudo grub-install --boot-directory=/mnt/boot /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
option 3, not work:
testuser@pc:~$ sudo mount /dev/sda1 /mnt
testuser@pc:~$ sudo grub-install --force --boot-directory=/mnt/boot /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: cannot read `/mnt/boot/grub/core.img' correctly.
option 4, works!
testuser@pc:~$ sudo grub-install --force /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
Tuesday, May 22, 2012
Sunday, January 22, 2012
RAID_0 performance on SUN x4240 box
September 06, 2010: RAID_0 performance on SUN x4240 box
I re-post this article that was posted years ago. Hope it will be more beneficial. :)
This hard drive benchmark is maily testing on the RAID 0 performance over SUN Fire x4240 server box. The hardware information and software information are:
I re-post this article that was posted years ago. Hope it will be more beneficial. :)
This hard drive benchmark is maily testing on the RAID 0 performance over SUN Fire x4240 server box. The hardware information and software information are:
Saturday, January 21, 2012
Subscribe to:
Posts (Atom)