Archive for the ‘ Lunix ’ Category

How to change default I/O scheduler

How to change default I/O scheduler? | Planet Admon.

Red Hat Enterprise Linux 3 with a 2.4 kernel base uses a single, robust, general purpose I/O elevator. The I/O schedulers provided in Red Hat Enterprise Linux 4, embedded in the 2.6 kernel, have advanced the I/O capabilities of Linux significantly. With Red Hat Enterprise Linux 4, applications can now optimize the kernel I/O at boot time, by selecting one of four different I/O schedulers to accommodate different I/O usage patterns:

* Completely Fair Queuing—elevator=cfq (default)
* Deadline—elevator=deadline
* NOOP—elevator=noop
* Anticipatory—elevator=as

The I/O scheduler can be selected at boot time using the “elevator” kernel parameter. In the following example, the system has been configured to use the deadline scheduler in the grub.conf file.

title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/vg0/lv0 elevator=deadline
initrd /initrd-2.6.18-8.el5.img

In Red Hat Enterprise Linux 5, it is also possible to change the I/O scheduler for a particular disk on the fly.

# cat /sys/block/sdb/queue/scheduler
noop anticipatory deadline [cfq]
# echo ‘deadline’ > /sys/block/sdb/queue/scheduler
# cat /sys/block/sdb/queue/scheduler
noop anticipatory [deadline] cfq

The following are the tunable files for the deadline scheduler. They can be tuned to any suitable value according to hardware performance and software requirements:

/sys/block/DEVNAME/queue/iosched/read_expire
/sys/block/DEVNAME/queue/iosched/write_expire
/sys/block/DEVNAME/queue/iosched/fifo_batch
/sys/block/DEVNAME/queue/iosched/write_starved
/sys/block/DEVNAME/queue/iosched/front_merges

DEVNAME is the name of block device (such as sda, sdb, hda, etc)

A detailed description of the deadline I/O scheduler can be found at:
/usr/share/doc/kernel-[version]/Documentation/block/deadline-iosched.txt.

http://www.redhat.com/magazine/008jun05/features/schedulers/

http://www.redbooks.ibm.com/abstracts/redp4285.html

Random read performance per I/O elevator (synchronous)

Random read performance per I/O elevator (synchronous)

CPU utilization by I/O elevator (asynchronous)

CPU utilization by I/O elevator (asynchronous)

 Impact of nr_requests on the Deadline elevator (random write ReiserFS)

Impact of nr_requests on the Deadline elevator (random write ReiserFS)

Impact of nr_requests on the CFQ elevator (random write Ext3)

Impact of nr_requests on the CFQ elevator (random write Ext3)

Random write throughput comparison between Ext and ReiserFS (synchronous)

Random write throughput comparison between Ext and ReiserFS (synchronous)

 Random write throughput comparison between Ext3 and ReiserFS (asynchronous)

Random write throughput comparison between Ext3 and ReiserFS (asynchronous)

Avoid race condition for file creation

race condition in the common lock on file? – Stack Overflow.

A possible solution to this is to use IO redirection and bash’s noclobber mode, which won’t redirect to an existing file. We can use something similar to:

if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null;
then
   # BK: this will cause the lock file to be deleted in case of other exit
   trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT

   # critical-section BK: (the protected bit)

   rm -f "$lockfile"
   trap - INT TERM EXIT
else
   echo "Failed to acquire lockfile: $lockfile."
   echo "Held by $(cat $lockfile)"
fi

Adobe Labs: Flash Player “Square” Preview Release

Adobe Labs – Downloads: Flash Player “Square” Preview Release.

Flash Player “Square” Preview Release

This page contains download information for the developer preview release of Adobe® Flash® Player “Square” (codename). Flash Player “Square” enables 64-bit and enhanced Internet Explorer 9 support. Release versions of Flash Player 10.1 are available from the Flash Player Download Center on Adobe.com.

Learn more about Flash Player “Square”

By downloading the software listed below, I acknowledge that I have read and agreed to the terms of the Flash Player “Square” License, the Adobe.com Terms of Use and the Adobe Online Privacy Policy.

Flash Player “Square”

Version Preview 2
Date Sep 27, 2010

The following downloads provide the Flash Player “Square” installers for Linux, Mac and Windows operating systems. This preview release is designed for evaluation purposes only. We do not recommended that this release be used on production systems or for any mission-critical work.

Important: Please note that if you install the Flash Player “Square” preview, you will need to keep this version up to date by manually installing updates from the Flash Player “Square” download page on Adobe Labs. You will not receive automatic update notifications for future final releases of Flash Player, and you will need to manually uninstall Flash Player “Square” before installing a final shipping version of Flash Player.