Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0

Sunday 3 October 2010

Performance tune-ups (or not) for jruby sunflow raytracing

When I realised that sunflow is multi-threaded I thought there may be some performance tune-ups possible.

These are the steps I tried:-
  1. I've updated my sunflow to use the latest janino compiler, only a small amount of re-factoring was required essentially deprecating two types of error and revising one because it has been re-factored to the commons-compiler.
  2. I'm using the --server option
  3. I'm using the --fast option
  4. I've increased the heap space -J-Xmx1024m
  5. I've enabled thread pooling -J-Djruby.thread.pooling=true

I'm not sure what effect if any updating the janino compiler has but to my mind it makes the application a bit more future-proof (there is the option to upgrade from java 1.4 syntax see janino web site). The windows 0.073 version of sunflow is claimed to be faster on the basis of a native compiler, I doubt it.

Using the server option is a good thing, regular java uses it by default, I'm not sure about jruby. Because --server is a proxy for -J-server, suggest to me that you may need this option since it has been made easier to use?

Using the --fast option ensures pre-compilation (amongst other speed-ups) which must be good thing here?

Allocating increased memory is the only thing the sunflow.sh script does. Running the sunflow.jar directly (java -jar sunflow.jar) requests > 800 mb heap space to run.

The thread pooling is used to prevent wasteful ruby green threads being spawned. Both cores on my dual core linux box were kept running flat out according to my conky readout.

Now the difference between none of these measures, and running with the speed-ups seemed to be noticeable, so I thought I would measure it?

Conclusion

Now I've done a bit of measurement I'm not so sure perhaps it was the janino compiler change after all?

The --server command certainly makes no difference for me, default is --server.

Well it turns out it is all in the imagination when I measured the different compilers with or without any "performance" options performance was much the same...

However I was very impressed with the new StructureSynth built in ray tracing facility, which has apparently been been built with efficiency in mind, the default setting is for 4 processors (2 real, 2 virtual). Apparently povray lags behind in that regard?

No comments:

Post a Comment

Followers

About Me

My photo
I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2