According to Duane Wessels:
> Miquel van Smoorenburg writes:
> >I've asked this before but got no replies, but I can't imagine I'm the
> >only one seeing this. Every once in a while our squid server (1.1.20 novm)
> >decides not to use unlinkd and does the unlinking itself.
> 
> It could happen if your disk usage is over the high water mark.  
> Then storeGetSwapSpace gets called:
> 
>   1459      if ((i = storeGetUnusedFileno()) >= 0) {
>   1460          safeunlink(storeSwapFullPath(i, NULL), 0);
>   1461          if (++removed == SWAP_LRU_REMOVE_COUNT)
>   1462              return;
>   1463      }
> 
> Don't ask me why thats there.  I'm not sure I wrote it.  Looks like
> the 'if' should maybe be a 'while'.
Aha, very good guess. Indeed the disk usage is over the high water mark.
>   1570          if (store_swap_size > store_swap_high)
>   1571              safeunlink(storeSwapFullPath(e->swap_file_number, NULL), 1);
>   1572          else
>   1573              storePutUnusedFileno(e->swap_file_number);
> 
> Requests are only written to the unlinkd process if the unused
> fileno stack is full.  If you're over the high water mark and the
> stack is NOT full, then no disk space will be freed, so we call
> unlink directly.
I'm not quite sure I understand this. There is no conceptual difference
between calling unlink() directly and calling unlinkd; why not use unlinkd?
Our cache now gets so slow sometimes that it is unuseable. All the
unlink()s take way too much time..
Ofcourse I do not understand the internals of squid very much so maybe
I'm asking for the obvious.
Mike.
-- 
 Miquel van Smoorenburg |  The dyslexic, agnostic, insomniac lay in his bed
    miquels@cistron.nl  |  awake all night wondering if there is a doG
Received on Tue Feb 24 1998 - 08:55:53 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:58 MST