Darokrithia / PopGenSim

Simulates polygenic evolution of the polygenic trait of digital genomes aka degnomes
MIT License
2 stars 1 forks source link

More threads seems to slow down the jobs #4

Closed Darokrithia closed 4 years ago

Darokrithia commented 5 years ago

I'm not sure that job-queue is implemented correctly. Making 100 threads seems to make my computer slower. That probably is because I don't have 100 cores, but even so, 4 threads don't seem any faster than 1 and in fact seem a bit slower via amateur timing with my phone. I'd like to verify that the multithreading has been done correctly and that multithreading is beneficial before I merge into master.

Darokrithia commented 5 years ago

This seems to likely be caused by the fact that heap usage goes up 100 fold (at least according to Valgrind).

alanrogers commented 5 years ago

The optimal number of threads is usually about 3/4 the number of hypercores. 100 threads would definitely slow you down. I'll have a look at your code over the weekend.

Alan

On Mon, Oct 15, 2018 at 10:01 PM Daniel Tabin notifications@github.com wrote:

This seems to likely be caused by the fact that heap usage goes up 100 fold (at least according to Valgrind).

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Darokrithia/PolygenSim/issues/4#issuecomment-430093052, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMfSp-Mz43kDp1S0pFJKF8KswFpmmLgks5ulVoVgaJpZM4Xdhpe .

Darokrithia commented 5 years ago

Sounds good

Darokrithia commented 4 years ago

I think I am going to close this at this point. Multithreading does in fact appear to be faster.