disable "-usbdevice tablet" for all VM

escoreal

Renowned Member
Dec 22, 2010
81
3
73
Hi Proxmox community,

with Proxmox 1 we disabled the tablet device with "tablet: no" in "/etc/pve/qemu-server.cfg".

Is there a possibility to disable the tablet device globally for all VMs in Proxmox 2? Or does we have to add this option to manually to all conf-files?

We want to disable this because with a lot of VMs running on the same machine the tablet device generates a lot of context switches..

Thanks for any advice!
esco
 
Hello Dietmar,

mh, what a pity! Please consider making this possible again. The possibility of adding "args: -cpu host" globally would be great, too.

With tablet device we have 5-10% idle cpu usage per virtual core and VM on Xeon E5640 CPUs.

esco
 
Please file a bug (feature request) at bugzilla.proxmox.com (so that we do not forget it).

With tablet device we have 5-10% idle cpu usage per virtual core and VM on Xeon E5640 CPUs.

I never observed such high cpu usage here.
 
I've been tracking down context switching issues on our two Xeon W3680 servers.
We moved some VMs from AMD to Intel and they have been performing worse. I noticed the high context switching and found other solutions that helped reduce CS.

Never thought that the usb tablet could be part of the problem.
I will disable the tablet device on some VMs and report back if it reduces context switching.
 
Before removing the tablet device the output of vmstat 1 looks like this:
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
0  0      0 8155844 174408 206068    0    0    48  8085 19400 [B]37727[/B]  4  3 93  0
 0  0      0 8155200 174408 206076    0    0   846  3954 19310 [B]38042[/B]  2  2 95  0
 1  0      0 8155472 174408 206080    0    0     0  2833 17946 [B]37148[/B]  2  1 97  0
 0  0      0 8155224 174408 206080    0    0     0  3043 18449 [B]37439[/B]  2  2 93  3
 0  0      0 8155996 174408 206080    0    0     0  1859 17596 [B]36467[/B]  3  3 93  0
 0  0      0 8156004 174408 206084    0    0     0    32 17846 [B]35202[/B]  3  5 92  0
 0  0      0 8154908 174408 206084    0    0   272 19908 19297 [B]36950[/B]  5  4 91  0
 2  0      0 8154988 174408 206084    0    0   112  8650 16544 [B]32579[/B]  3  3 94  0
 0  0      0 8155420 174408 206084    0    0     0    56 14998 [B]31947[/B]  1  1 97  0

After removing it using the monitor on 5 VMs vmstat 1 looks like this:
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 3  0      0 8166376 174408 206408    0    0     0   816 8913 [B]16408[/B]  8  1 90  0
 0  0      0 8166456 174408 206412    0    0     0  1089 8440 [B]16059[/B]  3  1 96  0
 1  0      0 8166556 174408 206416    0    0     0   324 8045 [B]17085[/B]  4  1 96  0
 0  0      0 8165936 174408 206416    0    0     0  7782 7691 [B]14562[/B]  1  1 98  0
 0  0      0 8166184 174408 206416    0    0     0   589 8170 [B]16353[/B]  1  1 98  0
 1  0      0 8166372 174408 206420    0    0     0     4 7740 [B]14851[/B]  2  1 97  0
 0  1      0 8165744 174408 206424    0    0    24     4 8063 [B]14345[/B]  2  2 95  2
 1  1      0 8166248 174408 206424    0    0   822   674 8337 [B]14446[/B]  2  2 90  6
 0  2      0 8165844 174408 206428    0    0     0   280 7539 [B]13957[/B]  1  1 91  8
 2  0      0 8166164 174408 206432    0    0    16  1202 5002 [B]11242[/B]  2  1 96  2
 0  0      0 8166660 174408 206432    0    0     0   739 4673 [B]11436[/B]  2  1 97  0
 0  0      0 8165916 174408 206432    0    0     0  1389 7630 [B]17889[/B]  4  2 94  0
 1  1      0 8165932 174408 206436    0    0     0  3136 7151 [B]13137[/B]  2  2 96  0

I have a suggestion.
Could Proxmox add the USB Tablet device when someone opens the console, then remove it when the console is not in use?
That way we have the best of both worlds.
 
Which guest OS' are affected by this?

I cannot seem to notice any difference at all adding "tablet: no" in my Linux KVM's conf.
 
Hi,

example with Ubuntu 8.04.4 LTS:
usbdevice_tablet_linux.png

config:

bootdisk: virtio0
cores: 1
cpu: host
ide2: none,media=cdrom
memory: 200
name: test ubuntu 8.04
net0: virtio=B2:53:B4:BE:10:47,bridge=vmbr0
ostype: l26
sockets: 1
virtio0: pve_sdc:vm-10075-disk-1,cache=writeback
tablet: no

