Tomasz Sterna wrote: > From: Eric Liang >> I guess the designment is to get a static element container, but >> what about if there are a great amount users registered while just a >> few of them are active? Meanwhile, the empty elements list will come >> to a bottleneck while getting an element not exists in the hash table. > > Seems correct. > Did you do any benchmarking? Not yet. for me , this is an issue more about memory usage than efficiency , while a hash table 's efficiency is much concerned with the collision (or the real data), IMHO. However, a smaller bucket-list is good for that.
> >> two patches are attached, while the second one is to print the stat >> of xhash, just for debug the initial size( sm->users/ sm->sessions >> for example). > > Cool. Have you tested it under live conditions (with real users)? Still testing. yes, under live conditions. Actually, I am puzzled by the memory using of _router_ which increasing vastly these days. It looks like that the limit of _sm's_ throughput led to a large size of _jqueue_ in _router._ The _jqueue_ is ok after checking, but when I came to the _xhash,_ it looks not that fine. > > Could you create a new Bug on Launchpad > https://bugs.launchpad.net/jabberd2/+filebug and attach the patches to > it? > > No problem, I'll do that asap. There are more jabberd-servers today, Jabberd2 is still a good choice. Thanks for your hard work. Eric
signature.asc
Description: OpenPGP digital signature
