Messages in this thread | | | Date | Thu, 8 May 2008 11:19:06 +0300 | From | Matti Aarnio <> | Subject | Re: Deleting large files |
| |
On Wed, May 07, 2008 at 03:49:30PM -0400, Morten Welinder wrote: > Hi there, > > deleting large files, say on the order of 4.6GB, takes approximately forever. > Why is that? Well, it is because a lot of things need to take place to free > the formerly used space, but my real question is "why does the unlink caller > have to wait for it?"
This very question has troubled SQUID developers. Whatever the system, unlink() that really does free diskspace does so with unbound timelimit and in services where one millisecond is long wait time, the solution has been to run separate subprocess that actually does the unlinks.
Squid is not threaded software, and it was created long ago when threads were rare and implementations were different in subtle details --> no threads at all.
> Morten
/Matti Aarnio
| |