title: ÐÐµÑÐ¾Ð´Ñ Ð¾ÑÐµÐ½ÐºÐ¸ Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÐ¸ linux-ÑÐ´ÑÐ° Ð½Ð° Ð¿ÑÐ¸Ð¼ÐµÑÐµ Ð¿ÑÐ¸Ð¼Ð¸ÑÐ¸Ð²Ð° ÑÐ¸Ð½Ñ ÑÐ¾Ð½Ð¸Ð·Ð°ÑÐ¸Ð¸ futex
title: Ð²ÑÐ¿ÑÑÐºÐ½Ð°Ñ ÐºÐ²Ð°Ð»Ð¸ÑÐ¸ÐºÐ°ÑÐ¸Ð¾Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð±Ð°ÐºÐ°Ð»Ð°Ð²ÑÐ°
titleType: Subtitle
title: Methods for evaluating Linux kernel performance using the futex synchronization primitive
Creators: name: ÐÐ°Ð½ÐºÐ¾Ð²Ð°, ÐÐ¾Ð»Ð¸Ð½Ð°
Publisher: name: Ð¡Ð°Ð½ÐºÑ-ÐÐµÑÐµÑÐ±ÑÑÐ³ÑÐºÐ¸Ð¹ Ð¿Ð¾Ð»Ð¸ÑÐµÑÐ½Ð¸ÑÐµÑÐºÐ¸Ð¹ ÑÐ½Ð¸Ð²ÐµÑÑÐ¸ÑÐµÑ ÐÐµÑÑÐ° ÐÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾
Year: 2024
Subjects: futex
Linux
Ð¾ÑÐµÐ½ÐºÐ° Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÐ¸
ÑÐ¸ÑÑÐµÐ¼Ð½ÑÐ¹ Ð²ÑÐ·Ð¾Ð²
Ð¿ÑÐ¾ÑÐ¸Ð»Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ðµ
performance evaluation
system call
profiling

