background preloader

Multi-core CPU Toolbox

Facebook Twitter

Getting Started with Mesos on Fedora 21 and CentOS 7 - code spelunking. Background For decades now, computer scientists have debated on how to coordinate groups of heterogeneous compute resources to solve a set of domain specific problems.

Getting Started with Mesos on Fedora 21 and CentOS 7 - code spelunking

“Scheduling” was the catch all moniker that was used to describe this space. This category of problems is old, therefore the scheduling universe is vast, and expansive. The most recent generation of schedulers that have emerged, strive to address the problem of coordinating several distributed applications across a data-center. The reason why I find this interesting, is that many distributed applications reinvent aspects of a “scheduler”, often without realizing the depth and breadth of the domain they just stepped into. Now-a-days, we’re seeing a Cambrian explosion of software stacks, each reinventing pieces of the scheduling wheel. At its core, Mesos is a focused meta-scheduler that provides primitives to express a wide variety of scheduling patterns and use cases. References Overview Prerequisites CentOS 7 Installation Setup. How to Set Processor Affinity for a Specific Task.

Linux operating systems work very well with multi-processor servers.

How to Set Processor Affinity for a Specific Task

Today’s dedicated servers almost always have multiple processors or cores. When you have 4, 8, or even more logical CPUs, you can use Linux’s scheduling system to assign specific tasks to individual CPUs. As long as the task is assigned to that particular CPU, it will not stray and attempt to access power from the others. This process is called CPU affinity.

To use CPU affinity, you should install a package called schedutils, which contains the actual command you need: taskset. Multithreading - Clojure core.async, any way to control number of threads in that (go...) thread pool? GlobalInterpreterLock. In CPython, the global interpreter lock, or GIL, is a mutex that prevents multiple native threads from executing Python bytecodes at once.

GlobalInterpreterLock

This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.) CPython extensions must be GIL-aware in order to avoid defeating threads. For an explanation, see Global interpreter lock. The GIL is controversial because it prevents multithreaded CPython programs from taking full advantage of multiprocessor systems in certain situations. However the GIL degrades performance even when it is not a bottleneck. Non-CPython implementations Jython and IronPython have no GIL and can fully exploit multiprocessor systems PyPy currently has a GIL like CPython in Cython the GIL exists, but can be released temporarily using a "with" statement [Mention place of GIL in StacklessPython.]

Eliminating the GIL Simplicity. API compatibility in detail. Setting running process affinity with taskset fails. NUMA Frequently Asked Questions. Non-uniform memory access. Non-uniform memory access (NUMA) is a computer memory design used in multiprocessing, where the memory access time depends on the memory location relative to the processor.

Non-uniform memory access

Under NUMA, a processor can access its own local memory faster than non-local memory (memory local to another processor or memory shared between processors). The benefits of NUMA are limited to particular workloads, notably on servers where the data are often associated strongly with certain tasks or users.[1] NUMA architectures logically follow in scaling from symmetric multiprocessing (SMP) architectures. They were developed commercially during the 1990s by Burroughs (later Unisys), Convex Computer (later Hewlett-Packard), Honeywell Information Systems Italy (HISI) (later Groupe Bull), Silicon Graphics (later Silicon Graphics International), Sequent Computer Systems (later IBM), Data General (later EMC), and Digital (later Compaq, now HP). Basic concept[edit] One possible architecture of a NUMA system. Taskset(1): retrieve/set process's CPU affinity.

Name.

taskset(1): retrieve/set process's CPU affinity

Concurrent_programming. How to identify CPU processor architecture on Linux. Multi-core processor architecture becomes increasingly popular nowadays.

How to identify CPU processor architecture on Linux

This trend is accelerated by the need for supporting multi-tenant hardware virtualization, high-performance computing applications, and Internet-scale workloads in data centers. As a server administrator and cloud architect, you must be aware of the CPU processor architecture of servers, so that server applications can take full advantage of underlying hardware capability.

The trend of high core density hardware also guides the evolution of software development, introducing new types of parallel programming models. Multi-threaded applications developed under these models must be able to leverage parallel execution across different cores, multi-level cache, CPU/memory affinity, etc. In this tutorial, I describe how to identify CPU processor architecture from the command line on Linux. Method One To install likwid on Linux: $ tar xvfvz likwid-3.0.0.tar.gz $ cd likwid-3.0.0 $ sudo make install. How to run program or process on specific CPU cores on Linux. As multi-core CPUs become increasingly popular on server-grade hardware as well as end-user desktop PCs or laptops, there have been growing efforts in the community (e.g., in terms of programming models, compiler or operating system support) towards developing applications optimized for multi-core architecture.

How to run program or process on specific CPU cores on Linux