# Increasing maximum available memory testing. How to get better results?

**URL:** <https://discourse.processing.org/t/increasing-maximum-available-memory-testing-how-to-get-better-results/825>\
**Category:** Processing\
**Created:** [June 10, 2018, 2:27am UTC](https://discourse.processing.org/t/increasing-maximum-available-memory-testing-how-to-get-better-results/825 "2018-06-10T02:27:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bontempos](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bontempos/32/397_2.png) [@bontempos](https://discourse.processing.org/u/bontempos)\
**Post date:** [June 10, 2018, 2:27am UTC](https://discourse.processing.org/t/increasing-maximum-available-memory-testing-how-to-get-better-results/825/1 "2018-06-10T02:27:45Z")

</div>

This is a i7-8700, 32Gb of RAM, NVIDIA GeForce GTX 1080, running Windows 10 and Java 8 (171) installed and heap memory set to max 32Gb(-Xmx32g) (?) on run parameters.

I think this is not a question about library. However, as experiment, I am running an example from **box2D library for processing** named **Liquidy.pde** where I changed the sketch `size`to (600,300) and tested 3 renderers (default, `JAVA2D` and `P3D`). `P2D` was way too slow to be considered at this point.  
I am printing the total memory, allocated memory, free memory, n of particles, fps in the title of the sketch.  
I am also declaring the sketch to run at 60 fps using `frameRate(60);`  
I have tried to _increase maximum available memory_, but when the option was disabled, I have got a slightly better performance in fps.

When running the sketch, a click of mouse will generate a particle system.  
10 clicks would generate an environment with about 1000 particles, and 15 clicks will stay around 1700. See attached picture:  
 ![]()

With 10 particle systems, each rendered kept sketch running around 60 fps:`JAVA2D` a little worse than default. `P3D` performed just a little better.  
for 15 particle systems, frame rate will decrease to 15 fps (`P3D`), 19fps (`JAVA2D` and default).

Disabling the “increase maximum available memory” in preferences (and restarting?) made default renderer and `JAVA2D` to perform a little better when running 15 particle systems. From ~20fps, they jumped to 25fps.

I am not running out of memory and I wonder if there is any way to improve the performance of my sketches.  
Thanks

![](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/8b0bc991e8a475639bf5658b6da384de33e29d6c.JPG)
