Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] amarok gets "lags" when I use other programs
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Sep 21, 2007 5:02 pm    Post subject: [SOLVED] amarok gets "lags" when I use other progr Reply with quote

That's my problem. When i use emerge, or another cpu consuming operation, amarok starts to lag (stops playing and starts again every few seconds). I guess that because there's not enough cpu/memory left for amarok when emerge is running. Is there any way to ser amarok to "real time priority" ??

Last edited by Gabriel_Blake on Tue Oct 16, 2007 6:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
Mantaar
Apprentice
Apprentice


Joined: 17 May 2007
Posts: 219

PostPosted: Fri Sep 21, 2007 5:42 pm    Post subject: Re: amarok gets "lags" when I use other programs Reply with quote

Gabriel_Blake wrote:
Is there any way to ser amarok to "real time priority" ??

<cynical_but_not_offending>Uh, please get rid of the Windowsthink... ;-) </cynical_but_not_offending>

In *NIX-world, we call that 'to nice a process' since its CPU-priority is determined by its nice value. On a single user machine however, you generally don't need that. I've been using Linux exclusively for some two and a half years now and never really needed it.

Besides, I don't think that renicing such a bloаted hog will actually increase its performance. Could you please first check whether or not you're using the ARTS-sound demon? If so, try disabling it altogether. (KDE-users: help me! How to do this? I think it was somewhere in KDE's 'control center'... something like a checkbox with 'use sound server'... )
You'll have to choose something different for 'output' in Amarok as well.
_________________
Error compiling committee.c: too many arguments to function.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Sep 21, 2007 10:14 pm    Post subject: Reply with quote

I'm not using the demon you've mentioned. I'm not even using KDE :) I'm on fluxbox. The output plugin for amarok is alsa (installed as kernel module).

Hmmm... now I've realized that the bigger the compiled package, the bigger the lag :/
Back to top
View user's profile Send private message
Mantaar
Apprentice
Apprentice


Joined: 17 May 2007
Posts: 219

PostPosted: Sat Sep 22, 2007 2:08 am    Post subject: Reply with quote

If you don't insist on using amarok, try mpd and gmpc. They follow a client/server model: your music keeps on playing even when you restart X (and even when you restart your computer) and you can control that thing from console via mpc.

If you want to continue using amarok you may try to increase your alsa buffer size. Consult alsa docs or somebody else on how to do that, I have no idea, I just know I did something like that once. Long. Ago.
_________________
Error compiling committee.c: too many arguments to function.
Back to top
View user's profile Send private message
wyvern5
Apprentice
Apprentice


Joined: 11 Nov 2006
Posts: 161

PostPosted: Sat Sep 22, 2007 6:00 am    Post subject: Reply with quote

Also, set your HZ in the kernel to be 1000 instead of the default 100. 1000 is better for desktops. How fast is your CPU?
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Sat Sep 22, 2007 6:03 am    Post subject: Re: amarok gets "lags" when I use other programs Reply with quote

Gabriel_Blake wrote:
I guess that because there's not enough cpu/memory left for amarok when emerge is running.


I know this obviously won't help for other apps, but have you tried setting PORTAGE_NICENESS?
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sat Sep 22, 2007 9:06 am    Post subject: Reply with quote

I've rebuild the kernel with 1000Hz (My procesor is Croe 2 Duo 4300). But it didn't help

I'll give mpd and gmpc a try as you said Mantaar.
Back to top
View user's profile Send private message
KRF
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jun 2006
Posts: 124
Location: Germany

PostPosted: Sat Sep 22, 2007 9:30 am    Post subject: Reply with quote

Give PORTAGE_NICENESS a try. Also check this: http://bugs.kde.org/show_bug.cgi?id=136576
_________________

Gentoo Linux, running kde-3.5
CPU: i686 Intel P4 2.80GHz | RAM: 2048MB DDR
Profile: gentoo-sources-2.6.23*, gcc-4.1*, portage-2.1.3* (2007.0)

Please add [SOLVED] to your message title if your problem is solved.
Back to top
View user's profile Send private message
wyvern5
Apprentice
Apprentice


Joined: 11 Nov 2006
Posts: 161

PostPosted: Sat Sep 22, 2007 5:32 pm    Post subject: Reply with quote

Your CPU is plenty fast enough to have completely smooth audio playback. What is your motherboard?
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sat Sep 22, 2007 7:54 pm    Post subject: Reply with quote

Gigabyte 965P-S3. Guess it's not a hardware problem. I think I'll just find a different mp3 player. Amarok takes too long to start and I prefer to hae something "lightweight" :)