esco
 
@e100: and you also get 5-10% cup idle usage?

Not quite 5-10% but yes there is a noticeable drop as you can see in the screen shot below.
I have not had a chance to test hot plug/remove very much but I would like to think it will work just fine since it is emulated USB device.

We are in the middle of testing our backups, so when the last backup set completed I started two VMs and let them site idle.
That is all that was running on the server, one Windows 2008 R2 and one Debian Wheezy KVM machine.
Both VMs have two cores assigned to them.

Before removing USB Tablet device:
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 1  0  86136 11220024   6756  98444    0    0    80    52 4474 4984  0  0 99  0
 0  0  86136 11220352   6756  98440    0    0   930     4 5306 5231  0  0 99  0
 0  0  86136 11220228   6756  98456    0    0     0     0 4760 4714  0  0 99  0
 0  0  86136 11219972   6756  98460    0    0     0     0 4941 4750  0  0 99  0
 0  0  86136 11219856   6756  98460    0    0     0     0 4902 4715  0  0 100  0
 0  0  86136 11219600   6756  98460    0    0     0     0 4318 4764  0  0 100  0
 0  0  86136 11219840   6764  98460    0    0     0   116 4038 4749  0  0 100  0
 0  0  86136 11220088   6764  98460    0    0     0     0 4347 4758  1  0 99  0
 0  0  86136 11220468   6764  98464    0    0     0     0 4464 4722  0  0 100  0
 0  0  86136 11238928   6764  95356    0    0     0     0 4588 4740  0  0 100  0
 0  0  86136 11221428   6764  98464    0    0     0     0 4879 4751  1  1 99  0
 0  0  86136 11221180   6772  98432    0    0  1010    64 4671 5504  1  1 99  0
 0  0  86136 11220676   6772  98468    0    0     0   276 3829 5063  1  0 99  0
 0  0  86136 11220436   6772  98468    0    0     0    12 4109 4736  0  0 100  0

I removed the tablet device from the windows machine:
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0  86136 11219004   7004  99744    0    3  2520  4956    2    8  2  5 88  4
 0  0  86136 11218500   7004  99744    0    0     0    12 1328  974  2  0 98  0
 0  0  86136 11218376   7004  99760    0    0  1010    12 1721 1634  1  1 99  0
 0  0  86136 11218616   7012  99764    0    0     0    72  878  825  0  0 100  0
 0  0  86136 11218872   7012  99752    0    0     0     4  956  838  0  0 100  0
 0  0  86136 11219368   7012  99752    0    0     0    20  889  814  0  0 100  0
 0  0  86136 11218996   7012  99752    0    0     0     0  897  819  0  0 99  0
 0  0  86136 11218872   7012  99752    0    0     0    12 1002  885  0  0 100  0
 0  0  86136 11218748   7020  99752    0    0     0    48  926  826  0  0 99  0
 1  0  86136 11218748   7020  99752    0    0     0     0  700  728  0  0 100  0
 0  0  86136 11218872   7020  99752    0    0     0     8  998  849  0  0 100  0
 0  0  86136 11218616   7020  99752    0    0     0     0  857  787  0  0 100  0
 0  0  86136 11218128   7020  99756    0    0  1010     4 1828 1619  0  1 99  0
 0  0  86136 11236108   7028  96644    0    0     0    72 1107  857  0  0 100  0
 0  0  86136 11219980   7028  99760    0    0     0     0  948  844  1  0 99  0
 0  0  86136 11219360   7028  99760    0    0     0     0  873  800  0  0 100  0

I did not notice any reduction in CS when I removed the tablet device from the Wheezy VM, likely because it is not using it or not pooling it as often.
More testing needs done with linux to ensure it does not cause this problem like windows does.

Red arrow represents when I removed the tablet device on the windows machine:
Screenshot at 2012-06-15 11:28:37.png

CPU in this server: AMD Phenom(tm) II X6 1090T Processor
# pveversion -v
Code:
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-12-pve
proxmox-ve-2.6.32: 2.1-68
pve-kernel-2.6.32-12-pve: 2.6.32-68
pve-kernel-2.6.32-7-pve: 2.6.32-60
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-16
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1
 
Hi,
hotplugging the tablet shouldn't be a problem, I have tested it last year, it was working fine.
(But un-hotplugging is more tricky when we close the console windows)

Did you have tested with last qemu-kvm in pvetest ?
They are a lot of change with in-kernel timer, so maybe the performances are better now.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!