Hello,
I am currently observing the cpu and memory usage of disruptor and threadpool in a message broker scenario,
- A producer will generate and fire messages in certain amounts to ActiveMQ Queue
- A single thread consumer will take the item from queue and pass it to the framework (Threadpool or Disruptor)
- A simple database mapping with message's attributes will be done
- A publisher will send the final message to another queue
I turned off my wifi connection, and didn't open any program when running the experiment on my laptop
I set up so either threadpool and disruptor will be using 1 thread only in consuming from queue, processing message until publishing it back..the only parameter i played is buffer size (disruptor) and working queue (threadpool)
I experimented by firing 60k messages and let my module process it by using disruptor and threadpool alternately, then i logged the cpu and memory usage per second and calculate the average values of both..


I see significant pattern in cpu % (although i haven't known why threadpool' usage is declining at certain queue size), however i can't say i see any pattern in memory %.. My colleagues also say the same thing, the graph say nothing at all...Any suggestions how can i know the comparison between cpu and memory usage of threadpool and disruptor?
Whether i have wrong setup?
Actually my friend said that i need to know the effects / impacts / relationship between buffer size and queue size to memory, where should i start?
Thank you