Re: no object size in lru_add

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 16 Jan 2002 02:30:44 -0700

I bet that is because at the time the object is created and
initially inserted into the storage system, if the reply doesn't
contain an explicit length squid doesn't have a way of knowing
what the object size is going to be.

So, what you need, is some method to remove and re-insert objects
into the replacement policy _after_ the object has been totally
received and the size is known (hint: the object hits STORE_OK
at this stage.)

Adrian

On Wed, Jan 16, 2002, Torsten Isenhardt wrote:
> Hi,
>
> I've got a problem with object sizes when using size-based replacement
> policies in squid-2.4.STABLE3.
>
> I want to change store_repl_lru.c so that the replacement policy
> inspects object sizes, too. But sometimes object size is set to -1,
> there is no entry->mem_obj->object_sz or entry->swap_file_sz to get the
> real object size. The value of -1 sometimes appears if the requested
> object is not cached and has to be requested from a server. As soon as
> the object is cached swap_file_sz is correct, but that happens after
> calling lru_add, when I need the object size.
> Is it possible to get the correct object size in function lru_add?
>
> When I tried heap GDSF replacement policy, which uses object sizes too,
> the same problem appears. Here a default value of 1 is used if there is
> no object size...
>
> Thanks in advance,
>
> Torsten
Received on Wed Jan 16 2002 - 02:30:45 MST

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