Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

Scaling Challenges

kklosson

start %JAVA_HOME%\bin\javaw -Xms512m -Xmx2432m -XX😛ermSize=128m -XX:MaxPermSize=256m -Xss512k -cp %CLASSPATH% com.bas.controlcenter.ControlCenterApp

So you are only allocating 2GB to AwareIM? I've been using this:

start %JAVA_HOME%\bin\javaw -Xmx4096m -Xms20m -cp %CLASSPATH% com.bas.controlcenter.ControlCenterApp

Can you walk me through those parameters and explain your settings?


Rennur

I think the -Xmx setting is for Java heap size and it is not used to define the allocation of system memory to Java.
System memory is allocated through your Aware IM control panel settings.

Try reducing the -xmx and see if there are any performance improvements. Maybe add some of the other parameters as well, permsize and xsx to test it out.

I'm not really qualified enough to guide you through all the parameters. I did some research a while back and it was based on suggestions i found on the topic. It's really a trial & error sort of configuration.


kklosson

I'll try this. Thanks again.


Rennur

Here is another interesting post I just found regarding ActiveMQ (default Aware IM version is 5.8.0)

It's used to reliably communicate between two distributed processes. ... you could store messages in a database to communicate between to processes, but as soon as the message is received you'd have to delete the message. That means a row insert and delete for each message. When you try to scale that up communicating thousands of messages per second, databases tend to fall over.

Message oriented middleware like ActiveMQ on the other hand are build to handle those use cases. They asume that messages in a healthy system will be deleted very quickly and can do optimizations to avoid the overhead. It can also push messages to consumers instead of a consumer having to poll for new message by doing a SQL query. This further reduces the latency involved in processing new messages being sent into the system.

Aware IM by default uses ActiveMQ ver. 5.8.0. The latest version is 5.15.0 (unfortunately not working with Aware IM). As you can imagine, there would be a huge number of bug and performance fixes if we could use the latest version.

Aware IM does work with Active MQ 5.12.1 (I use this). Just like the latest version of MySQL connector J (highly recommended), replace the old ActiveMQ 5.8.0 with the stable version 5.12.1. You can see my post regarding this on my Github page.

Support does not believe ActiveMQ plays a big role is overall system performance but I beg to differ. Hopefully they will make the latest version compatible with Aware IM in the future.


kklosson

Not familiar with ActiveMQ. Is that in the AwareIM bundle?


Rennur

Yes, it is part of the Aware IM installation bundle. It is found in C:\AwareIM\Tomcat\lib.
ActiveMQ replaced JBoss.

Download ver 5.12.1, rename it to 5.8.0 and replace the old one. Backup old version first of course.


ACDC

My system has 16gb of RAM. Depending on your total RAM, innodb_buffer_pool_size should be between 70-80% of total ram. The rest would be used by the system and Aware IM server.

For absolute MySql optimisation, innodb_buffer_pool_size should equal the size of your database on DISK - that's if you want to get serious



Rennur

Summary of the optimised Aware IM server environment and platform (aim for all components to be 64bit):

Java:
Java JDK 64bit Version 8

Tomcat:
Tomcat 9.0.0.x 64bit or
Tomcat v8.5.x 64bit or
Tomcat v8.0.45+ 64bit (Stock - Tomcat 8.0.14 32bit)

Tomcat settings server.xml:
maxThreads="300"

MySQL connector:
Connector/J v5.1.42+

MySQL:
MySQL Community Server 5.6.x 64bit

ActiveMQ ver. 5.12.1 (Stock 5.8.0 - latest versions don't currently work with Aware IM)

MySQL my.ini parameters:
max_connections=500
innodb_buffer_pool_size=10G (or 70%-80% of total system RAM - if 8gb RAM, set to pool size 6GB or less )
innodb_buffer_pool_instances=16 (if 8gb ram set instances to 8)
innodb_open_files=500
innodb_read_io_threads=64
innodb_write_io_threads=64
innodb_io_capacity=1000
max_allowed_packet=132M
query_cache_size=201M

AwareIM>bin>startAwareIM.bat:
start %JAVA_HOME%\bin\javaw -Xms512m -Xmx2432m -XX😛ermSize=128m -XX:MaxPermSize=256m -Xss512k -cp %CLASSPATH% com.bas.controlcenter.ControlCenterApp

Has anyone got any suggestions, own configurations or own test results?


ACDC

My DB is 105GB. Are you suggesting 1gb of RAM per 1gb of data?

Yes that would be a problem.... I had a similar problem when our DB was 50GB, then I moved all the documents and images to the file system and ended up with a 2.6 GB database and I was able to use this rule - Interesting enough when I allocated more than needed ie 5 GB to a 2.6GB size database, it started to use some of this extra space . So a reduction in disk access and extra efficiency is being achieved to some extent -

The topic is subjective, also depends on the type of application and usage I suppose-- But I will stay with this rule as long as I can afford it


Rennur

Not familiar with ActiveMQ. Is that in the AwareIM bundle?

Yes, it is part of the Aware IM installation bundle. It is found in C:\AwareIM\Tomcat\lib.
ActiveMQ replaced JBoss.

There is a critical messaging bug in version 5.8.0 (fixed in ActiveMQ 5.9.0) that can cause the system to hang due to large queues. There are also memory and java heap issues fixed in the latter versions that may improve system performance (some of them critical).
Here is the link to the bug

Download ver 5.12.1, rename it to 5.8.0 and replace the old one. Backup old version first of course.

Have tried replacing the activemq.jar with the latest version to see if it addresses the system unresponsiveness?

Out of curiosity, is there a latest update to your dilemma 🙂 ?

Cheers



« Previous Page