1 |
Walter Dnes writes: |
2 |
|
3 |
> On Thu, Feb 16, 2012 at 04:29:48PM +0100, Alex Schuster wrote |
4 |
> |
5 |
> > Then my hardware broke, and I got new one... |
6 |
> |
7 |
> I had ***EXACTLY THE SAME PROBLEM ON A FRESH INSTALL***. In My case |
8 |
> it was a 4+ year old Dell with onboard Intel GPU that was having |
9 |
> problems playing NHL Gamecenter Live streams at the slowest speed. I |
10 |
> solved the problem and sped up everything by doing... |
11 |
> 1) emerge system |
12 |
> 2) emerge world |
13 |
> 3) rebuild the kernel and reboot |
14 |
|
15 |
Good idea, Walter! But not in my case. The system had been set up long |
16 |
ago, and I did an emerge -e @world in the past already. |
17 |
|
18 |
> A fresh install will have the stage 3 binaries built with |
19 |
> lowest-common-denominator x86 or amd64 code (depending if you chose 32 |
20 |
> or 64 bit install). This is necessary in order to allow the install |
21 |
> code to run on all CPUs with the target platform. The downside is that |
22 |
> you lose all the optimisations that make Gentoo scream. Rebuilding the |
23 |
> install as described above builds optimized (i.e. faster) binaries. My |
24 |
> CFLAGS line in /etc/make.conf is... |
25 |
> |
26 |
> CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe" |
27 |
> CXXFLAGS="${CFLAGS}" |
28 |
|
29 |
I had those, when I upgraded the hardware: |
30 |
CFLAGS="-march=k8-sse3 -mfpmath=sse -O2 -pipe" |
31 |
Or something very silimar. |
32 |
|
33 |
But I also just did an emerge -e @world on the new system, using more |
34 |
sophisticated CFLAGS. I got them by doing like suggested on [*], using |
35 |
what -march=natve would do. And adding support for this graphite |
36 |
stuff. They are: |
37 |
CFLAGS="-pipe -march=amdfam10 -O2 \ |
38 |
-floop-interchange -floop-strip-mine -floop-block \ |
39 |
-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -m3dnow \ |
40 |
-mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx \ |
41 |
--param l1-cache-size=16 --param l1-cache-line-size=64 \ |
42 |
--param l2-cache-size=2048" |
43 |
|
44 |
> Before rebuilding your system, go over your USE flags to make sure |
45 |
> you've got the maximum optimization. To find out what your CPU |
46 |
> supports, execute the command |
47 |
> |
48 |
> grep flags /proc/cpuinfo | head -1 |
49 |
> |
50 |
> This will define the limits what your system can support. For |
51 |
> instance, mplayer can use the following flags... |
52 |
> |
53 |
> waltdnes@d530 ~ $ emerge -pv mplayer |
54 |
> |
55 |
> These are the packages that would be merged, in order: |
56 |
> |
57 |
> Calculating dependencies... done! |
58 |
> [ebuild R ] media-video/mplayer-1.0_rc4_p20110322-r1 USE="X a52 |
59 |
> alsa ass dga encode gif jpeg mmx mmxext mng mp3 opengl png quicktime |
60 |
> real rtmp sse sse2 ssse3 theora truetype win32codecs x264 xv xvid xvmc |
61 |
> -3dnow -3dnowext -aalib (-altivec) -amr (-aqua) -bidi -bindist -bl |
62 |
> -bluray -bs2b -cddb -cdio -cdparanoia -cpudetection -custom-cpuopts |
63 |
> -debug -dirac -directfb -doc -dts -dv -dvb -dvd -dvdnav (-dxr3) -enca |
64 |
> (-esd) -faac -faad -fbcon -ftp -ggi -gsm -iconv -ipv6 -jack -joystick |
65 |
> -jpeg2k -ladspa -libcaca -libmpeg2 -lirc -live -lzo -mad -md5sum |
66 |
> -mpg123 -nas -network -nut -openal -osdmenu -oss -pnm -pulseaudio -pvr |
67 |
> -radio -rar -rtc -samba -schroedinger -sdl -shm -speex -tga -toolame |
68 |
> -tremor -twolame -unicode -v4l -vdpau -vidix -vorbis -vpx -xanim |
69 |
> -xinerama -xscreensaver -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa" |
70 |
> 0 kB |
71 |
> |
72 |
> Your CPU will obviously support a different set of USE flags than |
73 |
> mine. Check the files /usr/portage/profiles/use.desc for a list of |
74 |
> global flags and /usr/portage/profiles/use.local.desc for |
75 |
> package-specific flags. |
76 |
|
77 |
These are my USE flags for mplayer, they should be fine: |
78 |
[ebuild R ] media-video/mplayer-1.0_rc4_p20120213 USE="3dnow |
79 |
3dnowext X a52 aalib alsa ass cdio dga directfb dts dv dvb dvd dvdnav |
80 |
enca encode faad fbcon ftp ggi gif iconv ipv6 jack jpeg jpeg2k live mad |
81 |
mmx mmxext mng mp3 nas network openal opengl osdmenu oss png pnm |
82 |
quicktime rar real rtc samba sdl shm speex sse sse2 ssse3 theora toolame |
83 |
tremor truetype twolame unicode vorbis x264 xinerama xscreensaver xv xvid |
84 |
(-altivec) (-aqua) -bidi -bindist -bl -bluray -bs2b -cddb -cdparanoia |
85 |
-cpudetection -debug -doc (-dxr3) (-esd) -faac -gsm -joystick -ladspa |
86 |
-libcaca -libmpeg2 -lirc -lzo -md5sum -nut -pulseaudio -pvr -radio -rtmp |
87 |
-tga -v4l -vdpau (-vidix) (-win32codecs) -xanim -xvmc -zoran" |
88 |
VIDEO_CARDS="-mga -s3virge -tdfx" 0 kB |
89 |
|
90 |
Now I'm bulding a new kernel, using genkernel, and without providing a |
91 |
custom made .config. Just in case I have some weird setting somewhere |
92 |
(debug output for SCSI stuff or something like that). |
93 |
|
94 |
[later...] |
95 |
|
96 |
So I did. Argh. I thought genkernel was smart enough to generate a |
97 |
working kernel from scratch, if no existing .config would be given. But |
98 |
the initramfs could not open my encrypted root partition, until I compiled |
99 |
XTS and AES directly into the kernel, not only as modules. Genkernel did |
100 |
not include modules for my NIC, somewhat annoying because I had to wait |
101 |
several minutes for mysql to start, until I could open a root shell. KDM |
102 |
was already running at that time, but I only saw a blank screen, because |
103 |
the radeon stuff was not compiled with KMS. There's also something |
104 |
wrong with my hardware clock. And iotop does not work, the kernel is |
105 |
missing CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT |
106 |
and CONFIG_TASK_IO_ACCOUNTING. |
107 |
|
108 |
But now I have KDE running again. As soon as I do my dd command, mplayer |
109 |
stutters, sometimes hanging for seconds. So it's probably not a flaw in |
110 |
my kernel .config. Too bad, I hoped that was the problem. |
111 |
|
112 |
I'm out of ideas now. This is really annoying, my system is fast, mplayer |
113 |
is using around 20% only, the system is mostly idle, but when there is |
114 |
I/O, videos do not run smoothly. And I do not want to copy every movie I |
115 |
want to watch to another drive first. |
116 |
|
117 |
BTW, when I do the dd if=/dev/zero of=/home/argh bs=10M count=1000 |
118 |
command, and interrupt with Ctrl-C, it takes some seconds until it stops. |
119 |
Shouldn't this happen immediately, unless I specify a very large block |
120 |
size? Writing speed is okay, 100 MB/s. |
121 |
|
122 |
Time to go to sleep now. |
123 |
|
124 |
[*] http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative |
125 |
|
126 |
Wonko |