Opened 13 years ago

Closed 13 years ago

#2723 closed defect (invalid)

High CPU usage by mythfrontend

Reported by: mythtv@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Hi,

I saw a thread some time ago on the ivtv-devel list about high CPU usage of mythfrontend. This was thought to be related to a newer revision of the ivtv driver, but after observing the behaviour of my own system for some time, I think it is not.

When playing a recording, mythfrontend uses approx 40% CPU:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

8429 mythtv 15 0 266m 98m 17m S 43 5.2 86:53.02 mythfrontend 2746 root 18 0 286m 15m 8656 S 1 0.8 7:10.35 mythbackend

However, even when I pause the playback, the CPU usage does _not_ change. It remains at approx 40%.

An strace of the mythfrontend process reveals the following:

Process 8429 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...>) = 0 ioctl(6, FIONREAD, [0]) = 0 write(7, "\0", 1) = 1 gettimeofday({1164405083, 432439}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 432924}, NULL) = 0 select(22, [3 6 9 21], [], [], {0, 0}) = 1 (in [6], left {0, 0}) read(6, "\0", 1) = 1 gettimeofday({1164405083, 433716}, NULL) = 0 nanosleep({0, 10000000}, NULL) = 0 ioctl(6, FIONREAD, [0]) = 0 write(7, "\0", 1) = 1 gettimeofday({1164405083, 447846}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 448017}, NULL) = 0 select(22, [3 6 9 21], [], [], {0, 0}) = 1 (in [6], left {0, 0}) read(6, "\0", 1) = 1 gettimeofday({1164405083, 448287}, NULL) = 0 gettimeofday({1164405083, 448378}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 448530}, NULL) = 0 select(22, [3 6 9 21], [], [], {0, 0}) = 0 (Timeout) gettimeofday({1164405083, 448689}, NULL) = 0 gettimeofday({1164405083, 448834}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 448985}, NULL) = 0 select(22, [3 6 9 21], [], [], {0, 0}) = 0 (Timeout) gettimeofday({1164405083, 449144}, NULL) = 0 nanosleep({0, 10000000}, NULL) = 0 ioctl(6, FIONREAD, [0]) = 0 write(7, "\0", 1) = 1 gettimeofday({1164405083, 459767}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 459920}, NULL) = 0 select(22, [3 6 9 21], [], [], {0, 0}) = 1 (in [6], left {0, 0}) read(6, "\0", 1) = 1 gettimeofday({1164405083, 460204}, NULL) = 0 nanosleep({0, 10000000}, NULL) = 0 ioctl(6, FIONREAD, [0]) = 0 write(7, "\0", 1) = 1 gettimeofday({1164405083, 506219}, NULL) = 0 ioctl(3, FIONREAD, [0]) = 0 gettimeofday({1164405083, 506707}, NULL) = 0

This just on and on and on and seems to be burning quite a few CPU cyles for nothing...

My setup is quite specific, so perhaps it is related: I'm using blueproxy to connect a simple VS2005 app on my PDA over bluetooth to the telnet interface of mythfrontend (which does absolutely nothing until a key is pressed; it even closes the socket after 30sec)

Is this reproducible by others?

Change History (3)

comment:1 Changed 13 years ago by anonymous

Whoops, sorry about the markup... Hope you guys can make sense out of it...

comment:2 Changed 13 years ago by anonymous

This ticket can be closed, it was indeed an ivtv-related problem. With ivtv-0.8.2 which contains a specific fix to remove a busy-wait the CPU-usage for mythfrontend drops down to less than 1%.

comment:3 Changed 13 years ago by danielk

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.