View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: UseEvents trick
PostPosted: Tue Apr 01, 2008 9:56 am 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
Maybe I'm the only one that missed the UseEvents tip for Xorg/X CPU usage. But this is really effective and doesn't seem to install (that I've seen) by default.

Under Section "Device"

Code:
Option  "UseEvents" "True"


This has reduced CPU usage WAY DOWN for me. I never had a problem, but now have a lot more headroom, maybe I can try realtime commflag...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 2:30 pm 
Offline
Joined: Fri Nov 18, 2005 9:22 am
Posts: 777
Location: spencerport, ny (USA)
Yes! For me, it's necessary in order to have smooth playback. This really should be set by default... if it doesn't show up in the next build, we should add it to the R6 wishlist.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 5:56 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
I didn't even notice it missing after upgrading to R5F27. UseEvents was my "magic bullet" for HD playback in past versions.

Too Many Secrets - What sort of CPU gains are you seeing with UseEvents? I may have to do some experimenting...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 6:24 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
With UseEvents (720p)
Code:
top - 16:58:54 up 8 days, 54 min,  1 user,  load average: 0.25, 0.42, 0.54
Tasks: 120 total,   1 running, 118 sleeping,   0 stopped,   1 zombie
Cpu(s): 22.8%us,  1.2%sy,  0.0%ni, 65.3%id,  9.5%wa,  0.2%hi,  1.2%si,  0.0%st
Mem:    902040k total,   888812k used,    13228k free,      944k buffers
Swap:  1959920k total,    17460k used,  1942460k free,   473964k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16006 mythtv     0   0  313m 178m  70m S   41 20.3   7:16.18 mythfrontend
15961 root       0   0  168m 153m  49m S    7 17.4   0:39.10 Xorg
 3617 root       0   0     0    0    0 S    1  0.0   4:11.45 nfsd
  290 root       0  -5     0    0    0 S    0  0.0   0:25.14 xfsdatad/0
 3618 root       0   0     0    0    0 S    0  0.0   4:11.85 nfsd
 3619 root       0   0     0    0    0 S    0  0.0   4:11.82 nfsd
 3620 root       0   0     0    0    0 S    0  0.0   4:11.03 nfsd
11570 root       0   0     0    0    0 S    0  0.0   0:03.64 pdflush
    1 root       0   0  2036  604  552 S    0  0.1   0:01.17 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
    8 root       0  -5     0    0    0 S    0  0.0   0:00.69 events/0
    9 root       0  -5     0    0    0 S    0  0.0   0:00.98 events/1


Without UseEvents (720p)

Code:
top - 17:01:13 up 8 days, 57 min,  1 user,  load average: 1.60, 0.82, 0.66
Tasks: 119 total,   1 running, 118 sleeping,   0 stopped,   0 zombie
Cpu(s): 23.5%us,  6.0%sy,  0.0%ni, 57.3%id, 11.7%wa,  0.2%hi,  1.3%si,  0.0%st
Mem:    902040k total,   893728k used,     8312k free,     3376k buffers
Swap:  1959920k total,    17456k used,  1942464k free,   491088k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
18273 mythtv     0   0  300m 162m  70m S   43 18.5   0:14.51 mythfrontend
18228 root       1   0  168m 153m  49m S   15 17.4   0:03.07 Xorg
 3615 root       0   0     0    0    0 S    1  0.0   4:12.64 nfsd
 3619 root       0   0     0    0    0 S    1  0.0   4:12.29 nfsd
 3618 root       0   0     0    0    0 S    0  0.0   4:12.33 nfsd
 3620 root       0   0     0    0    0 S    0  0.0   4:11.55 nfsd
 3621 root       0   0     0    0    0 S    0  0.0   4:16.56 nfsd
 3622 root       0   0     0    0    0 S    0  0.0   4:10.28 nfsd
    1 root       0   0  2036  604  552 S    0  0.1   0:01.17 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
    8 root       0  -5     0    0    0 S    0  0.0   0:00.74 events/0
    9 root       0  -5     0    0    0 S    0  0.0   0:00.98 events/1


With UseEvents (1080i)

Code:
top - 17:09:42 up 8 days,  1:05,  1 user,  load average: 2.55, 1.74, 1.13
Tasks: 120 total,   1 running, 118 sleeping,   0 stopped,   1 zombie
Cpu(s): 36.5%us,  1.5%sy,  0.0%ni, 55.8%id,  4.8%wa,  0.0%hi,  1.3%si,  0.0%st
Mem:    902040k total,   889764k used,    12276k free,     3284k buffers
Swap:  1959920k total,    17456k used,  1942464k free,   475040k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
18875 mythtv     0   0  364m 225m 123m S   69 25.7   0:12.08 mythfrontend
18829 root       0   0  223m 203m 100m S    7 23.1   0:02.92 Xorg
 3620 root       0   0     0    0    0 S    1  0.0   4:13.39 nfsd
 3622 root       0   0     0    0    0 S    1  0.0   4:12.13 nfsd
 3615 root       0   0     0    0    0 S    0  0.0   4:14.41 nfsd
 3617 root       0   0     0    0    0 S    0  0.0   4:13.52 nfsd
 3619 root       0   0     0    0    0 D    0  0.0   4:14.15 nfsd
 3621 root       0   0     0    0    0 S    0  0.0   4:18.42 nfsd
24965 mythtv     0   0  288m  45m  13m S    0  5.1   2:16.66 mythbackend
18868 root       5   0  2328 1176  876 R    0  0.1   0:00.06 top
    1 root       0   0  2036  604  552 S    0  0.1   0:01.18 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1


Without (1080i)
Code:
top - 17:06:24 up 8 days,  1:02,  1 user,  load average: 1.75, 1.23, 0.87
Tasks: 119 total,   1 running, 118 sleeping,   0 stopped,   0 zombie
Cpu(s): 33.4%us,  1.3%sy,  0.0%ni, 46.8%id, 17.1%wa,  0.2%hi,  1.2%si,  0.0%st
Mem:    902040k total,   893136k used,     8904k free,     1144k buffers
Swap:  1959920k total,    17460k used,  1942460k free,   474632k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
18273 mythtv     0   0  365m 230m 123m S   62 26.2   1:15.62 mythfrontend
18228 root       0   0  223m 203m 100m S    6 23.1   0:19.38 Xorg
 3617 root       0   0     0    0    0 S    1  0.0   4:12.92 nfsd
 3615 root       0   0     0    0    0 S    0  0.0   4:13.70 nfsd
 3616 root       0   0     0    0    0 S    0  0.0   4:11.22 nfsd
 3618 root       0   0     0    0    0 S    0  0.0   4:13.55 nfsd
 3619 root       0   0     0    0    0 S    0  0.0   4:13.26 nfsd
 3620 root       0   0     0    0    0 S    0  0.0   4:12.71 nfsd
 3621 root       0   0     0    0    0 S    0  0.0   4:17.76 nfsd
 3622 root       0   0     0    0    0 S    0  0.0   4:11.37 nfsd
    1 root       0   0  2036  604  552 S    0  0.1   0:01.17 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
[/code]

Now here is where it get's interesting...

With UseEvents (mpeg4 transcoded HD 720p)

Code:
top - 17:20:42 up 8 days,  1:16,  1 user,  load average: 1.87, 2.46, 1.89
Tasks: 119 total,   1 running, 118 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.5%us,  1.7%sy,  0.0%ni, 69.7%id, 17.3%wa,  0.0%hi,  1.8%si,  0.0%st
Mem:    902040k total,   892468k used,     9572k free,     3380k buffers
Swap:  1959920k total,    17456k used,  1942464k free,   495796k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20058 mythtv     0   0  262m 124m  38m S   18 14.1   0:06.72 mythfrontend
20013 root       0   0  136m 122m  19m S    3 13.9   0:03.17 Xorg
 3621 root       0   0     0    0    0 S    1  0.0   4:21.13 nfsd
 3616 root       1   0     0    0    0 D    1  0.0   4:14.28 nfsd
 3618 root       0   0     0    0    0 S    1  0.0   4:16.61 nfsd
 3615 root       0   0     0    0    0 S    0  0.0   4:16.95 nfsd
 3617 root       0   0     0    0    0 S    0  0.0   4:15.89 nfsd
 3619 root       0   0     0    0    0 D    0  0.0   4:16.70 nfsd
 3622 root       0   0     0    0    0 S    0  0.0   4:14.77 nfsd
20148 root      15   0  2332 1180  876 R    0  0.1   0:00.02 top
    1 root       0   0  2036  604  552 S    0  0.1   0:01.18 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1


Without UseEvents (mpeg4 transcoded HD 720p)
Code:
top - 17:18:26 up 8 days,  1:14,  1 user,  load average: 2.50, 2.76, 1.88
Tasks: 121 total,   3 running, 116 sleeping,   0 stopped,   2 zombie
Cpu(s): 11.1%us, 45.1%sy,  0.0%ni, 31.4%id, 10.3%wa,  0.2%hi,  1.8%si,  0.0%st
Mem:    902040k total,   893456k used,     8584k free,     1312k buffers
Swap:  1959920k total,    17460k used,  1942460k free,   492508k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
19269 root      24   0  138m 125m  22m R   95 14.2   0:28.42 Xorg
19314 mythtv     0   0  265m 129m  39m S   16 14.7   1:50.11 mythfrontend
 3621 root       0   0     0    0    0 S    1  0.0   4:20.68 nfsd
 3616 root       0   0     0    0    0 S    0  0.0   4:13.73 nfsd
 3617 root       0   0     0    0    0 S    0  0.0   4:15.40 nfsd
 3619 root       0   0     0    0    0 S    0  0.0   4:16.17 nfsd
 3620 root       0   0     0    0    0 S    0  0.0   4:15.40 nfsd
 3622 root       0   0     0    0    0 S    0  0.0   4:14.19 nfsd
19878 root       0   0  2332 1180  876 R    0  0.1   0:00.08 top
    1 root       0   0  2036  604  552 S    0  0.1   0:01.18 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.26 migration/0
    3 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    5 root      RT   0     0    0    0 S    0  0.0   0:00.52 migration/1
    6 root       0  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
    8 root       0  -5     0    0    0 S    0  0.0   0:00.81 events/0


As I transcode a lot of HD shows for size purposes, this last test is significant.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 7:10 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
That last comparison certainly is impressive! Thanks for the results, I'll have to see how UseEvents affects my frontends...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 10:55 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
slowtolearn wrote:
That last comparison certainly is impressive! Thanks for the results, I'll have to see how UseEvents affects my frontends...


Yes, I've taken to auto-transcoding a lot of HD recordings that I don't plan on watching immediately (ie Letterman, Leno, Lost). This works great for saving space, but playback was always a CPU hit (though not enough to effect playback). Did some digging and found the UseEvents trick. Now everything runs much cooler and happier. Every little bit helps. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 11:18 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Is this setting specific to a certain video adapter?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 11:48 pm 
Offline
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location: Brisbane, Queensland, Australia
Cecil,

Just doing a quick search found that it relates to nVidia drivers.

http://www.dragonfyre13.com/blog/index.php/2007/02/20/useevents-flag-in-xorgconf/

http://www.debianhelp.org/node/3146

But searching on both xorg and nVidia websites reveals nothing.

_________________
Girkers


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 4:58 am 
Offline
Joined: Fri Nov 18, 2005 9:22 am
Posts: 777
Location: spencerport, ny (USA)
cecil wrote:
Is this setting specific to a certain video adapter?

Here's the discussion on this:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=13550
For me (homebrew Dragon 1.0), it made HD watchable on R5E50.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 11:38 am 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Yeah.... I thought this was nvidia only. There is also a reason it hasn't been added by default, but I cannot recall at the moment.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 21, 2008 6:42 am 
Offline
Joined: Wed Jan 25, 2006 1:03 pm
Posts: 240
Location: Shakopee, MN USA
I have found the useevents trick to work great even on SD playback. On my R5.5 RC14 machine, without it, CPU usage would go to 98% in Xorg. With it in place, I would get about 3% CPU usage.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 30, 2008 3:49 am 
Offline
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location: Brisbane, Queensland, Australia
When I tried the setting on my RC14 box it wouldn't startX :(

_________________
Girkers


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Google [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu