Why is defragmenting unnecessary in Ubuntu?
The underlying filesystems used by Ubuntu, like ext2 and ext3, simply don't need defragmenting because they don't fragment files in the same way as NTFS. There are more details at ext3 - Wikipedia, the free encyclopedia
Fragmentation is the product of writing files in the first available open blocks on a drive. Over time, as files get created and deleted, small sections of disk open up, which causes newly written files to be split over several such openings. This can reduce performance, although it was much more of a problem in the past with slow hardware and slow disks.
The default filesystem in Ubuntu, ext4 (and until recently, ext3) are designed to limit fragmentation of files as far as possible. When writing files, it tries to keep the blocks used sequential or close together. This renders defragmentation effectively unnecessary.
See this link. It gives quite a detailed explanation of how files are stored in Windows and in Linux, and why Linux filesystems usually do not need to be defragmented.
Ext4 Howto - Ext4 According to this article ext4 defragments on the fly but they are working on a defrag tool. I personally don't think it is needed except maybe for file servers that get heavy use.