--------------------- PatchSet 1855 Date: 2001/04/09 11:38:22 Author: akroonmaa Branch: chunked_mempools Tag: (none) Log: Tune memPool chunk size up from 16K to 512K and larger for some massive pools Members: src/mem.c:1.9.8.2->1.9.8.3 src/repl/lru/store_repl_lru.c:1.7->1.7.8.1 Index: squid/src/mem.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mem.c,v retrieving revision 1.9.8.2 retrieving revision 1.9.8.3 diff -u -r1.9.8.2 -r1.9.8.3 --- squid/src/mem.c 9 Apr 2001 09:46:49 -0000 1.9.8.2 +++ squid/src/mem.c 9 Apr 2001 11:38:22 -0000 1.9.8.3 @@ -1,6 +1,6 @@ /* - * $Id: mem.c,v 1.9.8.2 2001/04/09 09:46:49 akroonmaa Exp $ + * $Id: mem.c,v 1.9.8.3 2001/04/09 11:38:22 akroonmaa Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -280,13 +280,16 @@ memDataInit(MEM_STATCOUNTERS, "StatCounters", sizeof(StatCounters), 0); memDataInit(MEM_STMEM_BUF, "Store Mem Buffer", SM_PAGE_SIZE, Config.memMaxSize / SM_PAGE_SIZE); + memPoolTune(MemPools[MEM_STMEM_BUF], 512 * 1024, 0); memDataInit(MEM_STOREENTRY, "StoreEntry", sizeof(StoreEntry), 0); + memPoolTune(MemPools[MEM_STOREENTRY], 2048 * 1024, 0); memDataInit(MEM_STORE_CLIENT, "store_client", sizeof(store_client), 0); memDataInit(MEM_SWAPDIR, "SwapDir", sizeof(SwapDir), 0); memDataInit(MEM_USHORTLIST, "ushort_list", sizeof(ushortlist), 0); memDataInit(MEM_WORDLIST, "wordlist", sizeof(wordlist), 0); memDataInit(MEM_CLIENT_INFO, "ClientInfo", sizeof(ClientInfo), 0); memDataInit(MEM_MD5_DIGEST, "MD5 digest", MD5_DIGEST_CHARS, 0); + memPoolTune(MemPools[MEM_MD5_DIGEST], 512 * 1024, 0); memDataInit(MEM_HELPER, "helper", sizeof(helper), 0); memDataInit(MEM_HELPER_STATEFUL, "stateful_helper", sizeof(statefulhelper), 0); memDataInit(MEM_HELPER_REQUEST, "helper_request", Index: squid/src/repl/lru/store_repl_lru.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/repl/lru/store_repl_lru.c,v retrieving revision 1.7 retrieving revision 1.7.8.1 diff -u -r1.7 -r1.7.8.1 --- squid/src/repl/lru/store_repl_lru.c 3 Mar 2001 10:44:34 -0000 1.7 +++ squid/src/repl/lru/store_repl_lru.c 9 Apr 2001 11:38:22 -0000 1.7.8.1 @@ -264,8 +264,10 @@ /* no arguments expected or understood */ assert(!args); /* Initialize */ - if (!lru_node_pool) + if (!lru_node_pool) { lru_node_pool = memPoolCreate("LRU policy node", sizeof(LruNode)); + memPoolTune(lru_node_pool, 512 * 1024, 0); + } /* Allocate the needed structures */ lru_data = xcalloc(1, sizeof(*lru_data)); policy = cbdataAlloc(RemovalPolicy);