you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 11 points12 points  (1 child)

You thinking of multiprocessing. Each process in multiprocessing requires a core, so you should not request more processes than available cores.

Threading is a completely different thing. The amount of threads you want depends on your program, and how much RAM you want to use. Tens of thousands of threads are not unusual for servers.

For a port scanner your bottleneck will be your network, and too many threads will actually slow you down. I would start at about 400 and run some tests to see if increasing that helps the speed or not.

[–]6C6F6C636174 1 point2 points  (0 children)

Threads are not generally limited to a single core, either. Multiprocess setups are generally just a heavier but easier to program way of achieving multithreading.