In our recent blog post OFBiz Performance Tip: sync vs async, we shared details outlining how two different OFBiz instances could be used to successfully process heavy loads generated in our load testing sessions. In that blog we shared how the load generated by synchronous and asynchronous services can be split and processed by the two OFBiz instances. In this post, we take it a step further to discuss technical design for Apache OFBiz load testing with Apache JMeter.
Design 1 – Master-Slave Design
The diagram below features a JMeter master-slave setup design used for load testing Apache OFBiz. To increase the load on the targeted OFBiz server any number of slave nodes can be added to the master system. More detailed information from the JMeter folks can be found here. This configuration is recommended when you want to generate a heavy load on the targeted server and the slave nodes have less RAM and a low speed processor.
Design 2: Single Machine Single User and Single Machine Multiple User
In this setup, there are two main combinations that can be used:
- Single Machine Single User: If the machine configuration is average then we can add a single user to every single machine and perform load testing. Machines of this type can be connected in parallel for the desired amount of load.
- Single Machine Multiple User: If the machine configuration is high then we can create multiple user on that machine. The user name can be kept as user1 , user2, user3 … and so on. Each user will have a separate JMeter and jdk setup available for its use. For example, say we have 16GB RAM available with a high configuration machine and we want to setup two users on that machine. We can assign 6GB RAM to the JMeter setup of user1 and 6GB RAM to the JMeter setup of user2, and the remaining 3GB RAM will be used by the operating system.
The hardware configuration details for all the servers involved in design two are shown below:
1) OFBiz01 Server: This server will be responsible for managing all the synchronous jobs.
2) OFBiz02 Server: This server will be responsible for managing all the asynchronous jobs.
3) Apache Server: All the requests will come to this server, and they will be transferred to OFBiz01 server where ofbiz instance is running.
4) Database Server:
The following configuration changes need to be done in my.cnf file:
slow_query_log = 1
log_slow_queries = 1
long_query_time = 3
log_output = TABLE
expire_logs_days = 2
innodb_buffer_pool_size = 10G
innodb_lock_wait_timeout = 300
innodb_file_per_table = 1
5) Jmeter Server:
Running the scripts
Once we have the required hardware configuration, we run JMeter scripts with large number of threads spread equally across two or more different users on the same machine.
We have worked with both designs and found that Design 2 is the better option for the load testing on the Amazon cloud.
Thanks for your time!
Ashish began his career as a Software Engineer with Aditisoft Solutions & Consulting Services Pvt. Ltd. (now HotWax Media Pvt. Ltd.) in 2003, and is now Vice President of Operations. Ashish is the local manager of offshore development efforts for HotWax Media. With an emphasis on providing training both to internal HotWax Media employees as well as to clients, Ashish has worked on a variety of projects for clients in North America, Europe and India. He continues to be dedicated to the Apache OFBiz open source project since 2003 and became committer in 2007. He is also a member of Project Management Committee for Apache OFBiz project. Ashish graduated in 2003 from RGPV University, Bhopal (M.P) India, with a Bachelor of Engineering(B.E) degree in Computer Science.