description: Ð¦ÐµÐ»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ Ð¸ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð·Ð°ÐºÐ»ÑÑÐ°ÐµÑÑÑ Ð² ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐºÐµ Ð¼ÐµÑÐ¾Ð´Ð¸ÐºÐ¸ Ð´Ð»Ñ ÑÐ¾Ð¿Ð¾ÑÑÐ°Ð²Ð¸ÑÐµÐ»ÑÐ½Ð¾Ð³Ð¾ Ð°Ð½Ð°Ð»Ð¸Ð·Ð° Ð¾ÑÐ´ÐµÐ»ÑÐ½ÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½ÑÐ¾Ð² Ð¾Ð¿ÐµÑÐ°ÑÐ¸Ð¾Ð½Ð½Ð¾Ð¹ ÑÐ¸ÑÑÐµÐ¼Ñ Linux, Ð° ÑÐ°ÐºÐ¶Ðµ Ð² Ð²ÑÑÐ°Ð±Ð¾ÑÐºÐµ ÑÑÐ°Ð²Ð½Ð¸ÑÐµÐ»ÑÐ½Ð¾Ð¹ ÑÐ°Ð±Ð»Ð¸ÑÑ Ð¸ Ð²ÑÐ±Ð¾ÑÐµ Ð½Ð°Ð¸Ð±Ð¾Ð»ÐµÐµ Ð¿Ð¾Ð´ÑÐ¾Ð´ÑÑÐµÐ¹ Ð¼ÐµÑÑÐ¸ÐºÐ¸ Ð´Ð»Ñ Ð¾ÑÐµÐ½ÐºÐ¸ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð° futex Ð½Ð° Ð¿Ð»Ð°ÑÑÐ¾ÑÐ¼Ð°Ñ ARM64, RISC-V Ð¸ x86_64. Ð ÑÐ°Ð¼ÐºÐ°Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ ÑÐµÐ»Ð¸ Ð¿Ð¾ÑÑÐ°Ð²Ð»ÐµÐ½Ñ ÑÐ»ÐµÐ´ÑÑÑÐ¸Ðµ Ð·Ð°Ð´Ð°ÑÐ¸: 1) ÐÑÑÑÐµÑÑÐ²Ð¸ÑÑ Ð¾Ð±Ð·Ð¾Ñ ÑÑÑÐµÑÑÐ²ÑÑÑÐ¸Ñ ÑÐµÑÐµÐ½Ð¸Ð¹. 2) ÐÐ¿ÑÐµÐ´ÐµÐ»Ð¸ÑÑ Ð¼ÐµÑÑÐ¸ÐºÑ Ð´Ð»Ñ ÑÐ¾Ð¿Ð¾ÑÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð° futex. 3) ÐÑÐ±ÑÐ°ÑÑ Ð¸Ð½ÑÑÑÑÐ¼ÐµÐ½ÑÑ Ð´Ð»Ñ Ð¿ÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ð°Ð³ÑÑÐ¶ÐµÐ½Ð½Ð¾Ð³Ð¾ ÑÐµÑÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ. 4) ÐÑÐ¾Ð²ÐµÑÑÐ¸ Ð¸Ð·Ð¼ÐµÑÐµÐ½Ð¸Ñ Ð²ÑÐ±ÑÐ°Ð½Ð½Ð¾Ð¹ Ð¼ÐµÑÑÐ¸ÐºÐ¸. 5) ÐÑÐ¾Ð²ÐµÑÑÐ¸ Ð°Ð½Ð°Ð»Ð¸Ð· Ð¿ÐµÑÐ²Ð¾Ð¿ÑÐ¸ÑÐ¸Ð½ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð½ÑÑ Ð´Ð°Ð½Ð½ÑÑ. 6) Ð¡Ð´ÐµÐ»Ð°ÑÑ Ð²ÑÐ²Ð¾Ð´Ñ. ÐÐ»Ñ Ð¸Ð·Ð¼ÐµÑÐµÐ½Ð¸Ñ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð° futex Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð»Ð¸ÑÑ Ð¸Ð½ÑÑÑÑÐ¼ÐµÐ½ÑÑ Ð½Ð°Ð³ÑÑÐ·Ð¾ÑÐ½Ð¾Ð³Ð¾ ÑÐµÑÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ stress-ng, ÑÑÐ°ÑÑÐ¸ÑÐ¾Ð²ÑÐ¸ÐºÐ¸ strace Ð¸ ftrace, Ð° ÑÐ°ÐºÐ¶Ðµ Ð¸Ð½ÑÑÑÑÐ¼ÐµÐ½Ñ Ð¿ÑÐ¾ÑÐ¸Ð»Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ perf. Ð Ð¿ÑÐ¾ÑÐµÑÑÐµ Ð¸ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±ÑÐ»Ð¾ Ð¾Ð±Ð½Ð°ÑÑÐ¶ÐµÐ½Ð¾, ÑÑÐ¾ Ð¿ÑÐ¸ Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ð¸ strace Ð½Ð°Ð±Ð»ÑÐ´Ð°ÑÑÑÑ Ð´Ð²Ð° Ð¿ÐµÑÐµÐºÐ»ÑÑÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÑÐµÐºÑÑÐ°, ÑÐ°Ðº ÐºÐ°Ðº strace Ð½Ð°ÑÐ¸Ð½Ð°ÐµÑ Ð¸Ð·Ð¼ÐµÑÐµÐ½Ð¸Ðµ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð° Ð¸Ð· Ð¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°ÑÐµÐ»ÑÑÐºÐ¾Ð³Ð¾ Ð¿ÑÐ¾ÑÑÑÐ°Ð½ÑÑÐ²Ð°. ÐÐ¾ÑÑÐ¾Ð¼Ñ Ð´Ð»Ñ ÑÐ¾ÑÐ½Ð¾Ð³Ð¾ Ð¸Ð·Ð¼ÐµÑÐµÐ½Ð¸Ñ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð° ÑÐ¾Ð»ÑÐºÐ¾ Ð² Ð¿ÑÐ¾ÑÑÑÐ°Ð½ÑÑÐ²Ðµ ÑÐ´ÑÐ° Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð»ÑÑ Ð¸Ð½ÑÑÑÑÐ¼ÐµÐ½Ñ ftrace. Ð ÐµÐ·ÑÐ»ÑÑÐ°ÑÑ ÑÐ²Ð¸Ð´ÐµÑÐµÐ»ÑÑÑÐ²ÑÑÑ Ð¾ ÑÐ¾Ð¼, ÑÑÐ¾ ÑÐ¸ÑÑÐµÐ¼Ð½ÑÐ¹ Ð²ÑÐ·Ð¾Ð² futex Ð²ÑÐ¿Ð¾Ð»Ð½ÑÐµÑÑÑ Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ð¾Ð¹ Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÑÑ Ð½Ð° ÑÑÐµÑ Ð¿Ð»Ð°ÑÑÐ¾ÑÐ¼Ð°Ñ Ñ ÑÐ°Ð·Ð»Ð¸ÑÐ½Ð¾Ð¹ Ð°ÑÑÐ¸ÑÐµÐºÑÑÑÐ¾Ð¹ Ð² Ð¿ÑÐµÐ´ÐµÐ»Ð°Ñ Ð´Ð¾Ð¿ÑÑÑÐ¸Ð¼Ð¾Ð¹ Ð¿Ð¾Ð³ÑÐµÑÐ½Ð¾ÑÑÐ¸, ÑÑÐ¾ Ð¿Ð¾Ð´ÑÐ²ÐµÑÐ¶Ð´Ð°ÐµÑ Ð´Ð¾ÑÑÐ¸Ð¶ÐµÐ½Ð¸Ðµ ÑÐµÐ»Ð¸ Ð¿Ð¾ ÑÑÐ°Ð²Ð½ÐµÐ½Ð¸Ñ ÑÐ¸ÑÑÐµÐ¼Ð½Ð¾Ð³Ð¾ Ð²ÑÐ·Ð¾Ð²Ð°.
description: The aim of this study is to develop a methodology for comparative analysis of individual components of the Linux operating system, along with generating a comparative table and selecting the most suitable metric for evaluating the futex system call on ARM64, RISC-V, and x86_64 platforms. To achieve this aim, the following objectives are pursued: 1) Conduct a review of existing solutions. 2) Define a metric for comparing the futex system call. 3) Select tools for conducting stress testing. 4) Perform measurements of the selected metric. 5) Analyze the root causes of the obtained data. 6) Draw conclusions. Tools used for measuring the futex system call include stress-ng load testing tools, strace and ftrace tracers, as well as perf profiling tool. During the investigation, it was found that when using strace, two context switches occur, as strace begins measuring the system call from user space. Therefore, the ftrace tool was utilized for precise measurement of the system call exclusively within the kernel space. The results indicate that the futex system call performs with consistent efficiency across three platforms of varying architectures within acceptable margins of error, confirming the achievement of the objective of comparing system calls.