All of lore.kernel.org
 help / color / mirror / Atom feed
* tests/vm/openbsd script (etc) excessive CPU usage
@ 2020-07-25 14:20 Peter Maydell
  2020-07-27 13:03 ` Alex Bennée
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2020-07-25 14:20 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Fam Zheng, Alex Bennée, Philippe Mathieu-Daudé

I noticed that when running the BSD VMs, the Python script that launches
QEMU seems to eat CPU:

peter.m+ 19024  0.0  0.0  20296 11692 pts/12   S+   15:04   0:00
   \_ make -C build vm-build-openbsd J=8 V=1
peter.m+ 19858 98.8  0.0 126272 15220 pts/12   Sl+  15:04  12:04
       \_ /usr/bin/python3 -B
/home/peter.maydell/qemu-openbsd/tests/vm/openbsd --debug --jobs 8
--verbose --efi-aarch64
/home/peter.maydell/qemu-openbsd/build/pc-bios/edk2-aarch64-code.fd
--image /home/peter.maydell/.cache/qemu-vm/images/openbsd.img
--snapshot --build-qemu /home/peter.maydell/qemu-openbsd --
peter.m+ 22878  711  3.2 10506236 3192896 pts/12 Sl+ 15:04  86:08
            \_ qemu-system-x86_64 -display none -vga none -chardev
socket,id=mon,path=/var/tmp/qemu-19858-monitor.sock -mon
chardev=mon,mode=control -machine pc -chardev
socket,id=console,path=/var/tmp/qemu-19858-console.sock,server,nowait
-serial chardev:console -nodefaults -m 4G -cpu max -netdev
user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device
virtio-net-pci,netdev=vnet -vnc 127.0.0.1:0,to=20 -smp 8 -enable-kvm
-drive file=/home/peter.maydell/.cache/qemu-vm/images/openbsd.img,snapshot=on,if=none,id=drive0,cache=writeback
-device virtio-blk,drive=drive0,bootindex=0 -drive
file=/home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/data-993a1.tar,if=none,id=data-993a1,cache=writeback,format=raw
-device virtio-blk,drive=data-993a1,serial=data-993a1,bootindex=1
peter.m+ 29304  0.0  0.0  63612  4996 pts/12   S+   15:05   0:00
           \_ ssh -t -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 38491 -i
/home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/id_rsa -o
SendEnv=https_proxy -o SendEnv=http_proxy -o SendEnv=ftp_proxy -o
SendEnv=no_proxy qemu@127.0.0.1          set -e;         rm -rf
/home/qemu/qemu-test.*         cd $(mktemp -d
/home/qemu/qemu-test.XXXXXX);         mkdir src build; cd src;
tar -xf /dev/rsd1c;         cd ../build         ../src/configure
--cc=cc --python=python3 ;


Notice that process 19858 (the python script) is at 98.8% CPU.
This isn't specific to the OpenBSD script, the other BSD scripts
do this too.

Why is this script using so much CPU when it should basically just be
waiting for the QEMU VM to finish ?

I think this is probably a recent regression, though I'm not certain.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: tests/vm/openbsd script (etc) excessive CPU usage
  2020-07-25 14:20 tests/vm/openbsd script (etc) excessive CPU usage Peter Maydell
@ 2020-07-27 13:03 ` Alex Bennée
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2020-07-27 13:03 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Philippe Mathieu-Daudé, Fam Zheng, QEMU Developers, Robert Foley


Peter Maydell <peter.maydell@linaro.org> writes:

> I noticed that when running the BSD VMs, the Python script that launches
> QEMU seems to eat CPU:
>
> peter.m+ 19024  0.0  0.0  20296 11692 pts/12   S+   15:04   0:00
>    \_ make -C build vm-build-openbsd J=8 V=1
> peter.m+ 19858 98.8  0.0 126272 15220 pts/12   Sl+  15:04  12:04
>        \_ /usr/bin/python3 -B
> /home/peter.maydell/qemu-openbsd/tests/vm/openbsd --debug --jobs 8
> --verbose --efi-aarch64
> /home/peter.maydell/qemu-openbsd/build/pc-bios/edk2-aarch64-code.fd
> --image /home/peter.maydell/.cache/qemu-vm/images/openbsd.img
> --snapshot --build-qemu /home/peter.maydell/qemu-openbsd --
> peter.m+ 22878  711  3.2 10506236 3192896 pts/12 Sl+ 15:04  86:08
>             \_ qemu-system-x86_64 -display none -vga none -chardev
> socket,id=mon,path=/var/tmp/qemu-19858-monitor.sock -mon
> chardev=mon,mode=control -machine pc -chardev
> socket,id=console,path=/var/tmp/qemu-19858-console.sock,server,nowait
> -serial chardev:console -nodefaults -m 4G -cpu max -netdev
> user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device
> virtio-net-pci,netdev=vnet -vnc 127.0.0.1:0,to=20 -smp 8 -enable-kvm
> -drive file=/home/peter.maydell/.cache/qemu-vm/images/openbsd.img,snapshot=on,if=none,id=drive0,cache=writeback
> -device virtio-blk,drive=drive0,bootindex=0 -drive
> file=/home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/data-993a1.tar,if=none,id=data-993a1,cache=writeback,format=raw
> -device virtio-blk,drive=data-993a1,serial=data-993a1,bootindex=1
> peter.m+ 29304  0.0  0.0  63612  4996 pts/12   S+   15:05   0:00
>            \_ ssh -t -o StrictHostKeyChecking=no -o
> UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 38491 -i
> /home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/id_rsa -o
> SendEnv=https_proxy -o SendEnv=http_proxy -o SendEnv=ftp_proxy -o
> SendEnv=no_proxy qemu@127.0.0.1          set -e;         rm -rf
> /home/qemu/qemu-test.*         cd $(mktemp -d
> /home/qemu/qemu-test.XXXXXX);         mkdir src build; cd src;
> tar -xf /dev/rsd1c;         cd ../build         ../src/configure
> --cc=cc --python=python3 ;
>
>
> Notice that process 19858 (the python script) is at 98.8% CPU.
> This isn't specific to the OpenBSD script, the other BSD scripts
> do this too.
>
> Why is this script using so much CPU when it should basically just be
> waiting for the QEMU VM to finish ?
>
> I think this is probably a recent regression, though I'm not certain.

Robert thinks this is fixed up with the latest clean-ups for the console
drain thread which is in today's PR. I've not seen it while testing the
PR so I think it's gone.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-27 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 14:20 tests/vm/openbsd script (etc) excessive CPU usage Peter Maydell
2020-07-27 13:03 ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.