[systemd-devel] stress test on systemd/dbus
Yan, Haixiao (CN)
haixiao.yan.cn at windriver.com
Fri Dec 13 02:02:17 UTC 2024
Hi,
I have a stress test on systemd/dbus, after 17h, dbus-daemon is sleeping
and the context switching stops (voluntary_ctxt_switches stop increasing).
The systemd version is 250.5 based on yocto.
Here is the test script.
/etc/systemd/system/stress-test at .timer
# Timer for stress testing systemd dbus-connectivity
[Unit]
Description="Run stress-test@%i.service"
[Timer]
OnStartupSec=1s
OnUnitInactiveSec=2s
AccuracySec=100ms
RandomizedDelaySec=2s
Unit=stress-test@%i.service
[Install]
WantedBy=multi-user.target
/etc/systemd/system/stress-test at .service
[Unit]
Description="dbus stress test"
[Service]
ExecStart=/bin/true
Start 200 timers:
systemctl restart stress-test@{0..200}.timer
Test log:
12/12 15:39
root at marvell-cn96xx:~# ps aux | head -n 1 && ps aux | grep '[d]bus-daemon'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
message+ 3691414 60.6 0.0 6272 4480 ? Rs 18:15 0:43
/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile
--systemd-activation --syslog-only
root at marvell-cn96xx:~# cat /proc/$(pgrep dbus-daemon)/status
Name: dbus-daemon
Umask: 0022
State: R (running)
Tgid: 3691414
Ngid: 0
Pid: 3691414
PPid: 1
TracerPid: 0
Uid: 996 996 996 996
Gid: 993 993 993 993
FDSize: 256
Groups:
NStgid: 3691414
NSpid: 3691414
NSpgid: 3691414
NSsid: 3691414
VmPeak: 6336 kB
VmSize: 6272 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 4480 kB
VmRSS: 4480 kB
RssAnon: 1088 kB
RssFile: 3392 kB
RssShmem: 0 kB
VmData: 1152 kB
VmStk: 192 kB
VmExe: 384 kB
VmLib: 4416 kB
VmPTE: 320 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
THP_enabled: 1
Threads: 1
SigQ: 0/48701
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000000004001
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Seccomp_filters: 0
Speculation_Store_Bypass: thread vulnerable
SpeculationIndirectBranch: unknown
Cpus_allowed: ffffff
Cpus_allowed_list: 0-23
Mems_allowed: 1
Mems_allowed_list: 0
voluntary_ctxt_switches: 2717
nonvoluntary_ctxt_switches: 9591
root at marvell-cn96xx:~# pmap -x $(pgrep dbus-daemon)
3691414: /usr/bin/dbus-daemon --system --address=systemd: --nofork
--nopidfile --systemd-activation --syslog-only
Address Kbytes RSS Dirty Mode Mapping
0000aaaaccfc0000 384 384 0 r-x-- dbus-daemon
0000aaaacd020000 64 64 64 rw--- dbus-daemon
0000aaaacd030000 320 256 256 rw--- [ anon ]
0000ffffb0ed0000 64 64 0 r-x-- libnss_compat.so.2
0000ffffb0ee0000 64 64 64 rw--- libnss_compat.so.2
0000ffffb0ef0000 128 64 64 rw--- [ anon ]
0000ffffb0f10000 64 64 0 r-x-- libcap.so.2.66
0000ffffb0f20000 64 64 64 rw--- libcap.so.2.66
0000ffffb0f30000 704 64 0 r-x-- libzstd.so.1.5.2
0000ffffb0fe0000 64 64 64 rw--- libzstd.so.1.5.2
0000ffffb0ff0000 1600 1344 0 r-x-- libc.so.6
0000ffffb1180000 64 64 64 rw--- libc.so.6
0000ffffb1190000 64 64 64 rw--- [ anon ]
0000ffffb11a0000 192 192 0 r-x-- libexpat.so.1.8.10
0000ffffb11d0000 64 64 64 rw--- libexpat.so.1.8.10
0000ffffb11e0000 960 512 0 r-x-- libsystemd.so.0.33.0
0000ffffb12d0000 64 64 64 rw--- libsystemd.so.0.33.0
0000ffffb12e0000 64 64 64 rw--- [ anon ]
0000ffffb12f0000 576 512 0 r-x-- libdbus-1.so.3.32.3
0000ffffb1380000 64 64 64 rw--- libdbus-1.so.3.32.3
0000ffffb13a0000 128 0 0 r---- [ anon ]
0000ffffb13c0000 64 64 0 r-x-- [ anon ]
0000ffffb13d0000 192 192 0 r-x-- ld-linux-aarch64.so.1
0000ffffb1400000 64 64 64 rw--- ld-linux-aarch64.so.1
0000ffffe4fe0000 192 64 64 rw--- [ stack ]
---------------- ------- ------- -------
total kB 6272 4480 1088
12/13 9:34
root at marvell-cn96xx:~# ps aux | head -n 1 && ps aux | grep '[d]bus-daemon'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
message+ 3691414 32.8 0.0 6272 4480 ? Ss Apr29 353:42
/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile
--systemd-activation --syslog-only
root at marvell-cn96xx:~# systemctl status dbus.service
● dbus.service - D-Bus System Message Bus
Loaded: loaded (/lib/systemd/system/dbus.service; static)
Active: active (running) since Fri 2022-04-29 18:15:56 UTC; 17h ago
TriggeredBy: ● dbus.socket
Docs: man:dbus-daemon(1)
Main PID: 3691414 (dbus-daemon)
Tasks: 1 (limit: 14610)
Memory: 1.4M
CGroup: /system.slice/dbus.service
└─ 3691414 /usr/bin/dbus-daemon --system
--address=systemd: --nofork --nopidfile --systemd->
Notice: journal has been rotated since unit was started, output may be
incomplete.
root at marvell-cn96xx:~# cat /proc/$(pgrep dbus-daemon)/status
Name: dbus-daemon
Umask: 0022
State: S (sleeping)
Tgid: 3691414
Ngid: 0
Pid: 3691414
PPid: 1
TracerPid: 0
Uid: 996 996 996 996
Gid: 993 993 993 993
FDSize: 256
Groups:
NStgid: 3691414
NSpid: 3691414
NSpgid: 3691414
NSsid: 3691414
VmPeak: 6336 kB
VmSize: 6272 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 4480 kB
VmRSS: 4480 kB
RssAnon: 1088 kB
RssFile: 3392 kB
RssShmem: 0 kB
VmData: 1152 kB
VmStk: 192 kB
VmExe: 384 kB
VmLib: 4416 kB
VmPTE: 320 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
THP_enabled: 1
Threads: 1
SigQ: 0/48701
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000000004001
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Seccomp_filters: 0
Speculation_Store_Bypass: thread vulnerable
SpeculationIndirectBranch: unknown
Cpus_allowed: ffffff
Cpus_allowed_list: 0-23
Mems_allowed: 1
Mems_allowed_list: 0
voluntary_ctxt_switches: 874464
nonvoluntary_ctxt_switches: 1442515
root at marvell-cn96xx:~# pmap -x $(pgrep dbus-daemon)
3691414: /usr/bin/dbus-daemon --system --address=systemd: --nofork
--nopidfile --systemd-activation --syslog-only
Address Kbytes RSS Dirty Mode Mapping
0000aaaaccfc0000 384 384 0 r-x-- dbus-daemon
0000aaaacd020000 64 64 64 rw--- dbus-daemon
0000aaaacd030000 320 256 256 rw--- [ anon ]
0000ffffb0ed0000 64 64 0 r-x-- libnss_compat.so.2
0000ffffb0ee0000 64 64 64 rw--- libnss_compat.so.2
0000ffffb0ef0000 128 64 64 rw--- [ anon ]
0000ffffb0f10000 64 64 0 r-x-- libcap.so.2.66
0000ffffb0f20000 64 64 64 rw--- libcap.so.2.66
0000ffffb0f30000 704 64 0 r-x-- libzstd.so.1.5.2
0000ffffb0fe0000 64 64 64 rw--- libzstd.so.1.5.2
0000ffffb0ff0000 1600 1344 0 r-x-- libc.so.6
0000ffffb1180000 64 64 64 rw--- libc.so.6
0000ffffb1190000 64 64 64 rw--- [ anon ]
0000ffffb11a0000 192 192 0 r-x-- libexpat.so.1.8.10
0000ffffb11d0000 64 64 64 rw--- libexpat.so.1.8.10
0000ffffb11e0000 960 512 0 r-x-- libsystemd.so.0.33.0
0000ffffb12d0000 64 64 64 rw--- libsystemd.so.0.33.0
0000ffffb12e0000 64 64 64 rw--- [ anon ]
0000ffffb12f0000 576 512 0 r-x-- libdbus-1.so.3.32.3
0000ffffb1380000 64 64 64 rw--- libdbus-1.so.3.32.3
0000ffffb13a0000 128 0 0 r---- [ anon ]
0000ffffb13c0000 64 64 0 r-x-- [ anon ]
0000ffffb13d0000 192 192 0 r-x-- ld-linux-aarch64.so.1
0000ffffb1400000 64 64 64 rw--- ld-linux-aarch64.so.1
0000ffffe4fe0000 192 64 64 rw--- [ stack ]
---------------- ------- ------- -------
total kB 6272 4480 1088
Any help is appreciated.
Thanks,
Haixiao
More information about the systemd-devel
mailing list