http://boxgrinder.org/
Tuesday, November 8, 2011
Saturday, October 8, 2011
ext3/ext4-Performance-RHEL 6
EMC Backend AX4-5F. RAID-10 12 600G 1k Drives in 4G Qlogic Fibre.
So what does dd does on the ext3 filesystems and ext4 ones. with 8MB block size
dd if=/dev/zero of=aman2 bs=8192 count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 8.50084 s, 964 MB/s
4MB block
dd if=/dev/zero of=aman2 bs=4192 count=1000000
1000000+0 records in
1000000+0 records out
4192000000 bytes (4.2 GB) copied, 6.19781 s, 676 MB/s
Now with ext3
dd if=/dev/zero of=aman3 bs=8192 count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 13.7891 s, 594 MB/s
iostat is still active after these 13 secs flushing data to the disk
10/08/2011 02:23:49 PM
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 2.56 10.57 0.00 86.88
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 4790.00 0.00 101200.00 0 101200
sdd 5272.00 0.00 103056.00 0 103056
sde 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
emcpowera 10063.00 0.00 204256.00 0 204256
dm-0 43984.00 0.00 351872.00 0 351872
Seems like ext4 is beating the hell out of ext3.Althoigh dd is not a pure performance testing but it gives a little pinch as to what to expect.
So what does dd does on the ext3 filesystems and ext4 ones. with 8MB block size
dd if=/dev/zero of=aman2 bs=8192 count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 8.50084 s, 964 MB/s
4MB block
dd if=/dev/zero of=aman2 bs=4192 count=1000000
1000000+0 records in
1000000+0 records out
4192000000 bytes (4.2 GB) copied, 6.19781 s, 676 MB/s
Now with ext3
dd if=/dev/zero of=aman3 bs=8192 count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 13.7891 s, 594 MB/s
iostat is still active after these 13 secs flushing data to the disk
10/08/2011 02:23:49 PM
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 2.56 10.57 0.00 86.88
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 4790.00 0.00 101200.00 0 101200
sdd 5272.00 0.00 103056.00 0 103056
sde 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
emcpowera 10063.00 0.00 204256.00 0 204256
dm-0 43984.00 0.00 351872.00 0 351872
Seems like ext4 is beating the hell out of ext3.Althoigh dd is not a pure performance testing but it gives a little pinch as to what to expect.
Saturday, October 9, 2010
Event Based Model-Ubuntu Boot Up Explained
http://www.linuxplanet.com/linuxplanet/tutorials/7033/1/
Ubuntu's Success Story: the Upstart Startup Manager (Linux Boot Camp p.2)
Controlling Boot Sequence, What is Event-Based

