Skip to contentSkip to conversation

Re: [reiserfs-dev] [[email protected]: Debian Woody Performance with ReiserFS]

reiserfs-dev Nikita Danilov 2 participants 2 messages Nov 11, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

[Ed Boraas CC-ed, probably this is of interest for Debian people.]

Quoted 50 lines · Corey G.

My Problem and Solution to Bad Performance Using Debian Woody and ReiserFS
--------------------------------------------------------------------------

My first three attempts with ReiserFS and Woody were quite dismal. Not with the installation, but with performance. I was quite literally pulling hair out of my head because ReiserFS on Mandrake 9 performs remarkably in my opinion. Why would it work so awful with Debian 3.0? Note: By design, the default boot disks for Debian 3.0 do not contain ReiserFS support. In order to install ReiserFS during an initial installation, you must download the BF2.4 disks which have "experimental drivers". I have seen many comments on the web wondering why Debian still thinks Reiser is experimental. It must be driven by the ultra conservatism of Debian. Regardless, ReiserFS is available for Debian Woody.

Addressing the Problem:
-----------------------
My first assumption was the kernel, so I upgraded to 2.4.19. No such luck. Untarring Mozilla took 3m24s on an Athlon 800mzh with 1GB RAM. The same test took 6 seconds on Mandrake on the same system. After digging into the problem I finally came to the conclusion that Mandrake, and probably other distributions, are tuning the hard drives during installation or boot. I dug around and found some rather safe settings to implement using "hdparm". After applying the changes below, my Debian system came to life. Now I could untar at the speed of light and still use my mouse at the same time.

So, for whatever reason, Debian has chosen to be quite conservative with assumptions on hard drive tuning. I will admit that some of the parameters I tried locked up my machine. However, even the more conservative settings work very nice. My concern here is that other individuals are certainly going to experience this problem with Debian besides myself. Another colleague here said he went back to ext2 because the performance was horrible with ReiserFS on Debian. Unfortunately, this individual refuses to try other distributions so he never had anything to compare. Had I not seen the incredible performance on Mandrake, I would have assumed that ReiserFS was a very slow filesystem.

To prove my theory about Mandrake pre-tuning the drives during boot, I had a colleague run hdparm on his Mandrake 9 installation. Here is the output:

/dev/hda:

 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
Quoted 6 lines

geometry = 1292/240/63, sectors = 19541088, start = 0

These settins were NOT on by default with Debian. The most important (I know this from testing) is "using_dma". After turning this on, things really start to move.

Probably this is because not using DMA increases CPU usage and reiserfs already loads CPU significantly.

Quoted 16 lines

Here are my current settings with Debian:

/dev/hda:

 multcount    = 16 (on)
 I/O support  =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 nowerr       =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)

geometry = 4866/255/63, sectors = 78177792, start = 0
busstate = 1 (on)

Quoted 6 lines

I simply added a start script to /etc/init.d with the following:

#!/bin/sh

hdparm -m 16 -d 1 -u 1 -c 1 /dev/hda

You can also use -X option of hdparm.

Thank you for your research.

Quoted 5 lines
Signature · 3 lines
-- 
Best Regards,
Corey G.

Nikita.

#2 lore raw
Quoted 6 lines · Nikita Danilov

[Ed Boraas CC-ed, probably this is of interest for Debian people.]

Quoted 3 lines · Corey G.

These settins were NOT on by default with Debian. The most important (I know this from testing) is "using_dma". After turning this on, things really start to move.

Having worked quite a bit with Debian on decently sized IDE machines, I can't say I've ever heard of Debian doing anything with hdparm in the init scripts. 'grep hdparm /etc/init.d/*' returns nothing.

In addition the Debian woody system I had running DMA100 with 7200rpm drives with Reiserfs burnt from day one (well, there was a cap because of the pretty ancient other hardware, but it was old enough hardware I was testing that it made sense that there'd be a hit on disk performance)

Ed - are you sure the kernel hasn't detected a bad drive/controller combination and has *intentionally* disable UDMA to prevent data corruption? Are you using the Good/Bad Drive Firmware protection?

Something seems odd to me...

Signature · 9 lines
Ross Vandegrift
[email protected]

A Pope has a Water Cannon.				 It is a Water Cannon.
He fires Holy-Water from it.			    It is a Holy-Water Cannon.
He Blesses it.				       It is a Holy Holy-Water Cannon.
He Blesses the Hell out of it.		It is a Wholly Holy Holy-Water Cannon.
He has it pierced.		  It is a Holey Wholly Holy Holy-Water Cannon.
Batman and Robin arrive.				       He shoots them.