question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Experiment with pinning worker threads to physical CPU threads

See original GitHub issue

Integrate the following library https://github.com/OpenHFT/Java-Thread-Affinity (most likely Linux only) and measure performance difference on a purely CPU bound benchmark (WorkStealingBenchmark.alloc might be a good candidate, or ParallelBenchmark).

I doubt that this issue has a clear road to being shipped as part of a Cats Effect release, but it would be a cool experiment nonetheless.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
He-Pincommented, Apr 26, 2022

Affinity pool is lives in akka now, super cool to see it lands in ce too

1reaction
djspiewakcommented, Oct 10, 2021

Very cool! A worthy experiment imo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Experiment with setting thread affinity in worker threads
On Linux we have sched_setaffinity , which provides hard affinity (threads run only on the specified CPUs, and the call fails if that...
Read more >
Grokking PyTorch Intel CPU performance from first principles
Pinning threads to cores on the same socket helps maintain locality of memory access. In this example, we'll pin to the physical cores...
Read more >
KNOWN ISSUE: 'Worker Thread' Count Default Too High ...
We are working on an issue where the 'Worker Thread' count defaults to a value that may be too high for some PCs,...
Read more >
CPU pinning Java threads with jstack and taskset
Here is an experiment into pinning the main application thread to a CPU core to see if that prevents loss of performance when...
Read more >
Physical Experimentation with Prefetching Helper Threads on ...
require construction of efficient helper threads and processor-level support to allow multiple threads to run concurrently.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found