X2Go Bug report logs - #526
Included PulseAudio consumes too much CPU when launched with high priority

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Nable 80 <nable.maininbox@googlemail.com>

Date: Sun, 29 Jun 2014 14:05:01 UTC

Severity: normal

Tags: build-win32

Found in version 4.0.2.0

Fixed in version x2goclient/4.0.2.1

Done: Michael DePaulo <mikedep333@gmail.com>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#526: [X2Go-Dev] Bug#526: Bug#526: Included PulseAudio consumes too much CPU when launched with high priority
Reply-To: Michael DePaulo <mikedep333@gmail.com>, 526@bugs.x2go.org
Resent-From: Michael DePaulo <mikedep333@gmail.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Mon, 30 Jun 2014 14:15:01 +0000
Resent-Message-ID: <handler.526.B526.140413746612257@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 526
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: build-win32
Received: via spool by 526-submit@bugs.x2go.org id=B526.140413746612257
          (code B ref 526); Mon, 30 Jun 2014 14:15:01 +0000
Received: (at 526) by bugs.x2go.org; 30 Jun 2014 14:11:06 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham version=3.3.2
Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id ED9AE5DB53
	for <526@bugs.x2go.org>; Mon, 30 Jun 2014 16:11:04 +0200 (CEST)
Received: by mail-wg0-f45.google.com with SMTP id l18so8038546wgh.28
        for <526@bugs.x2go.org>; Mon, 30 Jun 2014 07:11:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=XSw3l67lUK1xd1XFQDEmw21/CkeRaTRspI029MI+/uc=;
        b=Ygo+cKQnYg7HqkXtnzNdHo5YpzHBRFUqBNGyn4vFaLTWDduSOo17Z5tHGI6GrFLTc3
         zEQHRDd0D2cfFTT36PVubtcL/sIzDdPxAeaaWmwuY4BoKeXBDySig2ZjtadGwbMhVjG9
         8MK97IzLzA1PTEx0lOD+BswCzINzMOvKeGZIWhrVOkyuABSszfXl8KAliMGeIPYLuB3v
         ItgCnSrPzxZ15KmbbJvCAEyB8UFMiDKN9sNocxus6sBhT7HPidsYcV+cBtfvOMuQcLoJ
         Taw8T1dWUc845mIsgI2Yn7IgASvkUu7EjcyTJ24wbOtgbH9rUxURTjagbQGH5kqeu8AM
         IyuA==
MIME-Version: 1.0
X-Received: by 10.180.82.228 with SMTP id l4mr29184614wiy.78.1404137464571;
 Mon, 30 Jun 2014 07:11:04 -0700 (PDT)
Received: by 10.180.98.233 with HTTP; Mon, 30 Jun 2014 07:11:03 -0700 (PDT)
In-Reply-To: <CALxOYEaeeDNT6bgHE+qeFaz-meX3wGJWBoGUO30YWx0DPp+VgA@mail.gmail.com>
References: <CALxOYEb=dwakiQOV7yzA_2_VbfOw2OxJ7+U6RUJgzE-aUE871A@mail.gmail.com>
	<20140629150317.Horde.A9WWt0-saEYl182FgeDL2g9@mail.das-netzwerkteam.de>
	<CALxOYEaeeDNT6bgHE+qeFaz-meX3wGJWBoGUO30YWx0DPp+VgA@mail.gmail.com>
Date: Mon, 30 Jun 2014 10:11:03 -0400
Message-ID: <CAMKht8jWCXHWimFaPGe66xkb2dSEzwLsvHWPaq8hQKCw8geLJA@mail.gmail.com>
From: Michael DePaulo <mikedep333@gmail.com>
To: Nable 80 <nable.maininbox@googlemail.com>, 526@bugs.x2go.org
Content-Type: multipart/mixed; boundary=f46d04440494cafb9d04fd0e3ad8
[Message part 1 (text/plain, inline)]
Hi Nable,

1. thank you for the patch. Command line testing shows that it does
lower the priority for PulseAudio 5.0 on Windows to "normal".
PulseAudio 1.1 ignores the argument and remains at "high" priority,
even though --help states that it recognizes the argument. 0.9.6
defaults to normal priority anyway. None of them refuse to start when
the argument is passed though.

