Re: compute swap_file_sz before packing it

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Tue, 27 Oct 2009 23:07:16 +0100

tis 2009-10-27 klockan 15:51 -0600 skrev Alex Rousskov:

> To compute StoreEntry::swap_file_sz, I will add up the ported
> STORE_META_OBJSIZE value and the swap_hdr_len set by StoreMetaUnpacker.
> Would you compute it differently?

Sounds right to me.

> What should I do if STORE_META_OBJSIZE is not known? Does this question
> itself imply that each store that wants to rebuild an index has to store
> the final object size somewhere or update the STORE_META_OBJSIZE value?

Exactly. But see my previous response some seconds ago.

As you already noticed the ufs family uses the filesystem file size meta
information to rebuild swap_file_sz.

COSS in Squid-2 uses STORE_META_OBJSIZE + swap_hdr_sz.

> Thank you for porting this.

Was already done, just not sent yet.

> What happens to STORE_META_OBJSIZE if the object size is not yet known
> at the time when Squid start swapping content to disk?

Then there is no STORE_META_OBJSIZE.

But stores with a max size limit won't get such swapouts.

> The whole patch is not needed if we start relying on STORE_META_OBJSIZE,
> I guess.

Probably, was more a note to illustrate the issues that field battles
with..

Regards
Henrik
Received on Tue Oct 27 2009 - 22:07:21 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 28 2009 - 12:00:05 MDT