[AppleTV] Ubuntu Karmic Crystal HD R27516 thrashing problems.
#1
I've been running Karmic on my ATV with a CrystalHD card for quite a while and all of a sudden I'm having huge thrashing problems (swapping).

I'm not sure whether it's the new SVNs or updates I did for karmic. I made the mistake of updating Karmic yesterday and rebuilding SVN at the same time. SVN from yesterday afternoon had the same problems as todays (not sure on revision exactly yesterday).

Playback is almost hopeless at this point. Even going through the movie list is VERY VERY slow. Switching movies takes a few seconds, switching pages of movies takes almost 10. If playback ever starts it's about a frame every 5 seconds, and takes a good minute to start. CrystalHD card claims to be activated in the logs, but the system is so jacked it doesn't matter.

Anyone have any ideas or experiencing the same problems?

EDIT: Further notes. I updated my Revo with Karmic at the same time, and rebuilt SVN on that at the same time as well and am not experiencing the same problems. I'm almost certain it's memory related, but I can't see anything running taking up a ton of the RAM.
Reply
#2
Anyone?

Problem still persists with R27543.

iotop during startup of movie
Code:
TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
55 be/4 dan       709.60 K/s    0.00 B/s  0.00 %  0.00 % xbmc.bin --standalo
4996 be/4 dan      1310.04 K/s    0.00 B/s  0.00 %  0.00 % xbmc.bin --standalo
  670 be/4 haldaemo  915.10 K/s    0.00 B/s  0.00 %  0.00 % hald --daemon=yes  
5157 be/4 dan       455.94 K/s    0.00 B/s  0.00 %  0.00 % xbmc.bin --standalo
5158 be/4 dan       420.63 K/s    0.00 B/s  0.00 %  0.00 % xbmc.bin --standalo
5161 be/4 dan       179.81 K/s    0.00 B/s  0.00 %  0.00 % python /usr/bin/iot
1687 be/4 dan         3.21 K/s    0.00 B/s  0.00 %  0.00 % sshd: dan@pts/1
5017 be/4 dan       102.75 K/s    0.00 B/s  0.00 %  0.00 % xbmc.bin --standalo
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init

vmstat 1 during startup of movie... the swapping stopping is when the movie finally started after a couple of minutes (it's an SD movie so it actually played, and perfectly once it got going.)
Code:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
3  2 135096   3456    376  22548  528  324  1173   456 3842 1674 26  4 10 60
2  1 130700   4056    392  22924  552    0  1672    24 5668 2571 31  3  0 66
0  3 130668   3696    436  22740  276    0  2388     0 5044 2497 27  5  0 68
3  2 130640   3096    496  23168  152    0  2172     0 4906 2417 28  5  0 67
1  2 130640   3652    556  22152  356    0  2788     0 5328 2503 29  6  0 65
2  2 130284   4180    508  20608 1228    0  1388     0 6460 2647 27  9  0 64
1  3 129780   3440    512  21204  728    0  1992    24 5128 2517 32  7  0 61
4  0 105296   6692    512  22040  436    0  1948     0 5020 2450 32  4  0 64
4  0 105196   4892    512  23604  192    0   192     0 4776  977 89 10  0  1
2  1 105208   4256    452  24356    0   12     0    12 3138 2177 45  7 35 13
4  0 105204   4256    452  24356    4    0     4     0 4928 2250 40 10 46  4
2  0 105204   4256    460  24348    0    0     0    24 4376 2320 40  8 52  0
Reply
#3
Well it turns out I wasn't imagining things. The Ubuntu guys decided to add their own readahead project called ureadahead and remove sreadahead in Karmic (the stable tree). There are a couple of bugs.

1. After upgrading/installing/removing certain packages the ureadahead cache is rebuilt the next reboot. During this boot a bunch of memory is used to build the cache. That memory is never returned to the system until another reboot happens (this can be substantial amounts of RAM). https://bugs.launchpad.net/ubuntu/+sourc...bug/501715

2. If your system doesn't have enough RAM for the cache to be built, an out of memory error will be thrown during bootup. The memory used before the error is thrown is not released and the boot continues with very little remaining RAM. (This is the one that pegged me on the ATV). https://bugs.launchpad.net/ureadahead/+bug/491943

To give you an idea of the difference... this is the system running with Xorg, and xbmc-standalone with and without ureadahead installed.
Code:
With ureadahead
dan@atv-ubuntu910:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           241        233          8          0          1         21
-/+ buffers/cache:        210         31
Swap:         1054         71        982


Without ureadahead
dan@atv-ubuntu910:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           241        233          8          0          4         84
-/+ buffers/cache:        144         96
Swap:         1054          3       1051

My fix was to remove ureadahead, delete files /etc/init/ureadahead* since the kernel modules seem to want to run anyway, and reboot.

Maybe this info will help someone else...
Reply

Logout Mark Read Team Forum Stats Members Help
[AppleTV] Ubuntu Karmic Crystal HD R27516 thrashing problems.0