[zeromq-dev] Feedback on pubsub pull requests (trie/mtrie fixed, etc.)
Staffan Gimåker
staffan at spotify.com
Mon Jan 30 10:49:18 CET 2012
Hi,
Pieter asked me to ask for feedback on some pull requests which got merged
to master, so here we go:
1. https://github.com/zeromq/libzmq/pull/222
Prune the trie/mtrie when subscriptions are deleted. Without this the
memory usage spirals out of control if you have a dynamic subscription set.
Even if you don't have a dynamic subscription set this is bad since it
provides a way to force a machine into swapping an eventual OOM-death.
JIRA ticket: https://zeromq.jira.com/browse/LIBZMQ-305
2. https://github.com/zeromq/libzmq/pull/227
Reduce memory usage of mtrie. Instead of keeping a std::set around for only
mtrie nodes we only allocate it when needed. Worst case this increase
memory usage by sizeof(void*) bytes per node, but typically it will lower
it. For example, in our application this cuts memory usage in half. The
performance impact should be minimal (I could generate some graphs if
someone thinks otherwise).
3. https://github.com/zeromq/libzmq/pull/223
<https://github.com/zeromq/libzmq/pull/223>Throw away unrecognized
subscription requests on XPUB/PUB sockets rather than aborting with an
assertion. The old behaviour is bad because connecting to a PUB socket and
sending some garbage, unintentionally or not, would kill the process.
JIRA ticket: https://zeromq.jira.com/browse/LIBZMQ-310
We're using all three fixes in our testing environment and will soon start
rolling stuff out in to production.
/S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120130/c3399ce9/attachment.htm>
More information about the zeromq-dev
mailing list