Overview Locking critical thread to a CPU can improve throughput and reduce latency. It can make a big difference to 99%, 99.9% and 99.99%tile latencies. Unfortunately there is no standard calls in the JDK to do this, so I wrote a simple library so you can manage and see how CPUs have been assigned. What does it look like running? In the following example, there are four threads main, reader, writer and engine. The main thread finishes before the engine starts so they end up using the same CPU. Estimated clock frequency was 3400 MHz Assigning cpu 7 to Thread[main,5,main] Assigning cpu 6 to Thread[reader,5,main] Assigning cpu 3 to Thread[writer,5,main] Releasing cpu 7 from Thread[main,5,main] Assigning cpu 7 to Thread[engine,5,main] The assignment of CPUs is 0: General use CPU 1: General use CPU 2: Reserved for this application 3: Thread[writer,5,main] alive=true 4: General use CPU 5: General use CPU 6: Thread[reader,5,main] alive=true 7: Thread[engine,5,main] alive=true Releas...