Subject: Re: Fileserver advice (hardware)
To: Amadeus <poff@sixbit.org>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-users
Date: 02/09/2004 09:35:36
On Mon, 9 Feb 2004, Amadeus wrote:

> I am thinking of running  asimple netbsd fileserver on my network to serve
> files to windows users (samba) (maybe 4-8 computers, fairly intensive).
>
> I want to know if there are any big limitations using an old PC (266mhz) to
> do this.
>
> I was thinking of buying maybe a pci scsi card and a scsi hard drive, but I
> don't know if this will make a difference in performance from an ide hard
> drive, at the most ata 100.
>
> When you a running a fileserver, what are the biggest hardware
> limitations? CPU? Memory?

The IDE drives, next CPU, because slow IDE drives use a lot of CPU.
Memory is hardly an issue.

> I can only have a 100mb/s ethernet card as the interface, so presumably
> it's not too important to upgrade the hard drive. I also have a 166 pentium
> PC with EDO ram, but maybe that's pushing things a little.
>
> Any tips or advice?

The speed rating of the IDE drives doesn't tell the whole story. The
controller hardware, even when it does DMA, just isn't as efficient as
SCSI with tagged queueing. This fellow...

NetBSD 1.6.2 (TAUTOLOGY) #25: Tue Feb  3 20:16:42 CST 2004
 fredb@tautology.immanent.net:/t/i386-release/TAUTOLOGY
cpu0: AMD K6-2 (586-class), 500.21 MHz
cpu0: I-cache 32 KB 32b/line 2-way, D-cache 32 KB 32b/line 2-way
cpu0: features 8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
cpu0: features 8021bf<PGE,MMX>
total memory = 251 MB
avail memory = 229 MB
[...]
pciide0 at pci0 dev 0 function 1: Silicon Integrated System 530 IDE controller
 (rev. 0xd0)
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST3120023A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 111 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 234441648 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
 (Ultra/100)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66)
 (using DMA data transfers)
pciide0: secondary channel configured to compatibility mode
wd1 at pciide0 channel 1 drive 0: <ST3120022A>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 111 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 234441648 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
 (Ultra/100)
pciide0: secondary channel interrupting at irq 15
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66)
 (using DMA data transfers)

...can serve a large file to one client at 6MB/s, but it pegs the CPU
at 100 percent. That doesn't sound too bad, but look here:

com1: 2 silo overflows, 0 ibuf floods
tlp0: transmit underrun; new threshold: 96/256 bytes
tlp0: transmit underrun; new threshold: 128/512 bytes
tlp0: transmit underrun; new threshold: 160/1024 bytes

It spends so much time in the IDE driver, that it can't keep up with
the 2400bps UPS, or the DMA ethernet driver. (At higher speeds, the
silo overflow counts match the disk interrupt counts -- smoking gun.)

I had a 486 doing similar duty at another location (no figures handy).
That one had only narrow SCSI, but it wasn't any worse! It wasn't any
faster, really, but it didn't bog down from disk I/O at all.

Granted, the built-in SiS IDE may be particularly cheesy. You may
get better results with a better controller, or serial ATA. If I
were building a little file server from scratch (as I will be, soon)
though, I'd seriously consider alternatives to IDE. You can find
P3/500's, complete with Wide Ultra2 SCSI (a.k.a SCSI-3, a.k.a U80)
controllers starting at about $100 US on Ebay, but the drives will
cost more than the computer (and more $/GB than IDE).


Frederick