🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
20 messages
20 total messages Started by Dave Rose Tue, 20 May 1997 00:00
Fastrm is a PIG
#17872
Author: Dave Rose
Date: Tue, 20 May 1997 00:00
23 lines
1389 bytes
Quick question, I'm running INN 1.5.1 on Solaris 2.5.1 with the sec
patch. I'm running SDS 4.0 with a striped spool of 36GB (9 * 4). Fastrm
is running and it is slow, each unlink call is like just under 1 sec
each. The drives are running at less than 15% busy, the kernel % is very
high though:

CPU states:  4.3% idle,  6.1% user, 84.6% kernel,  4.9% iowait,  0.0%
swap

Anyone have any ideas as to why it might be so slow?

-- 
===============================================================
                           ___      c/o Computer Services
      Dave Rose           |   |__   The University of Manitoba
                          |MBnet/   603 Engineering Building
System Administrator      |    /    15 Gilson Street
Voice: (204) 474-7465     |    |    Winnipeg, Manitoba
FAX:   (204) 275-5420     |____|    R3T 5V6
===============================================================

Re: Fastrm is a PIG
#17895
Author: Ragnar Lonn
Date: Wed, 21 May 1997 00:00
23 lines
1340 bytes
Could be something wrong with your SCSI setup. Termination problems
or something. Check your logs for error messages (/var/adm/messages). Also
do a vmstat 5 plus an iostat -x 30, let both give a few lines of output and 
post it here. Might help determine what's wrong.
 
  /Ragnar, Algonet/TNI

In article <338209E6.76EA@MBnet.MB.CA>, Dave Rose <Dave_Rose@MBnet.MB.CA> 
wrote:
>Quick question, I'm running INN 1.5.1 on Solaris 2.5.1 with the sec
>patch. I'm running SDS 4.0 with a striped spool of 36GB (9 * 4). Fastrm
>is running and it is slow, each unlink call is like just under 1 sec
>each. The drives are running at less than 15% busy, the kernel % is very
>high though:
>
>CPU states:  4.3% idle,  6.1% user, 84.6% kernel,  4.9% iowait,  0.0%
>swap
>
>Anyone have any ideas as to why it might be so slow?
>

Re: Fastrm is a PIG
#17903
Author: Hans J Jakobsen
Date: Wed, 21 May 1997 00:00
46 lines
2395 bytes
Dave Rose wrote:
> 
> Quick question, I'm running INN 1.5.1 on Solaris 2.5.1 with the sec
> patch. I'm running SDS 4.0 with a striped spool of 36GB (9 * 4). Fastrm
> is running and it is slow, each unlink call is like just under 1 sec
> each. The drives are running at less than 15% busy, the kernel % is very
> high though:
> 
> CPU states:  4.3% idle,  6.1% user, 84.6% kernel,  4.9% iowait,  0.0%
> swap
> 
> Anyone have any ideas as to why it might be so slow?
> 
> --
> ===============================================================
>                            ___      c/o Computer Services
>       Dave Rose           |   |__   The University of Manitoba
>                           |MBnet/   603 Engineering Building
> System Administrator      |    /    15 Gilson Street
> Voice: (204) 474-7465     |    |    Winnipeg, Manitoba
> FAX:   (204) 275-5420     |____|    R3T 5V6
> ===============================================================

Are you running with logging?

I have the following observations:

1) When 1000 files (1MB) are deleted (alt.binaries..) by rm command
the command returns after a while but the space dont show up in a
df command. But wait for several minutes and the space show up gradual.

2) When I had the spool files on the logged and striped volume the 
zeroing of spoolfile by a cp /dev/null <spoolfile> took some time
but now when the spoolfiles is on a "normal" disk it is instantanius.
/hjj

-- 
Tele Danmark Erhverv, Data Divisionen      TLF: +45 8947 3339
Hans J Jakobsen                            FAX: +45 8947 3308
Skanderborgvej 234 st tv                   
X400:C=dk;admd=DK400;PRMD=DATACOM;
DK 8620 Viby J                                  S=Jakobsen;G=Hans
Danmark                                    Internet:hjj@datacom.dk400.dk

