The differences between Linux IO Scheduler

The Linux kernel input/output scheduler (IO Schedulers) controls the way the kernel handles read/write to disks. Different I/O schedulers may have different impact on certain workloads. Here are the list of available Linux I/O schedulers:

1) Noop
Noop scheduler is the simplest IO scheduler available in the kernel. It does not perform sorting or seek-prevention. It is intended for devices that has no mechanical parts or is capable of random access such as SSD or flash-disk.

2) Anticipatory (AS)
Anticipatory is the default I/O scheduler for Linux kernel (2.6.x) until it was replaced by CFQ. It tries to optimize disk I/O by minimizing disk seeking/head movement whenever possible. However, it does has performance impact on file and database servers

3) Deadline
As the name implies, the deadline scheduler imposes deadline on all operations. This is to prevent resource starvation, so that every operation can be completed on time without being starved by other operations. The kernel documentation suggests Deadline scheduler to be used on storage and database servers

4) Completely fair-scheduling (CFQ)
CFQ tries to allocate the same resources to all users in the same time interval, hence the name. It tries to allocate fair amount of resources to all users, which would be ideal to use this on a multi-user/multi-purpose system. It is the default scheduler for Linux kernel since 2.6.18.

Debian: Force users to use more secure login password with pam_cracklib

One of the factor that makes your system easily crackable is the weak password. PAM cracklib forces users to choose stronger password by analyzing the password strength, length and entropy.

To enable pam_cracklib in Debian / Ubuntu operating system, you need to install libpam_cracklib:

sudo apt-get install libpam_cracklib

Then edit the “/etc/pam.d/common-password” file using your favorite editor. Then, add and uncomment the following line at the end of the file.

password required pam_cracklib.so retry=3 minlen=6 difok=3

difok determines the number of same characters that allowed to be present in the old and new passwords.

Ubuntu: How to erase CD-RW/DVD-RW from Command-line

Here’s an easy way to erase CD-RW and DVD-RW from command-line in Ubuntu:

you only need to install ‘wodim’ package:
sudo apt-get install wodim
Then run:
wodim -scanbus
To search for the cdrw device in case if you don’t already know.

To erase the entire disk, run:
wodim dev=/dev/cdrom blank=fast

That’s all!

Happy New Year – 2011

Though slightly belated, I would like to wish Happy New Year to my readers, I’m still alive btw, altough swamped with work, battling anxiety, more on that later.

Buzz!! – Yahoo like IM shake with Pidgin Nudge plugin

I think most of you may have already migrated to Empathy, the default Instant Messenger client for the GNOME desktop environment. But I still use Pidgin IM because I like its functionality and its expandable plugin architecture.

I am a Yahoo Messenger user, and one thing that I miss about when using Pidgin (either on Linux or Windows) is the “shake-effect” whenever I receive “Buzz” or “ding” from my contacts. Back in 2003 (when Pidgin still was called Gaim) I tried replicating that effect, but to no avail. However, just a couple of weeks ago I discovered “pidgin-nudge“, a plugin that shakes conversation window when it receives “Buzz”,”nudge” or “ding” from contacts. Here’s how it looked :

Installing pidgin-nude on Ubuntu linux is easy! First make sure you have Pidgin 2.6.x and above installed. Then you have to install “pidgin-dev” package alongside with “build-essential” to compile the plugin source code, as shown in the example below.


sudo apt-get install subversion pidgin-dev build-essential
svn checkout http://pidgin-nudge.googlecode.com/svn/trunk/ pidgin-nudge-read-only
cd pidgin-nudge-read-only
make
sudo make install

Happy Buzzing!