Subject: News Server - Increasing disk performance?
To: None <netbsd-help@NetBSD.ORG>
From: John D. Smerdon <jds@smerdon.livonia.mi.us>
List: netbsd-help
Date: 09/13/1996 19:17:03
Are there configuration options that would increase disk performance?  I
have a news server that can not sustain two articles per second and it is
starting to fall behind.  It usually takes from 200-800ms after receiving
an article before it is written to disk and an acknowledgement (235?) is
sent.

I am getting more memory, a second SCSI controller, and disk, but it just
seems that the current configuration should be faster.

Nothing else runs on the system, and there are between 5 and 15 news
readers at any one time.

Thanks for any advice!

Config: NetBSD 1.2_BETA from a couple weeks ago, Pentium 90, 32MB memory,
single 2940, two 4GB disks with root on sd0a, swap on sd0b and sd1b, /usr
ccd'ed over both disks, and /news ccd'ed over both disks.

The news history file is on /usr/home/news, overview data is on
/news/over.view.  14 days of news in the big eight and a couple small
hierarchies and no alt.binaries or alt.sex.

# tcpdump port nntp (with my comments)
12:17:30.374507 netbsd.nntp > feed.2656: P 140:145(5) ack 23871 win 24576
  235\r\n
12:17:30.440567 feed.2656 > netbsd.nntp: P 23871:23922(51) ack 145 win 16384
  ihave <message-id>\r\n
12:17:30.440790 netbsd.nntp > feed.2656: . ack 23922 win 24525
12:17:30.443796 netbsd.nntp > feed.2656: P 145:150(5) ack 23922 win 24576
  335\r\n
12:17:30.501732 feed.2656 > netbsd.nntp: . 23922:24434(512) ack 150 win 16384
12:17:30.502205 feed.2656 > netbsd.nntp: P 24434:24490(56) ack 150 win 16384
12:17:30.504225 netbsd.nntp > feed.2656: . ack 24490 win 24576
12:17:30.524423 feed.2656 > netbsd.nntp: P 24490:24493(3) ack 150 win 16384
  .\r\n
12:17:30.524894 netbsd.nntp > feed.2656: . ack 24493 win 24576
12:17:30.792764 netbsd.nntp > feed.2656: P 150:155(5) ack 24493 win 24576
  235\r\n

# pstat -s
Device      1K-blocks     Used    Avail Capacity  Type
/dev/sd0b      133760    30072   103688    22%    Interleaved
/dev/sd1b      133760    31216   102544    23%    Interleaved
Total          267520    61288   206232    23%

# df -i
Filesystem  1K-blocks     Used    Avail Capacity iused   ifree  %iused
Mounted on
/dev/sd0a       32399    14039    16740    46%     712    7222     9%   /
/dev/sd1a       32399    14041    16738    46%     714    7220     9%   /altroot
/dev/ccd0d    1556494   826469   652200    56%   49760  326558    13%   /usr
/dev/ccd1d    6209801  5175084   724226    88% 1302045  199393    87%   /news
mfs:21         123887        3   117689     0%       3   30715     0%   /tmp

# cat /etc/ccd.conf
ccd0            110     0       /dev/sd0e /dev/sd1e
ccd1            110     0       /dev/sd0f /dev/sd1f

# vmstat -w 5 sd0 sd1 ccd0 ccd1
 procs   memory     page                    disks         faults   cpu
 r b w   avm   fre  flt  re  pi  po  fr  sr s0 s1 c0 c1   in   sy  cs us sy id
 0 1 0 70608  1664    3   0   0   0   0   0 40 42 11 64    0  102  77  3  5 92
 0 2 0 80000  1664    3   0   0   0   0   0 36 36  6 58    0  170  89  4  7 89
 0 2 0 84868  1300   82   3   3   0   0   0 41 37 18 51    0  135 108  7  6 87
 0 1 0 84868  1300    3   0   0   0   0   0 43 37 12 60    0   99  98  4  4 92
 0 1 0 84804  1300    4   0   0   0   0   0 38 35 10 54    0   81 108  3  3 94
 0 2 0 84804  1300    1   0   0   0   0   0 45 42  6 73    0   85 111  2  6 91
 1 0 0 89948  1300   15   3   0   0   0   0 39 41 11 59    0  140 128  4  5 92
 0 2 0 99340  1300   13   3   0   0   0   0 38 41 10 57    0  151 110  4  6 90
 0 0 0 94472  1664    4   0   0   0   0   0 35 32 15 45    0  116 103  4  4 92
 0 0 0 94472  1664    3   0   0   0   0   0 35 40 13 54    0  109  77  4  5 90

# disklabel sd0
# /dev/rsd0d:
type: SCSI
disk: mysd
label:
flags:
bytes/sector: 512
sectors/track: 110
tracks/cylinder: 19
sectors/cylinder: 2090
cylinders: 3992
total sectors: 8343280
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

6 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    66880        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 31)
  b:   267520    66880      swap                        # (Cyl.   32 - 159)
  c:  8343280        0    unused        0     0         # (Cyl.    0 - 3991)
  d:  8343280        0    unused        0     0         # (Cyl.    0 - 3991)
  e:  1605120   334400    4.2BSD     1024  8192    16   # (Cyl.  160 - 927)
  f:  6403760  1939520    4.2BSD     1024  8192    16   # (Cyl.  928 - 3991)

--
John D. Smerdon;  Livonia, Michigan, USA;  Contents are my opinion.
Home: jds@smerdon.livonia.mi.us