Hello.

Jabberd2 support virtual domains. But, this support is limited. I mean,
that we can not support new domains without adding them into sm.xml and
restarting session manager process(as far as I know).
More than that, if we need to support many virtuail domains - it is
become a problem(about 10K. I want to support many domains, because 
we have a lot of clients with a lot of domains(virtual hosting) and we
want give everyone jabber support for domain.).

The problem is that if we have about 10k domains in our sm.xml,
then restarting time of jabberd is about 15 minutes. Bigger part of this
time is consumpted by router process.
I have made some tests and understand, that router spend its time for
this code:
router.c: 307 line

    /* tell the new component about everyone else */
    xhash_walk(comp->r->routes, _router_advertise_reverse, (void *)
    comp);

I measure time for this call and number of elements in comp->r->routes.
There are results:
1 elements is 0.000160000000
2 elements is 0.000610000000
3 elements is 0.000750000000
4 elements is 0.000430000000
5 elements is 0.000650000000
6 elements is 0.000540000000

--- --- ---
62731 elements is 0.141400000000
62732 elements is 0.141670000000
62733 elements is 0.143430000000
62734 elements is 0.141510000000
62735 elements is 0.141460000000

We can see, that this time consumption is significant.
More than that, the problem is also that really we don't need to
support all of this domains, but only those, for which we have accounts.

I have writen patch, which solve this problem(I believe).
The idea is that we set handler for SIGALRM signal and every rldtime
secs(new directive in sm.xml) get distinct lists of realms from authreg
table. Than we check every realm in sm->avail list and if we have no
record for this domain - we dynamically add it. Patch need some
additional function with storage modules, but I think, this function
which allow us to generate customize querys to data backend is helpful.







-- 

Dmitry Banshchikov

-- 
To unsubscribe send a mail to [email protected]

Reply via email to