So are you saying that neither (1) binding a thread to a cpu or (2)
bumping up computational thread priority will help in terms of
performance? The specific issue is that with the current system
limitations, I'm trying to improve the computational performance -
increase the # of computations that can be performed per time interval
(ie, second) - this is assuming a fast input message rate and fast
output message rate consumption where the bottleneck is the time it
takes to perform the computation.
Simplified Scenario To Solve:
1. computation request received via socket
2. request added to worker thread pool queue
3. worker thread picks up msg and performs calc
So, without hardware modifications - ie, increasing # of CPUs, what
can be done to improve performance of step (3) ?
> >I'm using a SunOS 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-60 -
> >which has 2 CPUs. In my case, there is a c++ application that
> >consists of several worker threads that are responsible for heavy
> >computations, and several other threads for receiving data via udp and
> >tcp, and another thread for sending results via tcp.
> >1. Can someone point out some advantages of binding a thread/lwp to a
> >cpu? I'm looking for some docs, or concrete cases of when this would
> >be beneficial. I tried using processor_bind() in a sample test, but
> >could not see performance gains.
> >2. I tried to increase the priority of the computational threads, and
> >likewise did not see any performance improvement. Can anyone suggest
> >ways I can leverage priority scheduling for the above application ?
> Why do you think either of these would improve performance? What is the
> specific problem you're really trying to solve?
> If you've got n compute-bound threads, where n is greater than the number
> of CPUs, there's probably not much you can do to increase performance
> any further except add CPU.