Re: Fastrm is a PIG
#17929
Author: Dave Rose
Date: Thu, 22 May 1997 00:00
75 lines
3822 bytes
Ragnar Lonn wrote:
> 
> Could be something wrong with your SCSI setup. Termination problems
> or something. Check your logs for error messages (/var/adm/messages). Also
> do a vmstat 5 plus an iostat -x 30, let both give a few lines of output and
> post it here. Might help determine what's wrong.

Nope no scsi probs. I've checked, they are SUN drives, in SUN cabinets,
connected to SUN controllers ;)

The drives are fairly light on the usage too:

postern # vmstat 2
 procs     memory            page            disk          faults     
cpu
 r b w   swap  free  re  mf pi po fr de sr s0 s1 s1 s1   in   sy   cs us
sy id
 1 1 0  60104 35232   2  56 270 29 104 0 29 8 19 15 17  674  816  306 20
49 31
 4 0 0 508748 18652   0   6 62  0  0  0  0  0  1  3  5  374  440  160 14
66 19
 1 1 0 508748 18280   0   2 178 0  0  0  0  6 16 17 19  694  697  306  8
57 34
 0 1 0 508736 17800   0   2 190 0  0  0  0  2  3 26 13  758  752  389 18
39 43
 2 0 0 508508 17104   0  95 232 0  0  0  0 12 18 12 31  663  704  336 26
53 21
 0 2 0 508508 16448   1   5 334 0  0  0  0  7 27 24 28  984  951  488 17
45 38
 1 1 0 508736 15900   0  62 238 0  0  0  0  8 44 42 39 1333  890  398 20
50 31
 2 1 0 508280 15080   0  35 190 0  0  0  0 13 10  8 12  601  656  265 22
43 34
 0 0 0 508280 14776   0   1 58  0  0  0  0  2  3  6  6  585 1049  345 14
36 50


disk      r/s  w/s   Kr/s   Kw/s wait actv  svc_t  %w  %b 
sd0       1.5  4.0   10.0   15.9  0.2  0.2   59.8   4   7 
sd1      14.9  6.0  109.0   25.4  0.1  0.4   22.8   5  25 
sd15      7.5 10.5   45.3   83.6  0.0  0.2   12.2   0  18 
sd16      1.0  4.0    5.0   38.8  0.0  0.1   15.7   0   8 
sd30      1.0  4.0    8.5   29.4  0.0  0.1   14.4   0   6 
sd31      7.0  7.5   41.8   40.3  0.0  0.5   32.4   0  20 
                                 extended disk statistics 
disk      r/s  w/s   Kr/s   Kw/s wait actv  svc_t  %w  %b 
sd0       0.0  4.5    0.0   17.9  0.0  0.1   27.0   2   4 
sd1       6.0  4.0   27.4   17.4  0.0  0.2   17.3   1  11 
sd15      0.0  1.0    0.0    7.0  0.0  0.0   16.2   0   2 
sd16      1.5  2.0    6.0    9.0  0.0  0.0   10.9   0   4 
sd30      3.0  4.5   19.4   26.9  0.0  0.1   14.1   0   9 
sd31      3.5  4.5   19.4   17.4  0.0  0.2   23.2   0  10 
                                 extended disk statistics 
disk      r/s  w/s   Kr/s   Kw/s wait actv  svc_t  %w  %b 
sd0       2.5  0.0   14.0    0.0  0.0  0.0   14.2   0   4 
sd1       7.0  2.5   37.5   12.0  0.0  0.1   11.2   0  10 
sd15      2.5 13.5   15.5  144.3  0.0  0.2   10.6   0  17 
sd16      1.0  2.0    2.5   24.0  0.0  0.0   15.5   0   5 
sd30      7.0 10.0   20.0   79.9  0.0  0.3   16.1   0  22 
sd31      2.0  6.5    9.0   51.9  0.0  0.1   16.6   0  13 


-- 

===============================================================
                           ___      c/o Computer Services
      Dave Rose           |   |__   The University of Manitoba
                          |MBnet/   603 Engineering Building
System Administrator      |    /    15 Gilson Street
Voice: (204) 474-7465     |    |    Winnipeg, Manitoba
FAX:   (204) 275-5420     |____|    R3T 5V6
===============================================================

Re: Fastrm is a PIG
#17930
Author: Charles
Date: Thu, 22 May 1997 00:00
24 lines
1369 bytes
Dave Rose (Dave_Rose@MBnet.MB.CA) wrote:
: Quick question, I'm running INN 1.5.1 on Solaris 2.5.1 with the sec
: patch. I'm running SDS 4.0 with a striped spool of 36GB (9 * 4). Fastrm
: is running and it is slow, each unlink call is like just under 1 sec
: each. The drives are running at less than 15% busy, the kernel % is very
: high though:

Hey Dave!

Be sure you have the latest ODS patch installed. (103580-15)

Also, there is a UFS patch that speeds up some UFS/ODS operations, I 
think it specifically mentioned removal of files.  I can't remember the 
patch number though.

-- 
        Harnad describes the status of Usenet aptly:
                a communication medium with revolutionary intellectual
                potential being used mostly as a global graffiti board.
                [Harnad 1991]


Re: Fastrm is a PIG
#17955
Author: Dave Rose
Date: Fri, 23 May 1997 00:00
24 lines
1654 bytes
Jerry Aguirre wrote:

> The only time I used to "push" fastrm was when news had been throttled
> and would not un-throttle until enough space was freed.  Other than that
> I would just let it go at its own pace.  My current spool is VXFS
> instead of UFS so fastrm runs very quickly.

Good points, I haven't really noticed 2 fastrm's running, so I think
it's not still running when the next expire happens. Currently I only
expire once per day starting at 2am.

What is this VXFS ? Is it available for Solaris?

===============================================================
                           ___      c/o Computer Services
      Dave Rose           |   |__   The University of Manitoba
                          |MBnet/   603 Engineering Building
System Administrator      |    /    15 Gilson Street
Voice: (204) 474-7465     |    |    Winnipeg, Manitoba
FAX:   (204) 275-5420     |____|    R3T 5V6
===============================================================

Re: Fastrm is a PIG
#17965
Author: Jerry Aguirre
Date: Fri, 23 May 1997 00:00
44 lines
2689 bytes
In article <338498BB.34E8@MBnet.MB.CA>,
Dave Rose  <Dave_Rose@MBnet.MB.CA> wrote:
>The drives are fairly light on the usage too:

I am not too supprised at this.  If you think about it you have a
single process, fastrm, doing one "unlink" at a time.  File removal
results in some synchronous updates to the disk so each unlink takes
time.

So fastrm is doing one IO to one disk at a time.  The other disks do
nothing so they are not getting stressed.  (Unless unimportant functions
such as new articles, outgoing feeds,  or reading is occuring.:-)

The clock time for fastrm to complete is long but is that a problem?
As long as it is done before the next expire run you should be OK.
News doesn't stop processing and fastrm doesn't use a lot of RAM so it
should not be an issue.

Then there is the problem of groups like control.cancel and
misc.jobs.offered which are so large it can take considerable time for
the OS just to find the article.  The high system time is the fault of
the OS and there is not much that can be done about that without either
changing the OS or storing the articles differently.

A hardware write cache will provide the improved speed of the fastfs
program without the risk of file damage in a crash.  Of course you
pay more for a write cache than you do for setting the asycio bit on
the filesystem.

You should be able to speed up the clock time considerably by spliting
the expire.rm list into several parts and processing them in parallel
Thus you might have one fastrm processing the first 10,000 entries, a
second processing the next 10,000, etc.  This will delete the files
faster but at the expense of a much more intense load on the CPU and
disks.  If you are trying to finish during the "off" time before the
busy part of the day this might be reasonable.

The only time I used to "push" fastrm was when news had been throttled
and would not un-throttle until enough space was freed.  Other than that
I would just let it go at its own pace.  My current spool is VXFS
instead of UFS so fastrm runs very quickly.

Re: Fastrm is a PIG
#17967
Author: paul theodoropoulos
Date: Fri, 23 May 1997 00:00
37 lines
2257 bytes
Dave Rose <Dave_Rose@MBnet.MB.CA> wrote:
> Jerry Aguirre wrote:
> > The only time I used to "push" fastrm was when news had been throttled
> > and would not un-throttle until enough space was freed.  Other than that
> > I would just let it go at its own pace.  My current spool is VXFS
> > instead of UFS so fastrm runs very quickly.

> Good points, I haven't really noticed 2 fastrm's running, so I think
> it's not still running when the next expire happens. Currently I only
> expire once per day starting at 2am.

> What is this VXFS ? Is it available for Solaris?

VxFS is the Veritas Journaling File System. It's quite simply the coolest
file system around, imho. "Journaling" simply means intent-logging - the
filesystem writes to a log whatever it intends to do. Data isn't committed
to disk until it's been logged, so failures can be recovered from
exceptionally quickly (e.g. i can yank the plug out of the wall on my feed
exchanger, plug it back in, and the system will be back up and running
within about 90 seconds - not the half-hour or so it would take for fsck
to check all the disks under a typical ufs filesystem). There are many
other advantages to the filesystem besides quick recovery (extent-based
allocation, etc).

In any case, VxFS is available for solaris, but it's fairly expensive -
$3k to $4k.

I haven't kept up on it, but i believe that solaris 2.6 will include much
of the functionality of VxFS.

-- 
Paul Theodoropoulos     admin@wco.com     VP, West Coast Online, Inc.

   Crre-erivrjrq fghqvrf pbasvez: Gur Avprfg Thl ba gur Vagrearg

Re: Fastrm is a PIG
#17968
Author: bill davidsen
Date: Fri, 23 May 1997 00:00
29 lines
1880 bytes
In article <5m32rh$chm$1@fes.whowhere.com>,
Jerry Aguirre <jerry@rigel.whowhere.com> wrote:

| I am not too supprised at this.  If you think about it you have a
| single process, fastrm, doing one "unlink" at a time.  File removal
| results in some synchronous updates to the disk so each unlink takes
| time.
| 
| So fastrm is doing one IO to one disk at a time.  The other disks do
| nothing so they are not getting stressed.  (Unless unimportant functions
| such as new articles, outgoing feeds,  or reading is occuring.:-)
| 
| The clock time for fastrm to complete is long but is that a problem?
| As long as it is done before the next expire run you should be OK.
| News doesn't stop processing and fastrm doesn't use a lot of RAM so it
| should not be an issue.

Typically a system which does sync writes after the delete will
thrash mightily. Which is why some operating systems run better than
others. On some of my AIX systems with a logging setup, I have the
log file in NVram (a small, expensive, SCSI drive). This cuts expire
time by 60-70%.
--
	-bill davidsen (davidsen@tmr.com)
"As a software development model, Anarchy does not scale well."
		-Dave Welch

Re: Fastrm is a PIG
#17976
Author: Dave Rose
Date: Fri, 23 May 1997 00:00
18 lines
1214 bytes
Charles wrote:

> Be sure you have the latest ODS patch installed. (103580-15)

Ah...typo that's 102580-15, yup I have that installed.


===============================================================
                           ___      c/o Computer Services
      Dave Rose           |   |__   The University of Manitoba
                          |MBnet/   603 Engineering Building
System Administrator      |    /    15 Gilson Street
Voice: (204) 474-7465     |    |    Winnipeg, Manitoba
FAX:   (204) 275-5420     |____|    R3T 5V6
===============================================================

Re: Fastrm is a PIG
#17971
Author: Bruce Esquibel
Date: Sat, 24 May 1997 00:00
39 lines
2449 bytes
Al (lynch@aimnet.com) wrote:

: From a quick glance at Veritas' page it looked like VXFS was actually 
: slower than FFS based filesystems for small articles. How has it performed
: for you, and what is your configuration? (Proc, Disk setup, feeds + users, etc)?
: I will be redoing the spool disks on our primary reader machine soon, and
: VXFS was an option that came up.

: Any input would be greatly appreciated!

I think it's something to consider, I was hesitant when we switched our news
system to the Unixware/ODM package and had to choose either ufs or vxfs.

Like the previous message had mentioned, if the machine crashes or otherwise
doesn't go through a clean shutdown, it only takes a few minutes to restart
using vxfs. On our system we have eight 4gig drives doing raid0 for a 32gig
spool. It is amazing the first time it happens you are expecting an hour
wait for it to fsck everything but two or three minutes later it's back up
running like nothing happend.

There is supposed to be a performance hit using vxfs, especially for
something like doing usenet but it's probably more dependent on other
factors like the machine, drive controller and drive types. I haven't run
into any abnormal situations dealing with this though.

There are options in the vxfs manager to control the logging/journalling
stuff, tweaks. By default I think it runs in the 'safest' mode possible but
you have an option for cached-logging which delays the journal updates.
Turning this on increases performance (or so it says) but does open the
possibilty for data loss between the time it crashed and the last update.

I'd really suggest trying it, if it doesn't seem to run in slow motion for
you, leave it, in the long run you'll be glad you did.

-bruce
bje@ripco.com

Re: Fastrm is a PIG
#17977
Author: Al
Date: Sat, 24 May 1997 00:00
23 lines
1361 bytes
Jerry Aguirre (jerry@rigel.whowhere.com) wrote:
: 
: The only time I used to "push" fastrm was when news had been throttled
: and would not un-throttle until enough space was freed.  Other than that
: I would just let it go at its own pace.  My current spool is VXFS
: instead of UFS so fastrm runs very quickly.

From a quick glance at Veritas' page it looked like VXFS was actually 
slower than FFS based filesystems for small articles. How has it performed
for you, and what is your configuration? (Proc, Disk setup, feeds + users, etc)?
I will be redoing the spool disks on our primary reader machine soon, and
VXFS was an option that came up.

Any input would be greatly appreciated!

-- 

Al Dowski
Systems Engineering Manager
Aimnet Corporation

Re: Fastrm is a PIG
#17995
Author: Al
Date: Sun, 25 May 1997 00:00
41 lines
2232 bytes
Journaling is avaible in Solaris 2.5x wiht ODS4.x or with Veritas' SSA
manager software. (AKA Veritas Volume MAnager or whatever..) Its quite
easy to implement and works extremely well. The only real problem is that
a single journaling disk can become a performance bottleneck, particularly
on news servers.

Does VxFS do journaling intrinsically, without the requirement of loggin
disks?

paul theodoropoulos (paul@meatyspam.wco.com) wrote:
: 
: VxFS is the Veritas Journaling File System. It's quite simply the coolest
: file system around, imho. "Journaling" simply means intent-logging - the
: filesystem writes to a log whatever it intends to do. Data isn't committed
: to disk until it's been logged, so failures can be recovered from
: exceptionally quickly (e.g. i can yank the plug out of the wall on my feed
: exchanger, plug it back in, and the system will be back up and running
: within about 90 seconds - not the half-hour or so it would take for fsck
: to check all the disks under a typical ufs filesystem). There are many
: other advantages to the filesystem besides quick recovery (extent-based
: allocation, etc).
: 
: In any case, VxFS is available for solaris, but it's fairly expensive -
: $3k to $4k.
: 
: I haven't kept up on it, but i believe that solaris 2.6 will include much
: of the functionality of VxFS.
: 
: -- 
: Paul Theodoropoulos     admin@wco.com     VP, West Coast Online, Inc.
: 
:    Crre-erivrjrq fghqvrf pbasvez: Gur Avprfg Thl ba gur Vagrearg

-- 

Al Dowski
Systems Engineering Manager
Aimnet Corporation

Re: Fastrm is a PIG
#18026
Author: Jerry Aguirre
Date: Tue, 27 May 1997 00:00
45 lines
2988 bytes
In article <5m653m$9hp$1@news.aimnet.com>, Al <lynch@aimnet.com> wrote:
>From a quick glance at Veritas' page it looked like VXFS was actually 
>slower than FFS based filesystems for small articles. How has it performed
>for you, and what is your configuration? (Proc, Disk setup, feeds + users, etc)?
>I will be redoing the spool disks on our primary reader machine soon, and
>VXFS was an option that came up.

Configuration is a Sun Ultra Enterprise 3000, sunswift (wide SCSI) and a
multi-pack consisting of 12x2GB disks.  Abount 1.5G of that is an ODS
stripe/mirror partition for the /news partition containing the bin,
history, active, etc.  That is the first six drives each with a
partition of 256MB with a stripe size of 80 sectors.  This is an
optimization for access to the history file.  (Small stripe for a
single large file.) The second 6 drives are a mirror of the first 6.

The rest of the 12 disks are the /news/articles containing the articles
and overview files.  Those 12 partitions are striped using 24320
sectors.  Logs are on a different disk using UFS.

Performance is good though it is not loaded very heavily yet.  The spool
is mounted with options "tmplog,mincache=tmpcache".  I suspect that the
improvements in handling large directories (misc.offered.jobs) will
outweigh any speed difference in handling small files.  My peak article
processing rate for today was 726/minute at 10:11AM.  Disks average
about 14% busy.

There are a few downsides.  The VXFS only supports a minimum fragment
size of 1KB.  But SunOS Ultra also requires a minimum fragment size of
1KB so in this case VXFS is no worse.  Where 512B fragments are
supported about 13% more articles can be stored.  Due to the 1KB fragment
and taking all groups (except *warez*) I can only keep about 5 days of
news.

While creating and fscking VXFS is fast unmounting a vxfs takes a long
time.  Shutdown time takes 10 minutes more than normal.  Not entirely
sure what is going on but it seems to hang in the unmount.  Perhaps it
is tidying up the journals?

It is possible to currupt VXFS by creating lots of tiny files.  As
a test we created 9 byte files until the filesystem was full.  At that
point the partition was unmountable and unfixable.  We had to re-create
it.  No problems like that running it as a news spool though.

Re: Fastrm is a PIG
#18267
Author: Charles Ball
Date: Thu, 05 Jun 1997 00:00
30 lines
1599 bytes

Dave Rose (Dave_Rose@MBnet.MB.CA) wrote:
: each. The drives are running at less than 15% busy, the kernel % is very
: high though:

: CPU states:  4.3% idle,  6.1% user, 84.6% kernel,  4.9% iowait,  0.0%
: swap

: Anyone have any ideas as to why it might be so slow?


When system/kernel time is high, it is likely that you have some very
large directories which are expensive to maintain.  If you have any
leaks in your article expiration it is easy to end up with hundreds of
thousands of files in control, junk, misc.jobs.offered, etc.  Actually,
if you've ever had a leak, the directory file doesn't shrink when the
articles are finally removed; it is necessary to create a new directory
and move the old/large one out of service to recover performance.  I
discovered a leak in control recently, the directory file had grown to
three and a half megabytes and it took well over 20 hours for rm -r to
delete the directory; I calculated that it was removing files at 3-4
per second.

--
Charles Ball
Information Technology
Boston University

Re: Fastrm is a PIG
#18272
Author: Gary Palmer
Date: Thu, 05 Jun 1997 00:00
28 lines
1637 bytes
In article <5n6c9q$m2g@news.bu.edu>,
	cball@bu.edu (Charles Ball) writes:
> When system/kernel time is high, it is likely that you have some very
> thousands of files in control, junk, misc.jobs.offered, etc.  Actually,
> if you've ever had a leak, the directory file doesn't shrink when the
> articles are finally removed; 

Actually, not *QUITE* true. 4.4BSD derrived systems can truncate
directories.

root@news:/var/spool/news/control/cancel> ls | wc -l
    2128
root@news:/var/spool/news/control/cancel> ls -dl .
drwxrwxr-x  2 news  news  34304 Jun  5 21:49 .
root@news:/var/spool/news/control/cancel> rm * ; touch a ; rm a
root@news:/var/spool/news/control/cancel> ls -dl .
drwxrwxr-x  2 news  news  512 Jun  5 21:49 .
root@news:/var/spool/news/control/cancel> 

