Home –  Archive
Monthly Archives: Oct 2012

NO DEFRAGMENTATION NEEDED IN LINUX

defragment in linux

We all must have heard about defragmenting our hard drives to speed up performance. Sound of that similar to windows users but we don’t have any defragment utility, hell, we don’t need to defragment! And why is that? Lets find out-

I remember when I was new to Linux, a friend of mine came with a hard disk and asked me to defragment it (yeah, we all have faced it).  It was easy in windows, how hard it could be in Linux?  I connected the spare bus to his hard disk and then started a mission to defragment via Linux. I can’t stress this enough that I was new to Linux and didn’t know much about how things work. After trying every bit I knew, looked up the mighty google and it came like a bolt from the blue- NO DEFRAGMENTATION NEEDED IN LINUX. </chitchat>

What do you mean by fragmentation of hard disk?

I’ll cover it in as short as possible; your hard disk is divided into sectors. These sectors are capable of storing small pieces of data. So, when the size of file is more than size of a sector then the file is saved over multiple sectors, as simple as that. As the new file comes, it is saved next to previous sector. But, when the size of first file increases, it might not find free sectors near original file so it will be saved few sectors apart, this goes on and on. While reading this file, the head will have to skip physical locations which ultimately will make things slower. Defragmentation is the process in which file is put back in continuous fashion so that there is no skipping of sectors.

Note: Defragmenting is not recommended for SSD drives. They have a different theory, doing so will reduce their life.

How it works in case of Linux?

Linux’s file systems deal with fragmentation in an intelligent way. Instead of placing files next to each other, it keeps a lot of space between the sectors of two files therefore leaving space for these files to grow. This keeps fragmentation far away, yet not impossible. Even if there are fragments, file system attempts to move the files thereby reducing the fragmentation. The system is designed to avoid fragmentation in normal use. You might face some fragmentation when your space fills up, may be 80% or 90%. The more suitable method to deal with it is to get a new hard drive with more space else you can copy your files to other drive, delete original files and then copy them back- they will be arranged automatically.

Linux kernel 3.6 released

It has been just two months or so since Linux 3.5 was unleashed, another update was released as Linux 3.6 on October 1st, 2012.

Torvalds said

“There haven’t been any huge new architectures or filesystems, it’s all ‘solid progress.’ That may not sound all that exciting, but the devil is in the details, and there’s a lot of small fixes all over.”

The most important and talked-about changes in Linux 3.6 are as follows:

1. Hybrid sleep

It now offers a mode which can be categorised as a hybrid of sleep mode and Hibernation. It first copies the contents of RAM on Hard Drive as it does in hibernate mode and then goes into sleep mode. What we get from this mode? The system won’t just resume quickly but no data will be lost on loosing power.

If the system power gets cut-off somehow, the system will resume from hibernated image, else the resume process will go normally as always and the hibernate image will be discarded.

2. TCP Fast Open

This feature was developed by Google, it helps in creating a TCP connection quickly in some cases. What we actually get from it? As per release notes, you will see improved page load times on popular websites. In Linux 3.6, client side is now supporting this feature. Server side coming soon.

3. Better drivers

In all Linux kernel updates, a lot of drivers are added to improve hardware support; this update is no different. This update primarily targets Sony and Apple devices.

4. Better memory management

Several changes were made for the betterment of memory management, a new feature is introduced which allows swap read-ahead IOPS (input/output operations per second) which promises more throughput along with lower CPU utilization.

Another good news is that now you can enjoy playing casino games online from your home. For that you can go to PartyCasino. You’ll love it, and perhaps you will win some money too! So try it now. Have a good day!