unlink bottleneck

From: Duane Wessels <wessels@dont-contact.us>
Date: Fri, 21 Mar 97 12:17:22 -0800

There have been numerous good ideas for getting around unlink()
bottlenecks. In summary:

    1) change your filesystem parameters

    2) an unlink daemon process

    3) truncate instead of unlink

    4) Stew's asynch file ops

My comments:

#3 is easy and should work well. The store_clean.c routines
will clean up unused files so the swap directories dont grow to
huge lengths. truncate() may take just as long as unlink()
but it should win on later open() calls.

#2 is pretty easy too. I have mostly working code from Mark Treacy
to already do it. I would probably add a FIFO of unused file numbers
as well so we can pass files to unlinkd without worry they will be
reused again quickly.

#4 Stew's patch has been incorporated into Squid 1.2.x. His
implementation requires linking with a POSIX threads library. Maybe
not ultra portable?

Other comments? Is #2 something that people would like to have
in squid-1.1?

Duane W.
Received on Tue Jul 29 2003 - 13:15:40 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:15 MST