🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Joe Greco Mon, 27 Oct 1997 00:00
Re: disklabel, SCSI, and ccd tuning
#22697
Author: Joe Greco
Date: Mon, 27 Oct 1997 00:00
156 lines
6549 bytes
In news.software.nntp article <633ita$edc@ocean.silcom.com>, David Carmean <dlc@silcom.com> wrote:
:
:[ Article reposted from comp.unix.bsd.freebsd.misc ]
:[ Author was David Carmean <dlc@silcom.com> ]
:[ Posted on 27 Oct 1997 21:06:54 GMT ]
:
:Fooey.  INN is a pain in the ass.
:
:I'm trying to determine how to get the best filesystem performance 
:for INN under 2.1.5-R, with six 2GB Seagates (3x32151, 3x32155). I've 
:had them all in a ccd volume, striped with an interleave of 1024 blocks 
:for a while.  The article write time (from Joe Greco's innd-timer patch) 
:had crept up to about 200mSec for a full spool.

Bad.  Gotta be under 100 if you're taking a full feed.

:1:    How important is the disk label accuracy to ccd?  All of these 
:    drives have the same physical geometry, though the '155s have 
:    twice the buffer as the '151s (512K vs. 256K).

Rather important, if you don't want odd things happening.

:    a.    Must the labels reflect the actual physical parameters 
:        of the SCSI drive?  How can they with variable number of 
:        sectors per track?

Don't worry about it.  Take the number of blocks on the drive (as
displayed by the kernel probe and/or dmesg), and do the following:

ncyl = number of blocks / 2048

Then set heads = 64 and sectors = 32 (64 * 32 = 2048)

This has the magic advantage of working with the translations that
most SCSI controllers do.

It also has a magic property, the "ncyl" number will be the same
as the "MB" reported by dmesg and the kernel probe.

sysinstall is the EASIEST way to do this.  Trust me.

Once you have one drive done, don't futz around with the others.
Set up your disklabel, add the "e" partition with type 4.2BSD.
I usually start at block #2048 and make sure that I end up on
a track boundary.  I just did this one for the new Seagate
Barra 4XL's (ST34572N):

# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: sd1s1
label:
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 4339
sectors/unit: 8888288
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:  8888288        0    unused        0     0         # (Cyl.    0 - 4339*)
  e:  8884224     2048    4.2BSD        0     0     0   # (Cyl.    1 - 4338)
#

Notice the "1-4338".  CCD seems to work best if you do not give it
complex disk arrangements.  Skipping the part of the disk with the
disklabel and any confusion at the end makes life easier.

Then use dd to replicate to all the other disks:

# dd if=/dev/rsd1 of=/dev/rsd2 bs=512 count=10000

:    b.    However they end up, which parameters must be identical 
:        to get the optimum interleave from ccd?

Use the same type of disks.  Use the same disklabels.  For a news
spool, use LARGE stripes (65536 blocks).  For newslib, use something
smaller (128 blocks).

Optimum spool interleave is determined by how ffs lays out the
filesystem, more than anything else.

:2:    How can I get the debug info the ccd driver seems to be able to 
:    generate?  Can I set a config option and rebuild the standard 
:    kernel?  Can I get debug info for only the ccd driver, in order 
:    not to kill my system with debug messages?

Dunno.

:3:    How to decide on an interleave factor?  Somebody said "think 
:    cylinder group", thinking of keeping all the read/write ops 
:    for creating an article file on nearby cylinders in an FFS 
:    (UFS?) filesystem.  But one doesn't "newfs" the component 
:    disks, so they don't have cylinder groups, correct?  Then 

You still have cylinder groups.  Just think more generally.

A partition, let's say ccd0e, if made with standard parameters
as I have described, will have a cg size of 65536 blocks.  What
you want is for all the blocks in that cg to be on the same
drive.

:    I guess the idea would be to match the interleave factor with 
:    the size of the resulting virtual cylinder group size of the 
:    ccd volume?  So if I were to newfs the striped set with the 
:    defaults, and get the results below, I'd want the interleave 
:    factor to be 32 MB, or 65536 512K blocks?

512 byte blocks.

:    ocean: {29} sudo newfs -N ccd0c
:    /dev/rccd0c:    25165824 sectors in 6144 cylinders of 1 tracks, 4096 sectors
:            12288.0MB in 384 cyl groups (16 c/g, 32.00MB/g, 7680 i/g)
:
:    Well, with newfs -b 4096 -f 512 , I ended up with 5-cylinder 
:    cylinder groups, of 10 MB each. But I had set the interleave 
:    factor at 8192 blocks or 4 MB.  Might this be the reason that 
:    I'm already seeing artwrite times of > 150 mSec?  'Cause a 
:    cylinder group spans three stripes/disks?

I've given up using -b 4096 -f 512, I now use the default and
just adjust inodes as needed.  I noticed 4096/512 appeared to
be significantly slower sometimes.

:	['doh!] and couldn't make fsck work, so I rebuilt the 
:	spool with 32 MB cyl groups and interleave.  The artwrite 
:	time for the first fifteen minutes is about 75 mSec.)
:
:4:    Which newfs parameters do people find best for the resulting ccd 
:    volume?
:
:5:	If you run INN on a ccd volume, with Joe's innd-timer 
:	patch, what kind of artwrite times do you see on a 
:	stable system?

Low.

innd: ME time 300870 idle 25948(2248) artwrite 144248 (3843) artlink 33(843) hiswrite 40275(4221) hissync 38(64) sitesend 692(23304) artctrl 45983(1458) artcncl 0(0) hishave 7172(14968) hisgrep 300(1080)

That's about 38ms.  FreeBSD 2.1.7R, spool drives are made out of the
same 2xST31055N spool drive ccd stripes that I've been preaching 
about for a year (5 of them, or 10 drives).

... JG

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads