[JDEV] Karma and Jabber 1.2 RC
keith at digix.dyndns.org
Mon Oct 30 13:03:17 CST 2000
> to a file. The file contained lots of messages saying that the two sockets
> involved in the message
> exchanges were "out of karma". No data transfer was taking place at all at
> this point!
well, they will still exchange data, only *slowly*.. the karma system is an i/o rate limiting system, to prevent users from sending too much data to fast.. by default, it will allow up to 5.5K of data to be sent in 2 seconds, or a sustained rate of 1K/2sec.. when you get the "out of karma" message, you will only be allowed to send data about 1.5K every 10 seconds... since you broke the rate limits..
> There is a document describing karma in the docs directory in the
> jabber_1.2RC package.
> Apparently karma is a flow-control mechanism imposed on socket connections
> from the client.
Yeah, this document is pretty up to date, and i believe explains all the configurable "knobs" for karma control...
> Karma is used in the pthsock code contained in the Jabber_1.2RC package.
Just as an FYI, karma will be moving into libjabber, as soon as the API becomes solid.
> I did find a setting that got around
> my problem but is it the correct
Yes, you did find the correct solution.. setting <dec/> to 0 will disable karma, since it will never decline any.
> o I tried various karma configuration settings, like raising the max to 100
> or so. Some of these attempts
> resulted in Jabber 1.2 exiting (no core dump, just an exit or an abort)
> when I ran my client tests.
That's interesting.. can you give me the values that are causing the server to crash? (it should always be core dumping if it's related to karma.. there are no exit calls in there) -- check your 'ulimit -c' to see if you can produce a core file.. if it returns 0, enter 'ulimit -c unlimited' at the shell prompt.
> What is the intent of karma and its use? Should I somehow compute an
as i mentioned above, it limits the ammount of data a "malicious" user can send at a time, to flood the server, or another user. it's an i/o limiter.
> expected maximum throughput
> and derive a set of karma values and then recompile the source to reflect
> this instead of just turning it off?
karma can be configured from your jabberd config file, under either the pthsock_client or pthsock_server config sections.
> Is Karma going to be used in 1.3 when you shift to pthreads (I presume you
> guys mean GNU pthreads?)?
Yes, karma will be used in 1.3+ versions of the server, as it is an important part of scalability, and to some extent abuse limiting... it is not dependant on pth, or the pthsock component -- (the pthsock component will survive the move to pthreads by the way, just may get a new name *g*)
> What are the possible range of values for the various karma settings in the
> Jabber.xml file?
there is no exeption on the range of values, which is probably why you got it to core. however, some values when put in will not function properly, or the way you expect.. (like setting max less than zero).
More information about the JDev