🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #6947

cyclic news file system - more performance results

#6947
From: Mark Delany
Date: Fri, 26 Apr 1996 00:00
298 lines
11539 bytes
Readers will need to have read earlier posts, especially
<4kc0g0$15p@bushwire.mira.net.au> "cyclic news file system - tentative
performance results" to understand this posting. The most important
point about that posting was the caveats - they most definitely still
apply.

The summary from that posting was that a prototype cyclic file storage
system appears to offer a substantial reduction in disk I/O loads of
the order of 25% of the current UFS version (to use market-speak,
that's a four-fold reduction in I/O load). That test was done with a
standalone program that roughly approximated the work that INN does in
such circumstances. But I'm the first to admit that it was very
approximate.

The next step was to install the cyclic library into INN and make the
comparison between the cyclic INN and the UFS INN. This posting
discusses those results.

The summary of this post is that integrating the Cyclic library into
INN didn't make a lot of difference to the initial results. In other
words the prototype did sufficienly reflect the real load presented by
the Cyclic system when used by INN.


Test scenario
-------------

o	Standard issue inn1.4unoff4 patched to use the cyclic library.

o	A random selection of between 6,000-14,100 articles sent from
	a separate server using innxmit with streaming. They happened
	to have a largish average size, but I doubt that that has much
	affect on the results.

o	log, active, history on SCSI spindle #1.

o	articles and overview written on SCSI spindle #2 running
	a moderately fast Seagate drive.

o	The cyclic storage method used 3 x 25M UFS files all on
	spindle two.

o	The test system is a "mostly idle" Solaris 2.5, P90, 64M,
	AH-39xx PCI SCSI controller.
	
o	Repeated runs showed sufficiently consistent results.

o	Files were rm'ed, rather than fsck() so there will be some
	variations, but they seem not to be significant.

o	"time" and "iostat -I" used to measure resource costs.

o	The newsfeeds file had *no* outbound feeds, but it did have an
	overview entry. (As an aside the overview entry disappears for
	a Cyclic system as the overchan program is no longer required
	since the NOV entries are stored internal to the Cyclic file
	system - though an option to turn NOV off completely for
	feeder only system seems obviously useful.)

This last point is quite significant as these tests are *only*
designed to measure storage IO costs, not any reader or the feeder
costs.


Results
-------

The first table shows the costs in storing the articles using the two
different versions of INN. Note that the expire cost is *not* included
which is giving the UFS version an unfair advantage.

The sorted figures refer to an innxmit run where the batch file is
sorted prior to transmission. This pre-sorting greatly assists the UFS
implementation due to the high locality of reference hits for
directory structures. The news systems started empty prior to each
run.

               TABLE 1 - FEEDER/READER - WITH OVERVIEW

            +-------------------------------------+
            |INN     |INN     |Cyclic   |Cyclic   |
            |nosort  |sorted  |nosort   |sorted   |
            |empty   |empty   |empty    |empty    |
+-----------+--------+--------+---------+---------|
| Seconds   |  2278  |  1335  |    650  |    614  |
|-----------+--------+--------+---------+---------|
| Arts/sec  |   6.2  |  10.6  |     22  |     23  |
|-----------+--------+--------+---------+---------|
| Disk used |   73M  |   73M  |    74M  |    74M  |
|-----------+--------+--------+---------+---------|
| Read IOs  |   48K  |  8.3K  |   1.4K  |   1.5K  |
|-----------+--------+--------+---------+---------|
| Write IOs |  112K  |   83K  |   7.1K  |     7K  |
|-----------+--------+--------+---------+---------|
| Tot IOs   |  160K  |   92K  |   8.5K  |   8.5K  |
|-----------+--------+--------+---------+---------|
| IOs/sec   |    70  |    69  |     13  |   13.8  |
|-----------+--------+--------+---------+---------|
| Mb Read   |  265M  |   47M  |   9.1M  |  12.5M  |
|-----------+--------+--------+---------+---------|
| Mb Written|  587M  |  393M  |    96M  |    96M  |
|-----------+--------+--------+---------+---------|
| Tot MBs   |  852M  |  440M  | 105.1M  | 108.5M  |
+-------------------------------------------------+

Notes.

1. The OS disk driver has only issued 1 physical write for every 3-4
   logical writes with the cyclic tests (the cyclic library is
   currently compiled to write in 4K segments).

2. Sorting batches *really* helps UFS.

3. I'm guessing that the SCSI disk is flat-out at around 70 IOs per
   second and is the limiting factor on the INN runs. Contrast that
   with the cyclic run, where the disk is busy, but not excessively
   so.

--------------------

In reality, we should also include the cost of expiring the articles
as that is all part of the total I/O load.  Using "rm -rf" as a very
rough approximation of the expire costs, the expire performance cost
tables looks like this:


	TABLE 2 - ESTIMATED EXPIRE COST

             +------------+
             |  Expire    |
+------------+------------+
| Seconds    |     670    |
+------------+------------+
| Read IOs   |    7.5K    |
+------------+------------+
| Write IOs  |     50K    |
+------------+------------+
| Tot IOs/sec|      86    |
+------------+------------+
| Mb Read    |     39M    |
+------------+------------+
| Mb Written |    244M    |
+------------+------------+

These figures should only be used as a very rough guide, but that
expire sure looks nasty. A rule of thumb from these figures seems to
be that expire adds about 30% to the I/O load on the system. This is
vaguely consistent with my observations of relatively busy news
servers.

I won't dwell on expire further, but the expire cost needs to be kept
well in mind when reading all of these figures.

--------------------

The test runs described above started with an empty /var/news or empty
set of cyclic files. However a steady-state news system exhibits
different I/O characteristics for a variety of reasons, not the least
being that the .overview files exist as do directories. From the
cyclic viewpoint, adding a NOV entry requires a re-read of a NOV
block, whilst creating an empty one is a logical allocation requiring
no I/O.

Thus the next set of tests are run on a populated news systems to try
and more accurately reflect the I/O load on a steady-state news
system.

[ I got a bit tired of running 14K articles through the test rig so I
  reduced it down to 6K or so articles for this test. ]

The general test process was:

	o	clear history, article storage, reset active
	o	innxmit articles
	o	clear history
	o	innxmit articles

with the measurements taken on the second innxmit run.


TABLE 3 - FEEDER/READER - WITH OVERVIEW - POPULATED

            --------------------+
            |INN      |Cyclic   |
            |sorted   |sorted   |
            |populated|populated|
+-----------+---------+---------+
| Seconds   |    440  |    244  |
|-----------+---------+---------|
| Arts/sec  |   13.5  |   24.5  |
|-----------+---------+---------|
| Disk used |    47M  |    31M  |
|-----------+---------+---------|
| Read IOs  |   5.5K  |    884  |
|-----------+---------+---------|
| Write IOs |    26K  |   2.6K  |
|-----------+---------+---------|
| Tot IOs   |  31.5K  |   3.4K  |
|-----------+---------+---------|
| IOs/sec   |   72.5  |     14  |
|-----------+---------+---------|
| Mb Read   |  21.5M  |   9.1M  |
|-----------+---------+---------|
| Mb Written|   120M  |  23.9M  |
|-----------+---------+---------|
| Tot MBs   |   141M  |  33.0M  |
+-------------------------------+

Notes.

1. The disk usage for Cyclic is much more efficient in this case as
   there is almost no wasted space for NOV storage for active groups.

2. At just 14 IOs per second that single spindle could comfortably
   handle an article arrival rate of 2M articles per day.

My feeling is that the reason that the Cyclic system isn't beating on
the disk more is simply because the sending system cannot send the
articles any faster!

--------------------

The final set of results apply to systems that don't require NOV data
written to disk, basically these are feeder-only systems. I haven't
bothered to do all sort/nosort combinations. Instead I picked the best
case for UFS and just ran that test.


          TABLE 4 - FEEDER - NO OVERVIEW

             +-------------------------+
             | INN sort   | Cyclic sort|
+------------+------------+------------|
| Seconds    |    1214    |    707     |
|------------+------------+------------|
| Arts/sec   |    11.6    |     20     |
|------------+------------+------------|
| Disk used  |     60M    |    58M     |
|------------+------------+------------|
| Phys Reads |    5.8K    |    308     |
|------------+------------+------------|
| Phys Writes|     71K    |   2.5K     |
|------------+------------+------------|
| Tot IOs    |     77K    |   3.0K     |
|------------+------------+------------|
| Tot IO/sec |      64    |    7.8     |
|------------+------------+------------|
| Mb Read    |     35M    |     3M     |
|------------+------------+------------|
| Mb written |    342M    |    66M     |
|------------+------------+------------|
| Tot MB     |    377M    |    69M     |
+--------------------------------------+


Notes.

1. The OS seems to have optimized the serial I/Os quite a bit for the
   Cyclic test, with just 1 physical I/O every 5 articles.

2. The extremely low read rate with the Cyclic versions can be
   attributed to the small write-through cache employed by the cyclic
   library and is consistent with my expectations of the performance
   characteristics in this scenario.


Downside
--------

There is a minor performance downside of the Cyclic approach in that
this implementation requires an additional field in the active file,
which obviously makes it bigger. Currently this additional field adds
17 bytes per line and it may need a few more bytes yet (mainly to
store a hint for tracking article lownums). Interestingly, this is
only needed for reader systems that use NOV, not for feeder-only
systems. Then again the active file is hardly needed at all for feeder
only systems...


Conclusions
-----------

Looking at table 3 as the test that mostly closely matches a standard
news system (sans reader and feeder load of course), the reduction in
I/O load to around 25% of a UFS system looks encouraging. The table 4
results, which apply to feeder-only systems, also show similar or
greater benefits.

At this stage it's hard to assess the reduction in disk latency due to
the sequential I/O nature of a Cyclic system, but that can only have
an upside as far as I can tell.


Regards.


Technical Details
Message-ID: <4lqh5o$kd6@bushwire.mira.net.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <4lqh5o$kd6@bushwire.mira.net.au>
Subject: cyclic news file system - more performance results
Date: Fri, 26 Apr 1996 00:00:00 +0000
From: Mark Delany <markd@mira.net.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 151541195
Organization: Werple Internet, Melbourne
Newsgroups: news.software.nntp