This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Hyperthreaded Stability Hack

Tags: None
(comma "," separated)
frogstar_robot
Karma
0

Hyperthreaded Stability Hack

Tue Oct 18, 2005 2:29 am
I disliked having to disable hyperthreading for one app when all others were running well. I\'ve found a way to have most of my cake and eat it too. Make sure the schedutils are installed on your system. On Debian derivatives the following suffices:

apt-get install schedutils

In anycase the critical utility is \"taskset\". The following script is then used to cudgel Amarok into shape when hyperthreading is enabled.

#!/bin/bash

# This allows Amarok to be run with acceptable stability with HT enabled.

# Murder any pieces of Amarok from previous runs that didnt quit when told to.

killall -9 amarok
killall -9 amarokapp

# Force Amarok and all threads to run on Processor 0.

taskset 01 /usr/lib/amarok/amarokapp

# When were done, we WILL be done. There\'ll be no zombies hanging about here.

killall -9 amarok
killall -9 amarokapp

This has allowed consistent starting and running of Amarok for me. I crashes on me maybe twice a week now instead of banging on it to get it to start and then hoping it will stay running.
botio
Registered Member
Posts
4
Karma
0

Re:Hyperthreaded Stability Hack

Tue Oct 18, 2005 8:08 pm
that works great, thanks!
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re:Hyperthreaded Stability Hack

Wed Oct 19, 2005 10:52 am
Good news, everyone :)

Thanks to frogstar_robot\'s discovery with the taskset utility, I was able to trace the system calls this tools uses, and hacked a workaround for the HT issues into amaroK. It\'s now committed to SVN.

Please test :)

Post edited by: markey, at: 2005/10/20 12:52


--
Mark Kretschmann - Amarok Developer
busytoby
Karma
0

Re:Hyperthreaded Stability Hack

Thu Oct 20, 2005 2:46 pm
should this really be integrated into the source? wouldn\'t it be a better idea to use the wrapper hack until the problem is actually fixed.

I mean, considering that this applies to hyperthreading and dual-core processors as well and the world is moving in that direction, should anything be integrated into the source that will limit performance in the future? Correct me if I\'m wrong, but certainly there must be applications where sharing threads across CPUs would be beneficial?
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS

Re:Hyperthreaded Stability Hack

Thu Oct 20, 2005 3:21 pm
err, we only force amaroK on one virtual CPU when they are using Intel and HT.

And yes, things that make amaroK not crash all the time should be integrated into the source.

Post edited by: eean, at: 2005/10/20 11:22


Amarok Developer
Nife
Karma
0

Re:Hyperthreaded Stability Hack

Thu Oct 20, 2005 10:43 pm
yup this works for amd x2 dual core cpu\'s too thanks
niko
Karma
0

Re:Hyperthreaded Stability Hack

Sun Oct 23, 2005 12:44 am
since amarok 1.3 I havent had major hyperthreading issues - a few crashes but it was greatly improved after taglib 1.4 (I have a lot of embedded picture tags).

the new svn seems to be working perfectly for me so far though - no problems at all. will continue testing!
PSIplus
Karma
0

Re:Hyperthreaded Stability Hack

Sun Oct 23, 2005 11:17 pm
What\'s the reason for this behaviour? The Migration of the process between CPUs? ... (I realized the continous crashing of amarok after upgrading my pc from athlon 1000 to p4 3000 ... I actually hate ht, because it\'s just a mess (consuming lots of ram for nothing), but well... it\'s there... ;-) )


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]