How can I execute heavy tests on Elgg?

I want to test the Elgg social network through the creation of a large number of users, relationships and contents. Thus, I developed and implemented a plugin with forms for executions vary according to the input parameters. When I executed the tests (obviously), they take more or less time depending on the input parameters.

When the tests are simple, the time required is around 2-4 minutes. With the increasing the parameters, the tests take hours. And with high values, the tests may take 1 or 2 days to finish (or so I think).

I executed the tests from the browser in my admin space of my Elgg social network, but only simple tests worked. Then I executed the tests as script and I could understand the problem (the ram memory). Increasing the memory with this lines on my code,

set_time_limit(0);
ini_set('memory_limit', '-1');

I could run heavier but still insufficient evidence. By the way, I have 8Gb of RAM. I read that PHP is not a good programming language for heavy executions. How can solved my problem? Using another programming language that calls some pieces of my PHP code, maybe? I do not know.

I hope my problem can be solved. Thank.