djabberd: c10k? hah!

Jun 26, 2006 22:09

DJabberd just did 25,200 (fully setup) connections with 97 MB of RAM before my Xen instance ran out of memory. It's now 3.4kB of overhead per connection (contrast to 30kB this morning) but there's still obvious ways to trim it down. Should be able to get it down to 2kB. The big win was when I implemented a [forget design pattern name] system ( Read more... )

djabberd, tech, linux, perl

Leave a comment

Comments 22

dormando June 27 2006, 05:13:31 UTC
How are you doing the memory profiling? That's incredible :)

Reply

brad June 27 2006, 05:15:05 UTC
Gtop for these measurements, but as part of the slimming process: a lot of Devel::Size, Devel::Peek, Data::Dumper and (as of today) Artur's new Devel::Gladiator.

Reply

muerte June 27 2006, 15:02:42 UTC
Devel::Gladiator hahaha that rocks. What does it do?

Reply

brad June 27 2006, 16:49:10 UTC
Walks the arena.

Reply


veroz June 27 2006, 05:24:16 UTC
Holy shit.

Reply


xb95 June 27 2006, 06:41:28 UTC
You'll have to explain this to me - how the hell can you get 300,000 connections on a single machine? Won't it run out of fds?

Or can you set the max to something higher in the kernel? But then don't you run out of kernel fd memory?

Reply

xb95 June 27 2006, 06:51:47 UTC
Dude, autotuning of available fd's have been in linux since 2.6.

Reply


# XXX - Hack divelog June 27 2006, 06:50:16 UTC
Hmm so did you fix the fugly exec call to ldapsearch I imagine :)

Reply

Re: # XXX - Hack brad June 27 2006, 15:44:49 UTC
Nope. That's just in the SixApart office subclass of DJabberd. I did change it to cache the company directory for an hour though, figuring we're hiring at less than one new employee per hour. :-)

Reply


mrgatsby June 27 2006, 06:55:51 UTC
Wow! Can I get just the vanilla c25k server framework, without jabberd?

Reply

brad June 27 2006, 16:50:42 UTC
That's just epoll. If you want to make event-based programs easily check out Danga::Socket or POE on CPAN.

Reply


Leave a comment

Up