Re: Caching and memory compression

From: Jose Manuel Ruiz <jmruiz@dont-contact.us>
Date: Tue, 25 Mar 1997 10:19:23 +0000

> It won't work compressing images or archives, but would save something
> on HTML and text files. I tried compressing a few HTML files of between
> 2K and 8K in size, the 2K files compressed 50% and the 8K ones 75%.
>
> Possibly using zlib would be an idea, one thing is because of the
> multiplexed operation of Squid each in transit object would require storage
> to keep the state of the compression. Depending of how much state info is
> required could see the compression effects undone.
>
> Personally I see the main memory problem in Squid as being fragmentation
> of the heap. The only real solution I can think of is making Squid use
> handles to the memory rather than real pointers, and running a heap
> compaction algorithm at regular intervals. You should be able to turn
> the cache_mem setting down to a small value like 1MB and still be able
> to cache large objects. Any fragmentation caused by large objects would
> be compacted. Of course Squid would still use the memory while the large
> object is in transit.
>
> Cheers.
> -- +------------------------------------------------------------+
> . | John Saunders - mailto:john@nlc.net.au (EMail) |
> ,--_|\ | - http://www.nlc.net.au/ (WWW) |
> / Oz \ | - 018-223-814 or 02-9477-2881 (Phone) |
> \_,--\_/ | NHJ NORTHLINK COMMUNICATIONS - Supplying a professional, |
> v | and above all friendly, internet connection service. |
> +------------------------------------------------------------+
>
>
>
I was thinking on using zip and unzip functions from gzip.1.2.4.
gzip is gnu and I think that it would be easy to adapt the code.
Now zip(if,of) has two parameters the file handlle to compress (if)
and the file handle to decompress (of). Adapting the code may not be
difficult. I think that I could adapt the code and test it but I do
not know anything about squid source code. If someone can point me
wich modules of squid are subject to modify I will try it.

Regards
Jose Ruiz
jmruiz@cicyt.es
Received on Tue Mar 25 1997 - 01:30:34 MST

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