0

I need to do some performance tests of an application in a remote AWS cluster. I've been asked to measure the maximum memory usage of the tasks in the task queue of a Java Thread Pool obtained using Executors.newScheduledThreadPool(1).

I know that I can get the number of tasks in the queue using the Executor interface, but I don't know how to measure the memory usage of a single task, so I can't calculate the maximum usage.

user2342558
  • 5,567
  • 5
  • 33
  • 54
Scarlat7
  • 1
  • 5
  • You may take a look on [Memory consumed by a thread](https://stackoverflow.com/questions/25033458/memory-consumed-by-a-thread). – samabcde Jul 10 '19 at 13:59
  • But don't those tools measure memory usage when a thread is running? I need to know how much memory the tasks consume while they're in the queue, not when they're in the execution pool (i.e.: when they're active). – Scarlat7 Jul 10 '19 at 14:16

0 Answers0