posix thread scaling issue
André Bleau
andre_bleau@hotmail.com
Sat Sep 2 21:23:08 GMT 2023
Jeff wrote:
> Thanks. I am doing the memory allocation in a single thread.
> The compute uses all the threads I can get, and the compute isn't
> scaling very well with cygwin.
> It does work well on my 16 core 32 thread processor, so for most people
> the posix threading is fine.
> jeff
For the multi-threaded program that I wrote, with up to 64 threads, I compile each file with:
x86_64-w64-mingw32-c++ -O3 -c file.cpp
and link with:
x86_64-w64-mingw32-c++ -o program *.o -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic
And I get could results. 100% CPU use; I even need to lower the priority of the program to keep a snapy Windows UI.
You may try the same to see if it improves the performance of your program.
Regards,
- André Bleau
More information about the Cygwin
mailing list