[jitsi-dev] AMD 64bit Ubuntu CPU usage woes


#1

Hi,

... another chapter of the high CPU usage story: I installed a brand new machine - partially to replace the aging Linphone for videoconferencing. The OS is Ubuntu 10.10 64-bit and I also installed a recent SUN Java JVM:

Linux 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

The hardware isn't a Mickymouse one either:

lscpu
Architecture: x86_64
CPU op-mode(s): 64-bit
CPU(s): 2
Thread(s) per core: 1
Core(s) per socket: 2
CPU socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 16
Model: 6
Stepping: 3
CPU MHz: 3100.000
Virtualization: AMD-V
L1d cache: 64K
L1i cache: 64K
L2 cache: 1024K

lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
00:01.0 PCI bridge: Device 1b0a:9602
00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0)
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS880 [Radeon HD 4200]
01:05.1 Audio device: ATI Technologies Inc RS880 Audio Device [Radeon HD 4200]
02:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (rev c0)

A simple audio only call to my Asterisk on the local LAN takes 50%+ CPU, turning on video adds only a couple of percent - probably it goes to 59%

Echo cancelling fails immediately. Latency is about 1 sec (audio only). During the call CPU usage can go up until 67% - latency surges to 2sec.

My Intel based notebook computer with half of the processing power is fine (since I changed from OpenJDK to the SUN one)

What's going on here? Has anybody on this mailing list noticed that the CPU issue appears more on:
- AMD machines
- 64 bit operating systems
- the combination of
?

When the problem is not reproducable by the developpers for not having access to the troublemaking hardware - how could I help?

Greetings
Conrad


#2

Hi,

I have a similar configuration (AMD64, 2.200MHz, 8GB) running with openSuse 11.3,
SUN JDK, _no_ Pulseaudio.

When I perform calls jitsi uses about 5-7% of CPU in audio mode (video not
testet for this purpose). Only during startup CPU goes up to ~50% but goes
to 0% when idle.

I often do local call tests on this machine: start vmplayer with another
openSuse 11.3, run another client (not jitsi to have real interop tests)
together with Zfone and exchange audio between the two (fully encrypted)
on this virtal machine.
Even in this case my CPU rarely goes over 12-14% (I don't know how much
vmplayer consumes). Sometimes I have wireshark up and running to check
protocols, plus of course the normal duties of the OS and the system
behaves normal.

AFAIK Ubuntu uses PulseAudio by default - could this be a reason for
the different behavior? Jitsi uses portaudio to connect to ALSA, maybe
the ALSA emulation of PulseAudio behaves different as native ALSA an thus
may trigger this strange behavior in Jitsi?

Regards,
Werner

···

Am 05.02.2011 16:55, schrieb conrad_videokonferenz@gmx.de:

Hi,

... another chapter of the high CPU usage story: I installed a brand new machine - partially to replace the aging Linphone for videoconferencing. The OS is Ubuntu 10.10 64-bit and I also installed a recent SUN Java JVM:

Linux 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

The hardware isn't a Mickymouse one either:

lscpu
Architecture: x86_64
CPU op-mode(s): 64-bit
CPU(s): 2
Thread(s) per core: 1
Core(s) per socket: 2
CPU socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 16
Model: 6
Stepping: 3
CPU MHz: 3100.000
Virtualization: AMD-V
L1d cache: 64K
L1i cache: 64K
L2 cache: 1024K

lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
00:01.0 PCI bridge: Device 1b0a:9602
00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0)
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS880 [Radeon HD 4200]
01:05.1 Audio device: ATI Technologies Inc RS880 Audio Device [Radeon HD 4200]
02:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (rev c0)

A simple audio only call to my Asterisk on the local LAN takes 50%+ CPU, turning on video adds only a couple of percent - probably it goes to 59%

Echo cancelling fails immediately. Latency is about 1 sec (audio only). During the call CPU usage can go up until 67% - latency surges to 2sec.

My Intel based notebook computer with half of the processing power is fine (since I changed from OpenJDK to the SUN one)

What's going on here? Has anybody on this mailing list noticed that the CPU issue appears more on:
- AMD machines
- 64 bit operating systems
- the combination of
?

When the problem is not reproducable by the developpers for not having access to the troublemaking hardware - how could I help?

Greetings
Conrad


#3

Hallo Werner,

I have a similar configuration (AMD64, 2.200MHz, 8GB) running with
openSuse 11.3,> SUN JDK, _no_ Pulseaudio.

In an act of despair, I kicked out Pulseaudio by just deinstalling it.

When I perform calls jitsi uses about 5-7% of CPU in audio mode (video not
testet for this purpose). Only during startup CPU goes up to ~50% but goes
to 0% when idle.

CPU usage stays high - it goes up to 80% and stays there - so the problem hasn't been solved.

