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

From: Henrik Nordstrom <[email protected]>
Date: Wed, 05 May 1999 23:21:58 +0200

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 Wed May 05 1999 - 15:17:03 MDT

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