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

Please try:
~/.mplayer/config
  lavdopts=threads=2
  # Use 128MiB input cache by default.
  cache = 131072
  # Prefill 20% of the cache before starting playback.
  cache-min = 20.0

Which should eliminate disk IO somewhat

Reply via email to