Heap Size & OOM question (again)

View: New views
5 Messages — Rating Filter:   Alert me  

Heap Size & OOM question (again)

by Dirk Grosskopf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All

We are facing OOM Exception on high traffic situations and already increased the max heap size to 2GB.
Therefore we have to change some of the cache settings.

I already read this http://www.nabble.com/Another-Heap-Space-question-td10968115.html#a10968403 which already gave me tons of information. Never than less I still have the following questions:

Queue Cache: We are using 7.4.0 and this has the cache-size-in-kb setting. The message size varies from less than 1K to 2M, but we expect larger messages in future.
Q: How does this setting overrides the cache-size setting. So what happens if we leave the cache-size 500 and set the cache-size-in-kb to 4098?

smqp-consumer-cache-size: Another problem might be this value. Currently we use the default value of 500 messages. But we have more than 800 connections. How does this comes in play? Our consumers reads from multiple queues and I assume, that we need to reduce this to a minimum? The referenced thread does not name it

Thanks

Re: Heap Size & OOM question (again)

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For the queue cache: Both cache-size & cache-size-bytes-kb are respected (if set). So if you limit cache-size-bytes-kb to 4098 and you reach that limit with 5 messages, the cache is considered full.

The smqp-consumer-cache-size determines the max size of the bulk request from router to client and also the network buffers to transfer the bulk request. You should always use the max size of the messages to calculate the smqp-consumer-cache-size. For example, in your case if you use 2 MB x 5 = 10 MB router output network buffer. This is what you need per connection. Multiply it with 800 = ca. 8 GB for network buffers. That's too much and you should use more routers.

Re: Heap Size & OOM question (again)

by Dirk Grosskopf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, this explains several things we experienced recently.

Are there any plans to add a similar bounadry (cache-size-in-kb) for the smqp-consumer-cache? This would help us to serve different message sizes better and increase stability of the SwiftMQ environment.

Thanks

Re: Heap Size & OOM question (again)

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, this will be part of 7.5.0 (release date isn't fixed yet). We will also reduce the number of n/w buffers.

Re: Heap Size & OOM question (again)

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"smqp-consumer-cache-size-kb" as well as reduction of network output buffers is now included in SwiftMQ 7.5.0.