2. I will incorporate your patch (it's only 1 line after all,) but
after talking with the PulseAudio developers, I will extend it so that
"normal" priority will only be set on Windows XP and Server 2003 /
Server 2003 R2. On Windows Vista / server 2008 and later, we will
continue to default to "high" priority.
(You are welcome to extend the patch to do this, or I will do extend
it later today or tomorrow.)

3. Right now I cannot test the patch with x2goclient because the
WIndows build VM has a networking problem. Mike#1 will fix that
problem sometime this week.

4. My testing reveals the following:
a. I am able to reproduce this bug. See setup #2 below.
b. I encountered a different bug with the virtual hardware (setup #1),
which is fixed by switching to a different sound driver (setup #2). I
will clone this bug report for my setup #1 bug.
c. This bug does not result in high CPU usage until audio is playing,
unlike my bug.
d. Manually  lowering the priority in task manager does appear to be a
valid workaround.

5. All my test details:

setup #1:
Note: default sound driver. I think I have a driverpacks.net driver
pack installed though, so it may not be the default driver for XP
without said driver pack.
Host & Hypervisor: Fedora 20 w/ KVM/virt-manager
VM accessed via: VirtViewer 0.6.0 64-bit for Windows w/ the SPICE protocol
Guest OS: Windows XP SP3 32-bit
vCPUs : 2 (host has 4 cores, core i5 750)
Sound setting in virt-manager: ac97
Sound adapter according to Windows: Intel(r) AC'97 Audio Controller -
SIgmaTel Codec
Driver Provider: SigmaTel
Driver Date: 12/20/2001
Driver Version: 5.10.0.7159

Results with: PulseaAudio 5.0, PulseAudio 1.1, and PulseAudio 0.9.6
launched from the command-line:
The combined CPU usage of pulseaudio.exe + "System" is very high, even
at normal priority, and the VM is extremely slow overall. This occurs
before any sound as playing. In other words, as the process is
started, the CPU usage immediately goes up and the VM immediately
becomes extremely slow. The combined CPU usage is always greater than
or equal to 1 CPU core.See #1 for notes on the behavior of the
priority. And yes, "System" CPU usage is normally 0% or just above 0%,
when pulseaudio.exe is not running.
The attached logs are from said results.

Results with x2goclient 4.0.2.0 (PulseAudio 5.0):
X2Go client GUI is extremely slow for same reason as on the
command-line. Cannot test any further.


setup #2
Note: same as before, except for a different sound driver:
Host & Hypervisor: Fedora 20 w/ KVM/virt-manager
VM accessed via: VirtViewer 0.6.0 64-bit for Windows w/ the SPICE protocol
Guest OS: Windows XP SP3 32-bit
vCPUs : 2 (host has 4 cores, core i5 750)
Sound setting in virt-manager: ac97
Sound adapter according to Windows: Intel(r) 82801AA AC'97 Audio Controller
Driver Provider: Microsoft
Driver Date: 7/1/2001
Driver Version: 5.1.2535.0

Results with: PulseaAudio 5.0, PulseAudio 1.1, and PulseAudio 0.9.6
launched from the command-line:
Whether I have normal priority or high priority, there is no high CPU
usage for either process, and no VM slowdown.

Results with x2goclient 4.0.2.0 (PulseAudio 5.0):
I reproduced this bug reported by Nable. I also observed that lowering
PulseAudio to normal fixes the problem. Only 1 vCPU was maxed out for
me (Nable had single core.) Also, unlike my problem with setup #1, the
VM is not extremely slow. Also, unlike my problem setup #1, CPU usage
is not high until audio is playing. Also, unlike my problem on
setup#1, "System's usage is 0% or a few % like normal.  There seems to
be a 1 second delay in audio, but that may be due to me accessing the
VM over Virt-Viewer. Also, the delay occurs at high priority.

-Mike#2

On Sun, Jun 29, 2014 at 11:47 AM, Nable 80
<nable.maininbox@googlemail.com> wrote:
> Hi Mike!
>
>> Our PA expert will take a look at that (I hope!).
> I've attached possible workaround, although I'm not sure if it's acceptable.
>
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> http://lists.x2go.org/listinfo/x2go-dev
[pulse-0.9.6-on-xp-normal-priority-defaulted-log.txt (text/plain, attachment)]
[config.test.pa (application/octet-stream, attachment)]
[pulse-1.1-on-xp-normal-priority-ignored-log.txt (text/plain, attachment)]
[pulse-5.0-on-xp-normal-priority-log.txt (text/plain, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sun Nov 24 07:08:11 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.