I am just wondering how to define size of a fixedthreadpool in java?
Do you arbitrary choose a number like 10, 100, 16, 32, 1024, then have a look at the memory to see if it is ok on full load?
I am considering of defining the size according to the number of available cores
My idea is that the cpu wont by able to handle more threads than its number of cores if one thread needs 100% power on 1 core:
ex : dual core cpu >>> newFixedThreadPool(2)
quad core >>> newFixedThreadPool(4)
however, if a thread takes like 10% cpu power of a core, is it then relevent to do
1/0.1 * number of core => newFixedThreadPool(20) for a dual core ?
Thanks for your answers / opinions