Linux Kernel 2.4.x revisited
This talk is somewhat of an add-on to my other speech about the 2.4.x Kernels series. Please look at that page for information that is related to it:
Kernel 2.4.x Original Talk
This is a discussion on the kernel series now that it is out and in the prime. A large amount of what I have to say now is contrary to what I stated then, now that the series has had some time to mature and has had some of the bugs worked out.
New Features in the 2.4 Kernel
This is an email where someone went through the time to list out the new things in the 2.4.x series kernels. It is a good read and is non-technical enough to let everyone understand what is going on.
Great New Additions to the Kernel:
Journaling File Systems:
Being added into the kernel now are several new file systems: ReiserFS, XFS, ext3 and JFS (ReiserFS has been merged since 2.4.1). These systems are no longer required to go through a lengthy fsck process if they are un-mounted incorrectly or not at all. Instead a journal of the activities of the partition is kept as well as a snapshot of the partition at a certain time. If the drive needs to be reconstituted after a messy reboot it is simply synced to the last snapshot and then all the journal entries since that snapshot are ran to make the partition the same as when the computer was turned off.
DevFS:
Finally it is ready from primetime. This system will allow a user to remove all the needless entries from the /dev directory. Gone are the days of 3000 entries in that directory (most of them for hardware that you have never seen or even heard of). Now it is possible to have a “clean” /dev directory containing 300-500 entries of hardware that is in the machine. This makes Linux easier to use in several ways. It is easy to tell if your machine recognized the hardware that you just added or recompiled the kernel for. No more wading around in /dev trying to remember the naming scheme for an obscure piece of hardware, and it is possible to tell how many drive partitions and disks there are without running any commands other than ‘ls’. DevFS is the first step in something that may cause a fork in the kernel tree. Linus has decided that the static Major and Minor system for /dev will no longer be allowed and that no more devices will be added to it, instead he wants a dynamic system, while Alan has stated that he will keep the static system in his tree until and alternate system is developed and completely implemented. Linus is looking at it as a system to make people do it correctly, while Alan wants the system to continue to work until someone builds a better system.
Zero Copy Networking:
Along with the new networking code (as of kernel version 2.4.4) Zero copy Networking has been added. This allows some networking cards to pull data right out of kernel memory (and regular memory on some) and send it out the network card. This cuts down on kernel overhead and allows for faster transfers of data for applications such as FTP and NFS.
Processor Optimizations:
New in the 2.4.x kernels is the ability to have the kernel optimized for specific CPUs. There are now fifteen different chips that the kernel can be compiled for. Among the more notables are Athlon, Pentium 4, Winchip and Cursoe. UPDATE: Apparently the Athlon optimizations can stress some of the chipsets and CPU buses. If you experience weirdness with high-end Athlon systems then compile the kernel for a K6 instead.
Problems With the 2.4.x Kernels:
VIA chipsets:
Currently there are real issues with the VIA chipsets that are used with Athlon motherboards. These range from data corruption to random reboots to poor system performance. Any motherboards that are ran by AMD chipsets are supposed to be fine with the newer kernels. A large amount of the people that us these chipsets want to use their IDE connections with DMA enabled, but the problems with the chipsets do not always allow them to work correctly.
APCI:
This is a real struggle under 2.4.x . Currently, APM is a better choice for those that want to have their machines power managed. Just about everything that has to do with this is broke and there are major rewrites being done in the code.
Swapping and Paging:
Currently there are some problems with the swapping system. The 2.4.x kernels have trouble reclaiming swap space that has already been used and pages that have been swapped out. The 2.4.5-acX series has started to fix these problems, but it could be a little bit before they are truly ironed out. Currently 2x total system memory is recommended for swap. This is also being worked out.
Performance Issues:
Between kernels 2.4.3 and 2.4.5 there were performances issues that developed causing the system to be 5%-10% slower than pre-2.4.3 kernels. These also seem to have been ironed out in the 2.4.5-acX series of kernels, though they are popping up every now and then on some systems. Hopefully now that they have been fixed in the –ac series the fixes will be merged into Linus’s tree.
NTFS:
Read support is great! Write support is optimistically called “Extremely Dangerous”. All advice on NTFS write support is as follows: “Don’t use it. If you do use it then make sure you have all your data backed up and then only use it if you are a developer.”
UPDATE:
Recently it has come to light that Database writes (Oracle is currently the talked about one) on ReiserFS+LVM filesystems are 100% slower than writes to a EXT2 filesystem. This is caused by slowdowns in both the ReiserFS code as well as the LVM code and specific filesystem actions that are used by Oracle.
Summary:
Well to those that read my previous pages and heard my previous talks this will seem like a turn around, but the new kernels are worth the upgrade. The new DevFS stuff, journaling file systems, and networking improvements are definitely worth it. The virtual machine improvements are also a great improvement. The problems that I have talked about are transient problems and they fade in and fade out of the kernels. They can be annoying and troublesome, but they are worth the trouble for the increased speed and performance that the 2.4.x series brings you.
Related Links:
LVM-How-To (One of the new features in the 2.4 Kernel)
Kernel How-To (Helpful in compiling the Kernel)
Information on what is planned for Kernel series 2.5