Run more threads in processor
Run more threads in processor
How can i run more threads in processor? would i need more internet speed or other resources?
- martin@rootjazz
- Site Admin
- Posts: 34712
- Joined: Fri Jan 25, 2013 10:06 pm
- Location: The Funk
- Contact:
Re: Run more threads in processor
Running MORE threads isn't always FASTER.
Your machine can ONLY processor X number of items at any one time, where X is the number of processors you have. In order to simulate multi threading, what happens is the processes are swapped in and out of the CPU. After a while, you lose more time due to this swapping trying to process a high number of threads at once that if you had a lower number of threads.
Your machine can ONLY processor X number of items at any one time, where X is the number of processors you have. In order to simulate multi threading, what happens is the processes are swapped in and out of the CPU. After a while, you lose more time due to this swapping trying to process a high number of threads at once that if you had a lower number of threads.
Re: Run more threads in processor
So i will need more CPU to run more thread?
- martin@rootjazz
- Site Admin
- Posts: 34712
- Joined: Fri Jan 25, 2013 10:06 pm
- Location: The Funk
- Contact:
Re: Run more threads in processor
I mean, technically you can run more threads, but at any one instant, your computer can only compute X number of things at once, where X is the processor count.
I Think the current limit is a 100. That isn't going to be increased. Adding more processors would just speed up the processing of the queued tasks in the OS
I Think the current limit is a 100. That isn't going to be increased. Adding more processors would just speed up the processing of the queued tasks in the OS
Re: Run more threads in processor
By 'processor' do you mean threads?
- martin@rootjazz
- Site Admin
- Posts: 34712
- Joined: Fri Jan 25, 2013 10:06 pm
- Location: The Funk
- Contact:
Re: Run more threads in processor
I mean processor cores, so if you upgraded your CPU from dual core to quad core, you can now at EXACTLY the same time, process 4 threads, not two, thus it would be quicker and helping with swapping processes into the processor.
Have a read up on google, of threading / CPU / processes of how it is all handled and how adding more and more threads isn't always faster. You'll get better answers than I can give
Have a read up on google, of threading / CPU / processes of how it is all handled and how adding more and more threads isn't always faster. You'll get better answers than I can give
Re: Run more threads in processor
I've been running 14 processor threads on my now without any slow issues i notice. My vps has 1GB / 1CPU/ 100mpbs connection.
- martin@rootjazz
- Site Admin
- Posts: 34712
- Joined: Fri Jan 25, 2013 10:06 pm
- Location: The Funk
- Contact:
Re: Run more threads in processor
14 is fine, but it also depends on how many each action thread has
so if you run each action thread with 10 threads, that is 14x10 = 140
Personally I try and keep it around 20. But test things and find out what works best for you
so if you run each action thread with 10 threads, that is 14x10 = 140
Personally I try and keep it around 20. But test things and find out what works best for you