228 private links
This is huge:
Cores may stay idle for seconds while ready threads are waiting in runqueues. In our experiments, these performance bugs caused many-fold performance degradation for synchronization-heavy scientific applications, 13% higher latency for kernel make, and a 14-23% decrease in TPC-H throughput for a widely used commercial database.
DOI: https://dl.acm.org/doi/10.1145/2901318.2901326
It may be useful to read it completely.
Fixes:
- compare the minimum load of each scheduling groups instead of the average
- Linux spawns threads on the same core as their parent thread: a node can steal threads from a another node by comparing the average load
and two others
It is useful to read their tools (online sanity checker for invariants such as "No core remains idle while another core is overloaded")
During the 00s,dozens of papers described new schedling algorithms, [... but] a few of them were adopted in mainstream operatin systems, mainly because it is not clear how to integrate all theseideas in scheduler safely.
Similar the part Related Work describes the current state of the research on other domains: performance bugs, kernel correctness, tracing.
The resources are available on Github: https://github.com/jplozi/wastedcores
An optimisation that I don't really understand.
Explaining pointers in one image
A C Compiler in 512 bytes
Impressive!
J'ai passé plusieurs décennies à écrire du C et du C++, voire même un peu d'ASM. Et franchement, je suis admiratif des quelques codeurs "safe".
C'est comme jongler avec des tronçonneuses: ce n'est pas parce-que certain y arrivent qu'il faut en faire une recommandation.
4kB en Assembleur, ou quelques octets pour les builtins de l'OS
Some examples of why C is faster than Java, because C and algorithms
Only one same job at a time ?
My solution to deal with this is to bind an IPv6 localhost ::1 socket to a given port. Only one process can do this, and thus it’s a very effective mutex. No lock files to cause havoc, no dealing with the dark and buggy corners of advisory file locking.
For shell scripts, simply replace the #!/bin/sh with #!/somewhere/bin/lock 2048 where 2048 is the port number you will use to enforce the lock (greater than 1024 if you do not want to deal with the hassles of privileged ports).
Takeaways:
- It is possible to list a directory with 8 million files in it.
- strace is your friend
- Don't be afraid to compile code and modify it (hell, simple C compiles so fast it could be interpreted)
- There is no good reason to have 8 million files in a directory :-), but this was a good learning experience (and possibly a good interview question).
The last point is the most important :D
This paper presents a comparative study between C and Rust in terms of performance and programming effort
Small but efficient post !
Rust is between C and C++, close to the c++.
Maybe programs contributed to the project as part of a concerted language advocacy and marketing strategy, benefit from more programmer hours spent on program optimization.
We don't know yet.
strace
programm allow us to figure out what a program does under the hood.
Part 2 (x86 asm, linux kernel)
Part 3 (ftrace, disk layouts, ext4)
Standard Cocorico x)
Pour comprendre la taille des structures en langage C.
La version en français