I am developing a standalone java based application which is supposed to be run on at least a quad core machine. This application takes PDF files as an input and creates an Epub package as an output, now client has asked me to increase the performance of this application using multiple cores. Now I have created one thread for each PDF file to be processed, and on a quad core machine pool of four threads will be opened at a time which increase the performance of whole process by 50%.
But i am not satisfied with the performance, as i think performance can be increase by 80% at least as on single thread application it was producing 10 files in a minutes, and now it is only producing 20 files in a minute on multithreded application where as it should have produced 40 files in a minute as now it is running in four threads at a time.
Kindly suggest what should I follow to achieve the optimal result, is there anything wrong in the above approach? Also i am looking for suggestions that how many concurrent threads can be opened on a quad core machine?