Skip to content

Instantly share code, notes, and snippets.

View hakavlad's full-sized avatar
🌻

Alexey Avramov hakavlad

🌻
View GitHub Profile
@hakavlad
hakavlad / le9-geekbench.ru.md
Last active January 17, 2021 05:35
Geekbench: vanilla vs le9ab.patch

glxgears

Однопоточное расширение списка случайными числами, Debian 9, memtotal=10G, swap on zram 10G.

None

54s
299 frames in 5.0 seconds = 59.679 FPS
161 frames in 5.7 seconds = 28.364 FPS
1 frames in 29.5 seconds =  0.034 FPS
@hakavlad
hakavlad / comparison.md
Last active November 15, 2020 13:26
Low-memory handlers comparison case

Low-memory handlers comparison case

None vs uresourced vs prelockd vs memavaild

Running tail /dev/zero on Fedora 33 Workstation on VM

MemTotal=3.8G, SwapTotal=7.7G (2 MemTotal), swap on zram

vm.swappiness=100, vm.min_free_kbytes=40225

Look at the memory and swap lines on the system monitor. Smooth lines mean more responsiveness.

None

@hakavlad
hakavlad / memavaild.md
Last active November 21, 2020 22:51
Настройка memavaild для сохранения отзывчивости при запуске жирных фоновых процессов

Настройка memavaild 0.6 для сохранения отзывчивости при запуске жирных фоновых процессов

Конфигурация memavaild.conf

Для соответствующей настройки memavaild нужно добавить в конфиг /etc/memavaild.conf следующую строку:

@LIMIT  CGROUP=user.slice/user-$UID.slice/user@$UID.service/idle.slice  MIN_MEM_HIGH_PERCENT=5  RELATIVE_SHARE=0.2

Добавляем alias

PSI metrics: memory
cgroup_v2 mountpoint: /sys/fs/cgroup/unified
=====================|======================|
some | full |
-------------------- | -------------------- |
avg10 avg60 avg300 | avg10 avg60 avg300 | cgroup_v2
------ ------ ------ | ------ ------ ------ | -----------
0.00 0.00 0.00 | 0.00 0.00 0.00 | SYSTEM_WIDE
0.00 0.00 0.00 | 0.00 0.00 0.00 |
0.00 0.00 0.00 | 0.00 0.00 0.00 | /user.slice
2020-06-14 12:02:31,173: Starting psi2log, target: SYSTEM_WIDE, mode: 2, interval: 2 sec, log file: ck, suppress output: False
2020-06-14 12:02:31,174: PSI source dir: /proc/pressure/, source files: cpu, io, memory
2020-06-14 12:02:31,176: All memory locked with MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT
2020-06-14 12:02:31,176: ======|=============|=============|
2020-06-14 12:02:31,176: cpu | io | memory |
2020-06-14 12:02:31,176: ----- | ----------- | ----------- |
2020-06-14 12:02:31,176: some | some full | some full | interval
2020-06-14 12:02:31,176: ----- | ----- ----- | ----- ----- | --------
2020-06-14 12:02:33,180: 99.9 | 0.0 0.0 | 0.0 0.0 | 2.003
2020-06-14 12:02:35,184: 100.0 | 0.0 0.0 | 0.0 0.0 | 2.004
2020-06-14 12:10:21,280: Starting psi2log, target: SYSTEM_WIDE, mode: 1, interval: 2 sec, log file: ck, suppress output: False
2020-06-14 12:10:21,280: PSI source dir: /proc/pressure/, source files: cpu, io, memory
2020-06-14 12:10:21,282: All memory locked with MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT
2020-06-14 12:10:21,282: ==================================================================================================================
2020-06-14 12:10:21,282: cpu || io || memory
2020-06-14 12:10:21,282: ==================== || =========================================== || ===========================================
2020-06-14 12:10:21,283: some || some | full || some | full
2020-06-14 12:10:21,283: -------------------- || -------------------- | -------------------- || -------------------- | --------------------
2020-06-14 12:10:21,283: avg10 avg60 avg300 ||
PSI metrics: cpu
cgroup_v2 mountpoint: /sys/fs/cgroup/unified
=====================|
some |
-------------------- |
avg10 avg60 avg300 | cgroup_v2
------ ------ ------ | -----------
100.00 100.00 97.88 | SYSTEM_WIDE
100.00 100.00 97.88 |
100.00 100.00 97.92 | /user.slice
PSI metrics: memory
cgroup_v2 mountpoint: /sys/fs/cgroup/unified
=====================|======================|
some | full |
-------------------- | -------------------- |
avg10 avg60 avg300 | avg10 avg60 avg300 | cgroup_v2
------ ------ ------ | ------ ------ ------ | -----------
99.42 99.10 82.14 | 0.00 0.00 0.03 | SYSTEM_WIDE
99.42 99.10 82.14 | 0.00 0.00 0.03 |
100.00 99.97 82.77 | 0.00 0.00 0.00 | /user.slice
@hakavlad
hakavlad / psi2log.log
Created March 8, 2020 04:18
LMM vs gnome-shell | psi2log.log
2020-03-08 10:54:12,683: Starting psi2log
2020-03-08 10:54:12,690: target: SYSTEM_WIDE
2020-03-08 10:54:12,692: interval: 2 sec
2020-03-08 10:54:12,694: log file: 1.txt
2020-03-08 10:54:12,695: mode: 2
2020-03-08 10:54:12,700: ============================================
2020-03-08 10:54:12,701: cpu | memory | io |
2020-03-08 10:54:12,702: ----- | ----------- | ----------- |
2020-03-08 10:54:12,704: some | some full | some full | interval
2020-03-08 10:54:12,705: ----- | ----- ----- | ----- ----- | --------