• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / bookkeeper / 269
72%

Build:
DEFAULT BRANCH: master
Ran 14 Nov 2018 03:13PM UTC
Jobs 1
Files 463
Run time 30s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
269

push

jenkins

GitHub
Added module to enable CPU affinity

### Motivation

This is part of a set of changes aimed at reducing latency in BK at the expense of other aspects (eg: max throughput). While not intended to be used as default settings, they might be good to have whenever the latency becomes critical. 

Pinning a thread to a particular CPU will ensure no other process will execute on that CPU reducing all scheduler induced context switches that will cause latency jittery.

A given thread that wants to get pinned to a CPU just needs to call: 

```java
CpuAffinity.acquireCore();
```

It's called `acquireCore()` because it will also disable hyper-threading on the pinned cpu.

Subsequent PRs will use this module to have the option to pin critical threads to available CPUs.

### Changes
 * Added JNI module to call `sched_setaffinity()` to pin a thread to a particular CPU
 * Automatically discover available isolated CPUs
 * Acquire file-based locks to allow multiple processes on same machine to acquire CPUs independently.

Reviewers: Ivan Kelly <ivank@apache.org>, Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org>

This closes #1641 from merlimat/cpu-affinity

25300 of 35190 relevant lines covered (71.9%)

0.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 269.1 14 Nov 2018 03:13PM UTC 0
71.9
Source Files on build 269
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #269
  • dab8310f on github
  • Prev Build on master (#268)
  • Next Build on master (#270)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc