Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Simply put, most definetly. Read on for some discussion.</p> <p>Tuning a service is an art-form or requires benchmarking (and the space for the amount of concepts you need to benchmark is huge). I believe that it depends on factors such as the following (this is not exhaustive).</p> <ol> <li>how much time an item which is picked up from the ready qeueue takes to process, and</li> <li>how many worker threads are their? </li> <li>how many producers are their, and how often do they produce ? </li> <li>what type of wait concepts are you using ? spin-locks or kernel-waits (the latter being slower) ? </li> </ol> <p>So, if items are produced often, and if the amount of threads is large, and the processing time is low: the data structure <strong>could</strong> be locked for large windows, thus causing thrashing.</p> <p>Other factors may include the data structure used and how long the data structure is locked for -e.g., if you use a linked list to manage such a queue the <code>add</code> and <code>remove</code> oprations take constant time. A prio-queue (heaps) takes a few more operations on average when items are <code>added</code>.</p> <p>If your system is for business processing you could take this question out of the picture by just using:</p> <ol> <li>A process based architecure and just spawning multiple producer consumer processes and using the file system for communication,</li> <li>Using a non-preemtive collaborative threading programming language such as stackless python, Lua or Erlang.</li> </ol> <p>also note: synchronization primitives cause inter-processor cache-cohesion floods which are <a href="http://portal.acm.org/citation.cfm?id=1089104" rel="nofollow noreferrer">not good</a> and therefore should be used sparingly.</p> <p>The discussion could go on to fill a Ph.D dissertation :D</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload