Re: max_obj_size question - 2.2.2-STABLE2 [improvement patch]

From: <Ted_Rule@dont-contact.us>
Date: Thu, 6 May 1999 09:48:29 +0100

Ahh. Maybe its somehow related to the cache size and swap limits.

Just a thought, but I initially had a very small 100MB cache.swap size. Now that
I've raised it I can't reproduce the problem...

Maybe if the inbound file is large it will find it temporarily overfills the
cache before hitting the max_obj_size? or some other wierd
boundary condition.

Ted

Henrik Nordstrom <hno@hem.passagen.se> on 05/05/99 22:21:58

To: Ted Rule/160GPS/Flextech/UK
cc: squid-users@ircache.net, squid-bugs@ircache.net

Subject: Re: max_obj_size question - 2.2.2-STABLE2 [improvement patch]

Ted_Rule@flextech.co.uk wrote:
> # TAG: maximum_object_size (bytes)

> "Objects larger than this size will NOT be saved on disk"

This is the intended effect of maximum_object_size. Anything else is an
error. The transmission should not be ended only because
maximum_object_size is hit.

I could not repeat your problem (connection terminating when
maximum_object_size is reached). My Squid seems to happily process
objects of any size.

Attached is a small patch wich improves the performance of
maximum_object_size a bit. Previously it would begin storing even
objects larger than maximum_object_size to the disk, only to later find
that it is to much and make the object uncachable. This patch changes
the code to not even begin storing large objects on disk.

--
Henrik Nordstrom
Spare time Squid hacker
Index: squid/src/store.c
diff -u squid/src/store.c:1.1.1.36.8.1 squid/src/store.c:1.1.1.36.8.2
--- squid/src/store.c:1.1.1.36.8.1 Wed Apr 21 15:03:42 1999
+++ squid/src/store.c    Wed May  5 22:42:50 1999
@@ -505,7 +505,7 @@
     debug(20, 3) ("storeCheckCachable: NO: negative cached\n");
     store_check_cachable_hist.no.negative_cached++;
     return 0;      /* avoid release call below */
-    } else if (e->mem_obj->inmem_hi > Config.Store.maxObjectSize) {
+    } else if (e->mem_obj->reply->content_length > Config.Store.maxObjectSize
|| e->mem_obj->inmem_hi > Config.Store.maxObjectSize) {
     debug(20, 2) ("storeCheckCachable: NO: too big\n");
     store_check_cachable_hist.no.too_big++;
     } else if (EBIT_TEST(e->flags, KEY_PRIVATE)) {
Received on Thu May 06 1999 - 02:57:01 MDT

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