AdamBien / lightfish

Payara / GlassFish Monitoring Utility
121 stars 41 forks source link

Parallel Data Collection #6

Closed rveldpau closed 11 years ago

rveldpau commented 11 years ago

I have added an option to perform the data collection in parallel. While testing I was able to get quite substantial performance increases. The table below shows the speed increases I was able to achieve. I tested against a local server (on same host), and a remote server (through VPN to another city). I was also able to make some modifications that increase performance without enabling the parallel option.

                                       Local Server        Remote Server
Before Modifications                     2200 ms              6500 ms
After Modifications (w/o Parallel)       1750 ms              4200 ms
After Modifications (w Parallel)         1200 ms              2000 ms

The option itself is available in Advanced Configuration under Experimental options. I have placed it under experimental options because it uses Fork/Join to run the data collection in parallel. This is against the EE specification, which does not allow you to create your own threads, but it does not appear that Glassfish 3.X has a good way of handling parallel processing. Also, in this case, the threads should not interfere with the EE server. The main concern regarding spawning your own threads (it seems) is that they will not belong to any transaction; however, since we are only gathering the data in parallel, I believe the concern to be minimal.

rveldpau commented 11 years ago

I appear to have a thread leak. I'll create another request when I have that resolved.

rveldpau commented 11 years ago

I have fixed the thread leak, so I am reopening this request.

AdamBien commented 11 years ago

Thanks for your contributions!