Can't emerge mpd but thats in a different thread.
Back to top
View user's profile Send private message
wyvern5
Apprentice
Apprentice


Joined: 11 Nov 2006
Posts: 161

PostPosted: Sat Sep 22, 2007 11:40 pm    Post subject: Reply with quote

I presume you're using the xine output plugin?
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sun Sep 23, 2007 9:34 am    Post subject: Reply with quote

Yes :)
Back to top
View user's profile Send private message
argent2
n00b
n00b


Joined: 24 Sep 2007
Posts: 1

PostPosted: Mon Sep 24, 2007 12:06 pm    Post subject: Reply with quote

@Gabriel

I've had a similar problem with audio, and although I don't have a solution, I may be able to make a suggestion. Are you using the ext3 filesystem and are the pauses every 5 seconds or so?
Back to top
View user's profile Send private message
eean
Guru
Guru


Joined: 10 Jun 2002
Posts: 355
Location: Kirksville, MO USA

PostPosted: Mon Sep 24, 2007 3:53 pm    Post subject: Reply with quote

Try the newest kernel or the -ck kernel.

Now if your system is actually running out of memory and working out of swap, there is probably nothing that can be done for it, your system is going to pretty much grind to a halt when that happens. You can set portage to use only -j1 instead of -j3 or something (its in your /etc/make.conf), having multiple compiles running uses *a lot* of memory.

However with the powerful computers we have these days theres no reason for skip when your CPU is just busy. Older kernels (before the most recent) had a scheduler designed with servers in mind which sometimes caused sound skips. The new scheduler should help somewhat.
_________________
Amarok - Rediscover your Music
Back to top
View user's profile Send private message
wyvern5
Apprentice
Apprentice


Joined: 11 Nov 2006
Posts: 161

PostPosted: Mon Sep 24, 2007 6:59 pm    Post subject: Reply with quote

Try compiling xine-lib with mad support.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Sep 28, 2007 6:37 am    Post subject: Reply with quote

Compiling xine-lib with mad support didn't give much. I have 2x512MB of RAM in dual chanel, and 5GB of swap so I don't think there's a problem with memory. i'll look for a different player.

Thanks for trying to help me. I appreciate that :)
Back to top
View user's profile Send private message
martin.k
Guru
Guru


Joined: 28 Nov 2004
Posts: 493
Location: Wylatowo, Polska

PostPosted: Fri Sep 28, 2007 12:53 pm    Post subject: Reply with quote

I think you should try adding PORTAGE_NICENESS option to your /etc/make.conf - as mentioned before. Give it some positive value e.g. PORTAGE_NICENESS="10" - it will slow down a little compilation times on your machine, but it may help with the sound skipping.

And if it's no good for you I think you should try some newer linux kernel sources (2.6.23 or so) with newest CFS scheduler patch from Ingo Molnar http://people.redhat.com/mingo/cfs-scheduler/. I does fine job and it's getting better with every release.

And if you don't mind using some 2.6.22 kernel you should give a try -ck patch from Con Kolivas - http://members.optusnet.com.au/ckolivas/kernel/ or some *-sources which include it.
For a long time Con's patchset was the no.1. on the desktop interactivity (e.g.music) playground. But -ck is no more, alas.
_________________
linux-2.6.17 +ck +R4 +lockless +genetic-as +... więcej nie pamiętam :)
LRU #299256
Back to top
View user's profile Send private message
Grayman
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 186
Location: South Africa

PostPosted: Sat Oct 06, 2007 11:46 am    Post subject: Reply with quote

Hi

