Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: [News] Linux Filesystems Do Not Suffer Fragmentation. Here's Why.

It happens that Lawrence D'Oliveiro formulated :
In message <7471666.eJY3XFx0ak@xxxxxxxxxxxxxxx>, Roy Schestowitz wrote:

Why doesn't Linux need defragmenting?

Or, from <http://trends.newsforge.com/article.pl?sid=06/07/21/192241>:

    The first filesystem was XFS, which showed clear color lines with small
    amounts of fragmentation visible as the files moved around the disk in
    the highly accelerated animation. The other filesystem he showed was
    NTFS, which resembled static as you might see on a television that is
    not receiving signal, as the filesystem allocated blocks wherever it
    could find room without much apparent planning.

This bits more interesting....

Why userspace sucks

Dave Jones, maintainer of the Fedora kernel, gave his "Why Userspace Sucks - (Or, 101 Really Dumb Things Your App Shouldn't Do)" talk in the afternoon for a standing-room only crowd. Jones' talk focused on his efforts at reducing the boot time in Fedora Core 5 (FC5), and the shocking discoveries he made along the way.

He started his work by patching the kernel to print a record of all file accesses to a log to look for waste. He found that, on boot, FC5 was touching 79,000 files and opening 26,000 of them. On shutdown, 23,000 files were touched, of which 7,000 were opened.

The Hardware Abstraction Layer (HAL) tracks hardware being added and removed from the system, to allow desktop apps to locate and use hardware. Jones says that HAL takes the approach "if it's a file, I'll open it." HAL opened and reread some XML files as many as 54 times, he found. CUPS, the printer daemon, performed 2,500 stat() calls and opened 500 files on startup, as it checked for every printer known to man.

X.org also goes overboard, according to Jones. Jones showed that X.org scans through the PCI devices in order of all potential addresses, followed by seemingly random addresses for additional PCI devices, before starting over and giving up. He paid special attention to X fonts, noting that he found that X was opening a large number of TrueType fonts on his test system.

To see what it was up to, he installed 6,000 TrueType fonts. Gnome-session, he found, touched just shy of 2,500 of them, and opened 2,434 fonts. Metacity opened 238, and the task bar manager opened 349. Even the sound mixer opened 860 fonts. The X font server, he found, was rebuilding its cache by loading every font on the system. He described the font problems as bizarre.

The next aspect of his problem identification was timers. The kernel sucks too, he said: USB fires a timer every 256 milliseconds, for example. The keyboard and mouse ports are also polled regularly, to allow support for hot-pluggable PS/2 keyboards and mice. And the little flashing cursor in the console? Yes, its timer doesn't stop when X is running, so the little console cursor will continue to flash, wasting a few more CPU cycles.



[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index