NOTE: A file (in this case `a') had to be created *BEFORE* the kernel
      truncated the directory. Damned if I know exactly why, I haven't
      looked too deeply into UFS/FFS since 4.3BSD net2

Gary


Re: Fastrm is a PIG
#18308
Author: Joe Greco
Date: Fri, 06 Jun 1997 00:00
32 lines
2075 bytes
In news.software.nntp article <5n7qei$7dm@news.webspan.net>, gpalmer@SPAM.webspan.net (Gary Palmer) wrote:
:In article <5n6c9q$m2g@news.bu.edu>,
:	cball@bu.edu (Charles Ball) writes:
:> When system/kernel time is high, it is likely that you have some very
:> thousands of files in control, junk, misc.jobs.offered, etc.  Actually,
:> if you've ever had a leak, the directory file doesn't shrink when the
:> articles are finally removed; 
:
:Actually, not *QUITE* true. 4.4BSD derrived systems can truncate
:directories.
:
:NOTE: A file (in this case `a') had to be created *BEFORE* the kernel
:      truncated the directory. Damned if I know exactly why, I haven't
:      looked too deeply into UFS/FFS since 4.3BSD net2

I believe that's because the only time the entire directory is guaranteed
to be traversed is at file _creation_ time.  An unlink simply searches 
the directory to reach the file in question (or the whole directory if 
it does not exist).  An open-for-write, however, forces the directory 
to be scanned to see if the filename already exists.  If not, you've
just traversed the entire directory, and will be creating the file, 
and along the way you could have noted if the directory was a candidate 
for truncation.  So I believe, IIRC, that the truncation feature was 
piggybacked on top of file creations, so that the feature did not 
require (much) extra work to be done.

"Cool 'ey"

... JG

Re: Fastrm is a PIG
#18315
Author: Stefan Hauser
Date: Fri, 06 Jun 1997 00:00
27 lines
1299 bytes
In article <5n6c9q$m2g@news.bu.edu>, Charles Ball <cball@bu.edu> wrote:
[...]
>discovered a leak in control recently, the directory file had grown to
>three and a half megabytes and it took well over 20 hours for rm -r to
>delete the directory; I calculated that it was removing files at 3-4
>per second.

hmm.

<NEWS:NEWS /news/spool>l -d test
drwxrwxr-x    2 news     news     2416640 Jun  5 22:07 test
<NEWS:NEWS /news/spool>ls test|wc -l
             59999
<NEWS:NEWS /news/spool>time rm -rf test

real    5m10.13s
user    0m8.09s
sys     2m41.21s
<NEWS:NEWS /news/spool>

guess that depends a bit on the machine/os/fs ...
that's on a sgi indy (133mhz R4600PC) with xfs

  etienne

Re: Fastrm is a PIG
#18435
Author: Doug McLaren
Date: Thu, 12 Jun 1997 00:00
27 lines
1634 bytes
In article <5n7e9o$l69$1@mephisto.imp.ch>,
Stefan Hauser <etienne@mephisto.imp.ch> wrote:
| In article <5n6c9q$m2g@news.bu.edu>, Charles Ball <cball@bu.edu> wrote:
| [...]
| >discovered a leak in control recently, the directory file had grown to
| >three and a half megabytes and it took well over 20 hours for rm -r to
| >delete the directory; I calculated that it was removing files at 3-4
| >per second.
...
| guess that depends a bit on the machine/os/fs ...
| that's on a sgi indy (133mhz R4600PC) with xfs

If I recall correctly, XFS has binary tree lookups for files in a
directory.  So, to search for a given file in a huge directory, the
time needed is O(ln n) and not O(n).

For a news server, this should be a huge win ...

I haven't actually used it, so I could be mistaken somewhere too :)

-- 
Doug McLaren, dougmc@ccwf.cc.utexas.edu
Unsolicited email of a commercial or advertising nature is not welcomed.
<http://spam.abuse.net/spam/> Because The Only GOOD Spammer is a DEAD Spammer

Fastrm is a PIG: hardware, maybe?
#18454
Author: naeem
Date: Fri, 13 Jun 1997 00:00
31 lines
1752 bytes

> Dave Rose (Dave_Rose@MBnet.MB.CA) wrote:
> : each. The drives are running at less than 15% busy, the kernel % is very
> : high though:
> 
> : CPU states:  4.3% idle,  6.1% user, 84.6% kernel,  4.9% iowait,  0.0%
> : swap
> 
> : Anyone have any ideas as to why it might be so slow?

Other than the news stuff, you might want to check your hardware. I just
got caught by exactly the same thing and I found that it wasn't news
related at all, but the driver for my fddi card was bad, and as a result,
the card was sending several thousand interrupts per second to the
machine. Shut down news and then see what the cpu utilization is. If its
still spending time doing system stuff, and there is no rogue process,
then its probably hardware. The 'in' column of vmstat shows the interrupts
on my solaris box.

naeem

-------------------------------------------------------------
Naeem Bari			Tel: (314) 935-4865
Software/Network Engineer	Fax: (314) 935-7142
Office of the N/W Coordinator	naeem@wugate.wustl.edu
Washington U. in St. Louis	http://rusty.wustl.edu/~naeem/
--------------------------------------------------------------


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