just wondering if you have dma turned on - your box is waaaay more powerful than mine (I have a 2.6 P4 with 768 megs ram) and I can run amarok very comfortably.

hdparm /devhda (where dev/hda is your hard drive - yup I have an ata drive here too... sob )

you would need to be root to run hdparm (and obviously to have it installed)

Grayman
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Mon Oct 08, 2007 11:27 am    Post subject: Reply with quote

wyvern5 wrote:
Try compiling xine-lib with mad support.
Solved a similar issue for me :-)
Back to top
View user's profile Send private message
iom
n00b
n00b


Joined: 21 Nov 2005
Posts: 19
Location: Ljubljana, Slovenia

PostPosted: Mon Oct 08, 2007 12:21 pm    Post subject: Reply with quote

i believe this is not a cpu-related problem but rather heavy disk usage. if you watch carefully, the problem you described should occur exactly when a package is being extracted to /var/tmp/portage/.... Try emerging firefox for instance and watch carefully when amarok stops performing well.

how to solve this i don't really know. maybe you don't have proper support in kernel for your hard disk controller. maybe hdparm could help.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Mon Oct 08, 2007 4:28 pm    Post subject: Reply with quote

I've recently realized that the lag is in the entire fluxbox.... Firefox is lagging too. Even the mouse cursor has lags. :( I think this topic should be in a different part of the forum.
Back to top
View user's profile Send private message
Grayman
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 186
Location: South Africa

PostPosted: Mon Oct 08, 2007 10:04 pm    Post subject: Reply with quote

Hello

did you check that dma is functional on your drive ? a jerky mouse when the system is under load sounds like a dma-dysfunctional system to me.

Grayman
Back to top
View user's profile Send private message
Archimedesmp
n00b
n00b


Joined: 31 May 2007
Posts: 14
Location: TU Kaiserslautern, Germany

PostPosted: Mon Oct 08, 2007 10:18 pm    Post subject: Reply with quote

Hi, if you post this somewhere else please post a link here as some kind of follow up ;)

I had no lag with Amarok with Kernel 2.6.20-forgot-rc and now I'm using 2.6.23-rc8-mm2 and believe me: Playing drums with that lag while portage compiles something is no fun at all :(
But I believe it is something with the kernel config as I didn't have any problems with my old kernel.

Oh, yeah, as this might be of interest (esp. if the kernel config is not optimal): I run an Asus A8Jp Notebook with C2D T7200@2x 2Ghz (4Mb) on an ICH7 Chipset and 1Gb of RAM... Disk is some SATA; hdparm -tT gives me 30 to 40 MB/sec, sometime only 20 (right after 40...)

I changed my config and don't have any problems recently, but I didn't listen much music while working.
The major thing I altered was disabling the "Preemt the Big Kernel Lock" because a friend told me that was only needed on old machines (well, I don't know if he is right with that, I'm just trying) and changed from "Preemptible Kernel (Low-Latency Desktop)" to "Voluntary Kernel Preemption (Desktop)" because I didn't want the kernel to preempt all the time (maybe this does the trick) - though I used both setting (PREEMPT and Low Latency) with the non-laggy 2.6.20 *confused*...
Neither compiling nor untaring current eclipse (138Mb) caused any lag with this config:
Code:
arcbook test # time tar xf eclipse-SDK-3.3-linux-gtk-x86_64.tar.gz

real    0m42.863s
user    0m3.860s
sys     0m1.960s


archi (on Gome 2.18.0)

//edit
I'm to slow, Grayman posted while I was still writing ^^
How can you find out wether dma on sata is turned on?
(I'm asking as I have the same problem)
_________________
Traffic lights are np-complete problems...
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Tue Oct 09, 2007 1:14 pm    Post subject: Reply with quote

Well... I have a SATA II disk. Ive made read checks with hdparm ant the results were:

Cached disk reads 2357 MB/sec
Buffered disk reads 3.78 MB/sec

So is that good or bad ?? :P


PS I thought dma is only an issue with ata disks.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Tue Oct 09, 2007 3:10 pm    Post subject: Reply with quote

Try compiling xine-lib with mad support, if not already done.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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 vote in polls in this forum