Akkana Peck
Thursday, April 8, 2010 11:32:09 AM
Boot Camp Part I explained how Linux boots, using the old "SysV init" system of scripts. But some modern Linux distros have been gradually migrating to a newer model, called Upstart.
Upstart has been around since 2006, but it's only in the last year or so that it's taken a major role in booting distributions like Ubuntu and Fedora. Debian and OpenSuSE are reportedly joining in soon, while it's available as an optional component on most other distros. No distro uses it as the sole boot method yet: even Fedora 12 and the upcoming Ubuntu 10.04 keep a lot of functionality in SysV scripts.
Upstart, in contrast, is event based. An "event" can be something like "booting" ... or it can be a lot more specific, like "the network is ready to use now". You can specify which scripts depend on which events. Anything that isn't waiting for an event can run whenever there's CPU available.
This event-based system has another advantage: you can theoretically use it even after the system is up and running. Upstart is eventually slated to take over tasks such as or plugging in external devices like thumb drives (currently handled by udev and hal), or running programs at specific times (currently handled by cron).
Currently, however, Upstart is used primarily for booting and shutdown, and it's not clear when we'll see it used for other purposes.
On most systems, including Fedora and released Ubuntu systems, Upstart uses /etc/event.d. But in Ubuntu's upcoming release that changes to /etc/init. Yes, that means Ubuntu 10.04 systems have both /etc/init, for Upstart, and /etc/init.d, for the old SysV files. Not only that, but if you upgrade from an earlier version of Ubuntu and you've put anything nonstandard in /etc/event.d, you'll have to migrate it by hand -- the upgrader does not do any migration (bug 402759.)
I mentioned that Upstart doesn't use /etc/init.d. But all Upstart-using distros still include that directory. Some of the files in it are regular SysV Init scripts that haven't been migrated yet. But some services that have migrated maintain a link from /etc/init.d to /lib/init/upstart-job. If you run one of those, it works, but it prints a warning first:
The beginning of the boot sequence is still the same. The computer's BIOS boots grub (or another boot loader) from the disk; grub loads the kernel and then passes control to the init process.
But on an Upstart machine, init comes from upstart. Instead of running a master rc script that calls the scripts for a specific runlevel, Upstart's init takes jobs from its job directory.
Events can be more detailed than that, For instance, Upstart knows about runlevels. The file rc2.conf, whose job is to run all those old SysV files in /etc/rc2.d, includes this:
Ubuntu's Success Story: the Upstart Startup Manager (Linux Boot Camp p.2)
Controlling Boot Sequence, What is Event-Based
Akkana Peck
Thursday, April 8, 2010 11:32:09 AM
Boot Camp Part I explained how Linux boots, using the old "SysV init" system of scripts. But some modern Linux distros have been gradually migrating to a newer model, called Upstart.
Upstart has been around since 2006, but it's only in the last year or so that it's taken a major role in booting distributions like Ubuntu and Fedora. Debian and OpenSuSE are reportedly joining in soon, while it's available as an optional component on most other distros. No distro uses it as the sole boot method yet: even Fedora 12 and the upcoming Ubuntu 10.04 keep a lot of functionality in SysV scripts.
An event-based model
The normal SysV boot process is synchronous -- meaning things happen one at a time, one after the other. First you run S10sysklogd, and only when that's finished you can start running S11klogd. If anything in the boot process takes a long time, everything else has to wait.Upstart, in contrast, is event based. An "event" can be something like "booting" ... or it can be a lot more specific, like "the network is ready to use now". You can specify which scripts depend on which events. Anything that isn't waiting for an event can run whenever there's CPU available.
This event-based system has another advantage: you can theoretically use it even after the system is up and running. Upstart is eventually slated to take over tasks such as or plugging in external devices like thumb drives (currently handled by udev and hal), or running programs at specific times (currently handled by cron).
Currently, however, Upstart is used primarily for booting and shutdown, and it's not clear when we'll see it used for other purposes.
New directories
Upstart eschews the old /etc/init.d and /etc/rcN.d in favor of a new directory containing "job definition files". And here's a point of confusion: it doesn't have a standard name.On most systems, including Fedora and released Ubuntu systems, Upstart uses /etc/event.d. But in Ubuntu's upcoming release that changes to /etc/init. Yes, that means Ubuntu 10.04 systems have both /etc/init, for Upstart, and /etc/init.d, for the old SysV files. Not only that, but if you upgrade from an earlier version of Ubuntu and you've put anything nonstandard in /etc/event.d, you'll have to migrate it by hand -- the upgrader does not do any migration (bug 402759.)
I mentioned that Upstart doesn't use /etc/init.d. But all Upstart-using distros still include that directory. Some of the files in it are regular SysV Init scripts that haven't been migrated yet. But some services that have migrated maintain a link from /etc/init.d to /lib/init/upstart-job. If you run one of those, it works, but it prints a warning first:
$ sudo /etc/init.d/dbus restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service dbus restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart dbus
Boot sequence
How does the boot sequence change with Upstart?The beginning of the boot sequence is still the same. The computer's BIOS boots grub (or another boot loader) from the disk; grub loads the kernel and then passes control to the init process.
But on an Upstart machine, init comes from upstart. Instead of running a master rc script that calls the scripts for a specific runlevel, Upstart's init takes jobs from its job directory.
Job definition files
A typical Upstart job definition file looks like this:$ cat /etc/event.d/hostname.conf
# hostname - set system hostname
#
# This task is run on startup to set the system hostname from /etc/hostname,
# falling back to "localhost" if that file is not readable or is empty and
# no hostname has yet been set.
description "set system hostname"
start on startup
task
exec hostname -b -F /etc/hostname
In this simple case, the hostname job runs when Upstart sees a startup event. Events can be more detailed than that, For instance, Upstart knows about runlevels. The file rc2.conf, whose job is to run all those old SysV files in /etc/rc2.d, includes this:
start on runlevel 2
stop on runlevel [!2]
udev.conf includes: start on virtual-filesystems
stop on runlevel [06]
virtual-filesystems is an event indicating that filesystems such as /dev and /proc have been mounted. It's sent by another Upstart job: $ cat mountall.conf
# mountall - Mount filesystems on boot
#
# This helper mounts filesystems in the correct order as the devices
# and mountpoints become available.
description "Mount filesystems on boot"
start on startup
stop on starting rcS
expect daemon
task
emits virtual-filesystems
emits local-filesystems
emits remote-filesystems
emits all-swaps
emits filesystem
emits mounting
emits mounted
[ ... rest of script ]
All these signals will be emitted when the mountall job completes successfully. Then Upstart can start jobs like udev that are waiting for one of those events. Jobs can depend on more than one event:
Monday, September 27, 2010
Disk Aligment -Clarrion
http://spiralbound.net/2008/06/09/creating-linux-partitions-for-clariion
Creating a properly offset slab of disk for Linux systems on your CLARiiON is not just a matter of creating a partition using the default
To get around this, you have to align the partition in such a way that it will start writing data on a sector that will mesh up nicely with the stripe element size. In this case, 128. Below is an example of how I create partitions on our CLARiiON for Linux systems. Check out the EMC Best Practices for Fibre Chanel storage white paper for more detail.
Creating a properly offset slab of disk for Linux systems on your CLARiiON is not just a matter of creating a partition using the default
fdisk values. The reason for this is that disk management utilities for Intel based systems generally write 63 sectors of metadata directly at the beginning of the LUN. The addressable space begins immediately after these initial sectors causing the CLARiiON to cross disks, especially when writing larger IO because it doesn’t match up with the stripe element size (usually 64k).To get around this, you have to align the partition in such a way that it will start writing data on a sector that will mesh up nicely with the stripe element size. In this case, 128. Below is an example of how I create partitions on our CLARiiON for Linux systems. Check out the EMC Best Practices for Fibre Chanel storage white paper for more detail.
/sbin/fdisk /dev/emcpowera Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 39162. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-39162, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-39162, default 39162): Using default value 39162 Command (m for help): x Expert command (m for help): b Partition number (1-4): 1 New beginning of data (63-629137529, default 63): 128 Expert command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Thursday, July 15, 2010
Ubuntu 10.04 Lucid Software Raid Bug
This is what you get after install.
mount: mounting /dev/disk/by-uuid/***uuid snipped*** on /root failed: Invalid argument
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init= bootarg.
Install any older version 8.04 or 8.10. Then install lucid and reformat the mds.
mount: mounting /dev/disk/by-uuid/***uuid snipped*** on /root failed: Invalid argument
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init= bootarg.
Install any older version 8.04 or 8.10. Then install lucid and reformat the mds.
Thursday, May 27, 2010
Ubuntu-ext4 umount Takes Long time-BUG
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/543617
Fix Released in 10.04
Fix Released in 10.04
Saturday, May 8, 2010
Subscribe to:
Posts (Atom)