1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<think>
Okay, so I'm trying to figure out whether this performance regression in QEMU is a user-mode issue or a system-mode issue. Let me go through the problem step by step.
First, the user reported that running certain commands within a chroot using proot and qemu-arm-static is much slower on Ubuntu 18.04 compared to 16.04. The command they're testing is 'time grep -R hello', which takes about 0.066 seconds on System 1 (Ubuntu 16.04) but over 24 seconds on System 2 (Ubuntu 18.04). That's a huge difference, more than 350 times slower.
They mentioned that proot hasn't changed versions between the two systems—it's 5.1.0 in both cases. However, QEMU has been updated from version 2.10.1 to 2.11.1. So it's possible that this change introduced some performance issues.
Looking at the logs, on System 1 (16.04), the real time is about 0.066s with user and system times as expected. On System 2 (18.04), the real time jumps to over 24 seconds. Notably, the user time is only 0.366s, but the sys time is 11.352s. That high sys time suggests that the process is spending a lot of time in kernel space.
QEMU runs in user mode when using qemu-user-static for cross-architecture chroots. So, if it's a QEMU issue, it might be related to how the emulator interacts with the host's system calls or handles certain operations.
Since proot hasn't changed and the problem is specific to QEMU versions between 2.10 and 2.11, it points towards changes in QEMU causing the slowdown. The increased sys time suggests that perhaps there are more context switches or higher overhead in how QEMU emulates system calls now compared to before.
Also, since other software isn't affected, it's isolated to the use of proot with qemu-arm-static. That makes me think it's not a general system issue but something specific to the user-mode emulation provided by QEMU.
Therefore, I classify this as a 'user' mode related bug because it pertains to how QEMU in user mode is handling the process execution and system calls within the chroot environment.
</think>
The performance regression is caused by changes in the QEMU user-mode emulator between versions 2.10.1 and 2.11.1, leading to increased kernel interaction overhead when running commands via proot.
user
|