From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RykJY-000712-Q2 for garchives@archives.gentoo.org; Sat, 18 Feb 2012 13:27:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19B3CE0B1B; Sat, 18 Feb 2012 13:26:45 +0000 (UTC) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) by pigeon.gentoo.org (Postfix) with ESMTP id AD3FCE09E7 for ; Sat, 18 Feb 2012 13:25:34 +0000 (UTC) Received: by iakl21 with SMTP id l21so7798470iak.40 for ; Sat, 18 Feb 2012 05:25:34 -0800 (PST) Received-SPF: pass (google.com: domain of jamesbroadhead@gmail.com designates 10.50.178.73 as permitted sender) client-ip=10.50.178.73; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jamesbroadhead@gmail.com designates 10.50.178.73 as permitted sender) smtp.mail=jamesbroadhead@gmail.com; dkim=pass header.i=jamesbroadhead@gmail.com Received: from mr.google.com ([10.50.178.73]) by 10.50.178.73 with SMTP id cw9mr2722306igc.23.1329571534182 (num_hops = 1); Sat, 18 Feb 2012 05:25:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=ntMmulNmuH1w0U2+u+NklkfgUrFbQJRGX3TZ8/UnCoE=; b=p/pBuY3JdBW/Vb7q5Yq+XCVTcVe30vMqH8DZRHq7f7YwtCybvHvfsnjl2mDkVqFo3l ZIiVk2/ekayCe5bQSdbJBA8k70C3k6y7WnFw7HLqlPVhnRJZ3lzyEeo2cYeKNLg42Rpz WYipnMlT9Vlxd1G1K51+MMnAvuL/EYBqoA9lk= Received: by 10.50.178.73 with SMTP id cw9mr2209399igc.23.1329571533577; Sat, 18 Feb 2012 05:25:33 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.42.222.201 with HTTP; Sat, 18 Feb 2012 05:25:13 -0800 (PST) In-Reply-To: <20120218064552.1ff2d025@weird.wonkology.org> References: <20120216162948.7eea6070@weird.wonkology.org> <20120218021302.GA13950@waltdnes.org> <20120218064552.1ff2d025@weird.wonkology.org> From: James Broadhead Date: Sat, 18 Feb 2012 13:25:13 +0000 Message-ID: Subject: Re: [gentoo-user] I want to play movies without hangs To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 8fc8b1b1-12e1-4c63-b252-f3e43b1a0599 X-Archives-Hash: 9164b7853bcf84088daf77e11fd1b2c3 On 18 February 2012 05:45, Alex Schuster 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... >> >> =C2=A0 I had ***EXACTLY THE SAME PROBLEM ON A FRESH INSTALL***. =C2=A0In= 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. =C2= =A0I >> 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. > >> =C2=A0 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). =C2=A0This is necessary in order to allow the instal= l >> code to run on all CPUs with the target platform. =C2=A0The downside is = that >> you lose all the optimisations that make Gentoo scream. =C2=A0Rebuilding= the >> install as described above builds optimized (i.e. faster) binaries. =C2= =A0My >> CFLAGS line in /etc/make.conf is... >> >> CFLAGS=3D"-O2 -march=3Dnative -mfpmath=3Dsse -fomit-frame-pointer -pipe" >> CXXFLAGS=3D"${CFLAGS}" > > I had those, when I upgraded the hardware: > CFLAGS=3D"-march=3Dk8-sse3 -mfpmath=3Dsse -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=3Dnatve would do. And adding support for this graphite > stuff. They are: > CFLAGS=3D"-pipe -march=3Damdfam10 -O2 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-floop-interchange -floop-strip-mine -floop-bl= ock \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -= m3dnow \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -m= lwp -mavx \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0--param l1-cache-size=3D16 --param l1-cache-li= ne-size=3D64 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0--param l2-cache-size=3D2048" > >> =C2=A0 Before rebuilding your system, go over your USE flags to make sur= e >> you've got the maximum optimization. =C2=A0To find out what your CPU >> supports, execute the command >> >> grep flags /proc/cpuinfo | head -1 >> >> =C2=A0 This will define the limits what your system can support. =C2=A0F= or >> 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 =C2=A0 R =C2=A0 =C2=A0] media-video/mplayer-1.0_rc4_p20110322-r1= =C2=A0USE=3D"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=3D"-mga -s3virge -tdfx -vesa= " >> 0 kB >> >> =C2=A0 Your CPU will obviously support a different set of USE flags than >> mine. =C2=A0Check 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 =C2=A0 R =C2=A0 =C2=A0] media-video/mplayer-1.0_rc4_p20120213 =C2= =A0USE=3D"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=3D"-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 compile= d > 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=3D/dev/zero of=3D/home/argh bs=3D10M count=3D100= 0 > 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 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0Wonko > Please try: ~/.mplayer/config lavdopts=3Dthreads=3D2 # Use 128MiB input cache by default. cache =3D 131072 # Prefill 20% of the cache before starting playback. cache-min =3D 20.0 Which should eliminate disk IO somewhat