But more importantly: The latency is much better - even echo cancelling works on that machine.

So I can stick with SC :wink:

may trigger this strange behavior in Jitsi?

Partially - as it looks like. But I wonder if there is a way to get Pulse and Jitsi live in perfect harmony making it better suited for the not so techie users. :slight_smile:

Viele Grüße aus Berlin und vielen Dank für die große Hilfe :wink:
Conrad


#4

Hallo Conrad,

good to know. I did some tests between an XP system and my Linux
here with Audio, Video and fully encrypted. The CPU load was about
10-12% on my Linux (I don't know for XP).

BTW, desktop sharing with a Linux machine and an AMD graphic system
is a CPU killer. I tested this some time ago, latency is "unter aller Sau" :slight_smile:
This is because all AMD graphic cards are optimized for "write to the
card". The desktop sharing software _reads_ from the graphic card
which is extremly slow in comparison to _write_ . This also
then gives extremly bad latency. I've not tested with windows
or other graphic cards yet.

Regards,
Werner

···

Am 05.02.2011 19:55, schrieb Conrad Beckert:

Hallo Werner,

I have a similar configuration (AMD64, 2.200MHz, 8GB) running with
openSuse 11.3,> SUN JDK, _no_ Pulseaudio.

In an act of despair, I kicked out Pulseaudio by just deinstalling it.

When I perform calls jitsi uses about 5-7% of CPU in audio mode (video not
testet for this purpose). Only during startup CPU goes up to ~50% but goes
to 0% when idle.

CPU usage stays high - it goes up to 80% and stays there - so the problem hasn't been solved.

But more importantly: The latency is much better - even echo cancelling works on that machine.

So I can stick with SC :wink:

may trigger this strange behavior in Jitsi?

Partially - as it looks like. But I wonder if there is a way to get Pulse and Jitsi live in perfect harmony making it better suited for the not so techie users. :slight_smile:

Viele Grüße aus Berlin und vielen Dank für die große Hilfe :wink:
Conrad


#5

Hallo Werner - Dear Jitsi-Dev-List

... sounds logical. With that in mind, and all the tests done: There are valuable bits of information floating around like chips of wood on the water - with nothing to consolidate it.

It's quite obvious that a software with a functional spectrum and a wide base on systems to run on (OS, Linux distries etc) has many side effects that bother someone out there (but fortunately not all of us).

So what about opening a Wiki where we can share our information and tests and use cases?

This mailing list scrolls through. Next week this information on AMD desktop sharing might be out of sight and someone else wonders why it doesn't work well on his machine.

As Jitsi matures - many of our woes are gone- perhaps next week. Others might persist on some hard/software configurations and must be worked around.

I do a lot of testing because I think, Jitsi is a cool piece of software which I can use for remote collaboration. I might test thinks that others already tested and for that leave out other tests...

What Do you think?
Conrad

-------- Original-Nachricht --------

···

Datum: Sat, 05 Feb 2011 20:08:01 +0100
Von: Werner Dittmann <Werner.Dittmann@t-online.de>
An: dev@jitsi.java.net
Betreff: [jitsi-dev] Re: AMD 64bit Ubuntu CPU usage woes

Hallo Conrad,

good to know. I did some tests between an XP system and my Linux
here with Audio, Video and fully encrypted. The CPU load was about
10-12% on my Linux (I don't know for XP).

BTW, desktop sharing with a Linux machine and an AMD graphic system
is a CPU killer. I tested this some time ago, latency is "unter aller Sau"
:slight_smile:
This is because all AMD graphic cards are optimized for "write to the
card". The desktop sharing software _reads_ from the graphic card
which is extremly slow in comparison to _write_ . This also
then gives extremly bad latency. I've not tested with windows
or other graphic cards yet.

Regards,
Werner

Am 05.02.2011 19:55, schrieb Conrad Beckert:
> Hallo Werner,
>
>> I have a similar configuration (AMD64, 2.200MHz, 8GB) running with
>> openSuse 11.3,> SUN JDK, _no_ Pulseaudio.
> In an act of despair, I kicked out Pulseaudio by just deinstalling it.
>
>> When I perform calls jitsi uses about 5-7% of CPU in audio mode (video
not
>> testet for this purpose). Only during startup CPU goes up to ~50% but
goes
>> to 0% when idle.
> CPU usage stays high - it goes up to 80% and stays there - so the
problem hasn't been solved.
>
> But more importantly: The latency is much better - even echo cancelling
works on that machine.
>
> So I can stick with SC :wink:
>
>> may trigger this strange behavior in Jitsi?
> Partially - as it looks like. But I wonder if there is a way to get
Pulse and Jitsi live in perfect harmony making it better suited for the not so
techie users. :slight_smile:
>
> Viele Grüße aus Berlin und vielen Dank für die große Hilfe :wink:
> Conrad
>