From: adrian <> Date: Tue, 15 Aug 2000 13:14:03 +0000 (+0000) Subject: Allow the hot object -> transit object transition point to be configurable, X-Git-Tag: SQUID_3_0_PRE1~1870 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=166891103cfce1bfd78a42abcbbdbf588cba223e;p=thirdparty%2Fsquid.git Allow the hot object -> transit object transition point to be configurable, rather than hard-coded at SM_PAGE_SIZE. This change should allow a higher memory hitrate, and makes the current object memory code kind of behave like the old 'all or nothing' hot object memory cache. This change should now be placed in the handbook/FAQ somewhere. --- diff --git a/ChangeLog b/ChangeLog index 8b880c32d1..33b079a98b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -84,6 +84,10 @@ Changes to Squid-2.4.DEVEL4 (): - Made store dir selection algorithm configurable. - Added support for admin-definable extension methods, up to 20. + - Added 'maximum_object_size_in_memory' as a configuration option - + this defines the watermark where objects transit from being true + hot objects to being in-transit objects in memory. It currently + defaults to 8 KB. Changes to Squid-2.4.DEVEL3 (): diff --git a/src/cf.data.pre b/src/cf.data.pre index 10a1a68d43..716a03a934 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.194 2000/07/18 06:16:41 wessels Exp $ +# $Id: cf.data.pre,v 1.195 2000/08/15 07:14:04 adrian Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -558,6 +558,18 @@ DOC_START means there is no minimum. DOC_END +NAME: maximum_object_size_in_memory +COMMENT: (bytes) +TYPE: b_size_t +DEFAULT: 8 KB +LOC: Config.Store.maxInMemObjSize +DOC_START + Objects greater than this size will not be attempted to kept in + the memory cache. This should be set high enough to keep objects + accessed frequently in memory to improve performance whilst low + enough to keep larger objects from hoarding cache_mem . +DOC_END + NAME: ipcache_size COMMENT: (number of entries) TYPE: int diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 9019802e97..2732a8811e 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.74 2000/07/21 06:06:22 wessels Exp $ + * $Id: store_swapout.cc,v 1.75 2000/08/15 07:14:04 adrian Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -144,7 +144,7 @@ storeSwapOut(StoreEntry * e) */ if (mem->inmem_hi < lowest_offset) new_mem_lo = lowest_offset; - else if (mem->inmem_hi - lowest_offset > SM_PAGE_SIZE) + else if (mem->inmem_hi - lowest_offset > Config.Store.maxInMemObjSize) new_mem_lo = lowest_offset; else new_mem_lo = mem->inmem_lo; diff --git a/src/structs.h b/src/structs.h index fcd8c8b3e4..4f8192d630 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.349 2000/08/10 21:44:44 wessels Exp $ + * $Id: structs.h,v 1.350 2000/08/15 07:14:04 adrian Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -378,6 +378,7 @@ struct _SquidConfig { size_t avgObjectSize; size_t maxObjectSize; size_t minObjectSize; + size_t maxInMemObjSize; } Store; struct { int high;