HOME BLOG

Archive for November, 2026

How to set the JVM heap size when running large-scale performance tests with Gatling framework

Posted on: November 13th, 2026 by Olu No Comments

Hi Folks,

In this post, I will cover how to set the JVM heap size size to allow you run large-scale performance tests using the popular Gatling framework.

What do I mean by large-scale? I mean tests that use a lot of memory, for example, endurance tests that simulate very many users using your application over an extended period of time.

When you try implementing these kinds of tests, you may run into out-of-memory heap size error. Why does this happen? It happens because the default heap size may not be sufficient to hold all the user objects needed for the test.

So How do you increase the heap size available to the test? You can do this by specifying a suitable heap size using the -Xmx option. -Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM). How do you pass in -Xmx option? By using the gatling.jvmArgs argument. Assuming you use Maven and you have the Gatling Maven Plugin installed in your project, you can find out about this argument by running the following command:

mvn gatling:help -Ddetail=true -Dgoal=test

So, when you want to run your test, let’s say you want to set the maximum heap size to 2 GB, you can use a command like:

mvn gatling:test gatling.jvmArgs=-Xmx2g

That’s all for now. Till next time, happy software development.

Resources

OndraZizka/GatlingMavenPluginDocs.md. https://gist.github.com/OndraZizka/7deaef4ec68a1769f9b4ffc67a487bda

Gatling Maven Plugin. https://docs.gatling.io/integrations/build-tools/maven-plugin/

Gatling. https://gatling.io/

How to view the output of a running background process in Linux

Posted on: November 10th, 2026 by Olu No Comments

Hi Folks,

In this post we talk about how to view the output of a background process while it is running in Linux. Why is this important? It could come in handy if you need to troubleshoot problems with a program that was started in the background by another program, especially when you’re dealing with third-party software where you can’t easily set up logging as you wish. The way to do this is to use the proc system.

First, find the process id. You can do this by running the following command

ps aux | grep "your program name"

This command will list all processes that match the name of the program you supply. You will also see the id of each process. Once you find the id of the process your program is running under, then use the tail command and proc system to access its output. Run a command like

tail -f /proc/<process id>/fd/1

Note that 1 represents stdout while 2 represents stderr. The tail command displays the last part of a file. The -f flag tells tail not to stop when the end of the file is reached, but to wait for more data to be appended to the input. This gives a streaming effect.

In case tail doesn’t work, you can use the cat command to view all contents of the file by running a command like

cat /proc/<process id>/fd/1

That’s all for now. Till next time, happy software development.

Resources

The /proc Filesystem. The Linux Kernel. https://www.kernel.org/doc/html/latest/filesystems/proc.html#proc-pid-fd-list-of-symlinks-to-open-files