diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-08 14:27:20 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-08 14:27:20 +0000 |
commit | 702ba5ecad8d2c9df034727253b94098fb09e711 (patch) | |
tree | cb373a9f1a974b18330307221aa5c72741604cc9 | |
parent | 08d1f29173d43744e37bcbd4259777096e2398f2 (diff) |
- Tweaked various mempool chunk sizes
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@1965 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | config.h.in | 11 | ||||
-rwxr-xr-x | configure | 30 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | src/conf.c | 3 | ||||
-rw-r--r-- | src/hash.c | 8 |
5 files changed, 46 insertions, 28 deletions
diff --git a/config.h.in b/config.h.in index 1ac7001..54b35b8 100644 --- a/config.h.in +++ b/config.h.in @@ -237,12 +237,21 @@ /* Size of the dns mempool chunk. */ #undef MP_CHUNK_SIZE_DNS +/* Size of the ip_entry mempool chunk. */ +#undef MP_CHUNK_SIZE_IP_ENTRY + /* Size of the local client mempool chunk. */ #undef MP_CHUNK_SIZE_LCLIENT -/* Size of the channel mempool chunk. */ +/* Size of the channel-member mempool chunk. */ #undef MP_CHUNK_SIZE_MEMBER +/* Size of the namehost mempool chunk. */ +#undef MP_CHUNK_SIZE_NAMEHOST + +/* Size of the userhost mempool chunk. */ +#undef MP_CHUNK_SIZE_USERHOST + /* Size of the watch mempool chunk. */ #undef MP_CHUNK_SIZE_WATCH @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 1920 2013-04-30 14:51:30Z michael . +# From configure.ac Id: configure.ac 1947 2013-05-05 10:23:03Z michael . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for ircd-hybrid 8.1beta3. # @@ -13942,34 +13942,44 @@ fi $as_echo "#define NICKNAMEHISTORYLENGTH 32768" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_CHANNEL 64*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_CHANNEL 1024*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_MEMBER 32*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_MEMBER 2048*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_BAN 16*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_BAN 1024*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_CLIENT 256*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_CLIENT 1024*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_LCLIENT 128*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_LCLIENT 512*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_DNODE 8*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_DNODE 32*1024" >>confdefs.h $as_echo "#define MP_CHUNK_SIZE_DBUF 512*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_AUTH 32*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_AUTH 128*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_DNS 16*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_DNS 64*1024" >>confdefs.h -$as_echo "#define MP_CHUNK_SIZE_WATCH 4*1024" >>confdefs.h +$as_echo "#define MP_CHUNK_SIZE_WATCH 8*1024" >>confdefs.h + + +$as_echo "#define MP_CHUNK_SIZE_NAMEHOST 64*1024" >>confdefs.h + + +$as_echo "#define MP_CHUNK_SIZE_USERHOST 128*1024" >>confdefs.h + + +$as_echo "#define MP_CHUNK_SIZE_IP_ENTRY 128*1024" >>confdefs.h + # Argument processing. diff --git a/configure.ac b/configure.ac index 344d6b9..1e863a9 100644 --- a/configure.ac +++ b/configure.ac @@ -148,16 +148,20 @@ AS_IF([test "$assert" = "no"], AC_DEFINE([NICKNAMEHISTORYLENGTH], 32768, [Size of the WHOWAS array.]) -AC_DEFINE([MP_CHUNK_SIZE_CHANNEL], 64*1024, [Size of the channel mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_MEMBER], 32*1024, [Size of the channel mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_BAN], 16*1024, [Size of the ban mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_CLIENT], 256*1024, [Size of the client mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_LCLIENT], 128*1024, [Size of the local client mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_DNODE], 8*1024, [Size of the dlink_node mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_CHANNEL], 1024*1024, [Size of the channel mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_MEMBER], 2048*1024, [Size of the channel-member mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_BAN], 1024*1024, [Size of the ban mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_CLIENT], 1024*1024, [Size of the client mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_LCLIENT], 512*1024, [Size of the local client mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_DNODE], 32*1024, [Size of the dlink_node mempool chunk.]) AC_DEFINE([MP_CHUNK_SIZE_DBUF], 512*1024, [Size of the dbuf mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_AUTH], 32*1024, [Size of the auth mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_DNS], 16*1024, [Size of the dns mempool chunk.]) -AC_DEFINE([MP_CHUNK_SIZE_WATCH], 4*1024, [Size of the watch mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_AUTH], 128*1024, [Size of the auth mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_DNS], 64*1024, [Size of the dns mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_WATCH], 8*1024, [Size of the watch mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_NAMEHOST], 64*1024, [Size of the namehost mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_USERHOST], 128*1024, [Size of the userhost mempool chunk.]) +AC_DEFINE([MP_CHUNK_SIZE_IP_ENTRY], 128*1024, [Size of the ip_entry mempool chunk.]) + # Argument processing. AX_ARG_ENABLE_IOLOOP_MECHANISM @@ -432,8 +432,7 @@ attach_iline(struct Client *client_p, struct MaskItem *conf) void init_ip_hash_table(void) { - ip_entry_pool = mp_pool_new(sizeof(struct ip_entry), - 2 * hard_fdlimit); + ip_entry_pool = mp_pool_new(sizeof(struct ip_entry), MP_CHUNK_SIZE_IP_ENTRY); memset(ip_hash_table, 0, sizeof(ip_hash_table)); } @@ -69,12 +69,8 @@ static struct UserHost *userhostTable[HASHSIZE]; void hash_init(void) { - /* Default the userhost/namehost sizes to CLIENT_HEAP_SIZE for now, - * should be a good close approximation anyway - * - Dianora - */ - userhost_pool = mp_pool_new(sizeof(struct UserHost), MP_CHUNK_SIZE_CLIENT); - namehost_pool = mp_pool_new(sizeof(struct NameHost), MP_CHUNK_SIZE_CLIENT); + userhost_pool = mp_pool_new(sizeof(struct UserHost), MP_CHUNK_SIZE_USERHOST); + namehost_pool = mp_pool_new(sizeof(struct NameHost), MP_CHUNK_SIZE_NAMEHOST); hashf_xor_key = genrand_int32() % 256; /* better than nothing --adx */ } |