🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21859

Re: *NEW* News Server Software!

#21859
From: Leslie Mikesell
Date: Wed, 24 Sep 1997 00:00
70 lines
4025 bytes
In article <60c34g$joh$1@flood.xnet.com>,
Edward S. Marshall <emarshal@xnet.com> wrote:
>On 24 Sep 1997 13:20:03 -0500, Leslie Mikesell <les@MCS.COM> wrote:
>>I think it is kind of odd that everyone seems to think that the
>>common unix filesystems are not good at storing and retrieving
>>files.   If this is true, then the filesystem design should be
>>changed for everything not just news.  However, I think the real
>
>Actually, I think what most people are basically saying here (even
>if they don't realize it) is that the API for accessing a standard
>UNIX filesystem is a bottleneck, because you are saddled with at
>least three syscalls for every file you deal with: open(), close(),
>and some intermediate manupulation (either a write() or a read()).

This is obviously correct, but a typical news machine isn't going
to stumble until you hit several thousand syscalls/second.  Now
how many articles are you handling? That time is going somewere
else.

>No matter how efficient your filesystem is, you still have an
>enormous amount of overhead (relatively speaking) with those jumps
>to kernel space, since for each syscall, you have a context switch,
>a switch to protected mode, the actual kernel code, a switch back to
>userspace, and a context switch, along with some scheduling fun in
>there as well.

Time-wise none of those compare to the directory scan in open().

>For those proponents who would design a new filesystem that "works
>better" for uses such as INN: you might consider tackling the API
>problem first. Find a way to get your kernel accesses down to once
>per file (i.e. merging what we already do to files over three
>syscalls into one call), and you'll see a noticable improvement.

How many syscalls/second will your box do?

>Or, instead of inventing highly specialized filesystems with
>highly specialized APIs, implement a virtual filesystem (of a
>sort) in userspace. Create a library for file access, and
>implement your funky new filesystem as a single file or a series
>of files (ie. break out your inode tables into a separate file,
>or files, and break the "filesystem" over several files, which
>could physically reside on separate disks, etc). Suddenly, since
>you're in userspace, it stops mattering whether or not you have
>three operations per file; it's just a function call, not a kernel
>call.

This only makes sense for a single process accepting a feed.  How
are the many reading processes going to randomly find what you've
done?  You're not in *their* userspace.  I could see replacing the
crossposting links with such a mechanism, but you'd still have a
hard time with readers trying to follow the growing file.

>Think about it: a few open() and close() calls, as opposed to one
>of each for *every* article you bring through the system. You're
>now down to dealing with only one efficiency issue: manipulating
>the data via read(), write(), and seek()...and most UNIX
>filesystems tend to be pretty good in this area.

Not really, if a lot of processes have to stay coordinated while
doing it at the same time.  The kernel is the right place to
arbitrate between processes.  The bulk of the problem is that
creating, deleting and scanning for files is expensive if the
directories are allowed to become large.

Les Mikesell
  les@mcs.com

Technical Details
Message-ID: <60c6sg$or4$1@Venus.mcs.net>
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
References: <5vpddn$qlb$1@news5.ais.net> <vxk3en1e2z0.fsf@pocari-sweat.jprc.com> <60blkj$im8$1@Mercury.mcs.net> <60c34g$joh$1@flood.xnet.com>

Show Full Headers
Complete Article Headers
Message-ID: <60c6sg$or4$1@Venus.mcs.net>
Subject: Re: *NEW* News Server Software!
Date: Wed, 24 Sep 1997 00:00:00 +0000
From: les@MCS.COM (Leslie Mikesell)
References: <5vpddn$qlb$1@news5.ais.net> <vxk3en1e2z0.fsf@pocari-sweat.jprc.com> <60blkj$im8$1@Mercury.mcs.net> <60c34g$joh$1@flood.xnet.com>
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: 275303727
Distribution: inet
Organization: /usr/lib/news/organi[sz]ation
Newsgroups: news.software.nntp