| Author |
Message |
< RabbitMQ mailing list ~ 100% CPU usage and system crawls to a halt |
| Guest |
Posted: Thu Oct 22, 2009 1:57 am |
|
|
|
Guest
|
| I have rabbitMQ 1.6 on Hardy, and I'm running into an issue where the rabbitMQ process randomly will ramp up to 100% CPU usage and stay there. Once this happens, all message routing crawls to a near halt and the server has to be restarted. |
|
|
| Back to top |
|
| Guest |
Posted: Thu Oct 22, 2009 10:03 am |
|
|
|
Guest
|
Hi Mark,
On Wed, Oct 21, 2009 at 08:57:02PM -0500, Mark Nutter wrote:
> A quick overview of what I have it doing: I'm taking a firehose of Twitter
> statuses and throwing every single one of them into a main queue from which
> they are thrown into a mySQL database. These statuses also get routed to
> other smaller queues based on different routing keys like twitter user ids
> and URLs. These messages come in fast, about 1000 per 10 seconds, and we
> pull the messages off the queue about as fast as they come in.
Are you setting QoS, and are you using Basic.Get or a subscription to a
queue? The latter will be better. Also, if you don't care about losing
messages, make sure you're not setting the persistent flag on the
publishes, and you may wish to set NoAck when pulling messages off the
queue. If you're not setting NoAck, make sure you are acking messages as
you receive them.
Finally, what type of exchange are you using? Topic exchanges are much
slower (especially with large numbers of bindings) than fanout.
> I've seen a few threads discussing the 100% CPU usage problem, but no real
> solutions. Am I going about this the wrong way? What might be causing this
> problem. Is 1.7 a better option and is there a stable package out there
> that works on Hardy? Thanks in advance for your input.
We always recommend using our latest and greatest release, but I'm not
sure if it's available for Hardy yet. I would also suggest that given
the current release of Erlang is R13B02 and the version in Hardy is
R11B5, you're somewhat behind the times there too.
Generally, if you have the logic in your consumers to be able to drop
messages out later on, then we tend to suggest that using a fanout
exchange to multiple queues is much better than using a topic exchange
with many many bindings. We do have plans to improve the efficiency of
the topic exchange, but it's a little way off just yet (unless people
wish to pay us to do it!).
On modern hardware, no persistence, fanout exchange, a real consumer
(not Basic.Get) and setting NoAck, we regularly see around 20kHz,
depending on the message size. Now obviously, that'll change easily with
a billion different variables, but given your message rate of 100Hz, I
would be surprised if you can't make it work.
Please let us know if you have any further salient details!
Matthew
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 11:15 am |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 3:18 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 3:55 pm |
|
|
|
Guest
|
On Fri, Oct 23, 2009 at 10:17:23AM -0500, Mark Nutter wrote:
> Quick question: is there a limit to the amount of exchanges you want to
> create on a particular node? For instance, thousands, even hundreds of
> thousands of exchanges? Thanks,
The exchange is simply a record in memory. It's not especially big, but
it is a resource. Provided you don't run out of memory, there's no other
limiting factor. Of course, if each exchange has several bindings to
several queues and you end up with millions of queues then yes, you will
find that much harder to achieve, it's not impossible though, provided
you have juicy enough hardware.
Matthew
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| 0x6e6562 |
Posted: Fri Oct 23, 2009 4:14 pm |
|
|
|
User
Joined: 12 Jul 2007
Posts: 250
|
Mark,
On Fri, Oct 23, 2009 at 4:55 PM, Matthew Sackman <matthew@lshift.net> wrote:
> On Fri, Oct 23, 2009 at 10:17:23AM -0500, Mark Nutter wrote:
>> Quick question: |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|