LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-04-2013, 12:33 PM   #1
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,411

Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Periodic sound "hiccups" for all applications


Hi,

I have an old NEC with a modest soundcard, and all apps with audio (Audacious, MPlayer, Flash videos, ...) suffer from periodic "hiccups".

The computer has sufficient RAM (4 GB), and I wonder what I can possibly do to solve this problem. Is there some magic kernel option I can use to solve the problem? If an eventual solution involves rebuilding the kernel, so be it.

Any suggestions?

Niki
 
Old 03-05-2013, 12:08 PM   #2
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14
Posts: 412

Rep: Reputation: 18
Quote:
Originally Posted by kikinovak View Post
Hi,

I have an old NEC with a modest soundcard, and all apps with audio (Audacious, MPlayer, Flash videos, ...) suffer from periodic "hiccups".

The computer has sufficient RAM (4 GB), and I wonder what I can possibly do to solve this problem. Is there some magic kernel option I can use to solve the problem? If an eventual solution involves rebuilding the kernel, so be it.

Any suggestions?

Niki
What exactly do you mean by "hiccups"? The condition known as "clipping" could be interpreted as a hiccup sound, and I believe that occurs when the frequency range of the sound exceeds the capacity of the reproducing equipment, like your sound card.
 
Old 03-05-2013, 12:56 PM   #3
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,411

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
I think the exact term is "jitter". A bit like a scratch on an old vinyl record. The sound suddenly jumps, and it's quite annoying.
 
Old 03-05-2013, 04:25 PM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
It's most likely buffer under-runs caused by either the CPU or disk being busy at exactly the point in time that the buffer needs to be filled. I used to get one of these stalls when the cron.daily scripts kicked off. Problem is, it's not so easy to fix as it could be any old process that is using CPU at the wrong time . You can run your audio program with a negative nice value, but that requires root permissions to set - which is a little inconvenient. Failing that you can try and reduce the priority of background processes by using a positive nice value on them and therefore increasing the relative priority of your audio programs indirectly, but that can be a bit of a pain to setup too.

Couple of other things you might want to try.
- The CONFIG_SCHED_AUTOGROUP kernel compile-time option
- Try using the deadline I/O scheduler rather than CFQ.


Unfortunately I don't think there's a one size fits all solution, it's going to take a little trial and error.
 
Old 03-08-2013, 12:12 PM   #5
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,411

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Quote:
Originally Posted by GazL View Post
Couple of other things you might want to try.
- The CONFIG_SCHED_AUTOGROUP kernel compile-time option
- Try using the deadline I/O scheduler rather than CFQ.
I gave that a try, rebuilt my kernel a few times with different options as suggested and watched it chugging away drinking a few cups of coffee. To no avail.

Then I tried Audacious > Edit > Preferences and reduced the buffer from 500 to 100 ms... and the hiccup disappeared.

The other apps? Oh well, a simple rebooting seemed to solve the problem.

Slackware users are stubborn, right?
 
Old 03-29-2013, 04:05 AM   #6
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,411

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Nah, the problem came back. Playing flash videos for example, I get regular "jumps" in video and sound.

Now I completely forgot something very specific about my install. My /home is on the local server (HP Proliant) and mounted via NFS. I tried to move a directory containing some music to the local /tmp folder, which seems to solve the hiccup problems.

Now there's another question: how can I have seamless audio and video over NFS? It's mounted with the following options:

Code:
nestor:/home on /home type nfs (rw,rsize=8192,wsize=8192,timeo=14,intr,addr=192.168.2.1)
 
Old 03-29-2013, 06:30 AM   #7
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 339

Rep: Reputation: 42
Quote:
Originally Posted by kikinovak View Post
I think the exact term is "jitter". A bit like a scratch on an old vinyl record. The sound suddenly jumps, and it's quite annoying.
Jitter is something else (jitter = variance of latency). What you describe is commonly referred to as sound skipping. [NB: scheduler latency can result in sound skipping, but it's the absolute value of latency that counts, not the jitter as such]

I can only advise to run a better kernel scheduler like BFS, and if necessary to change the scheduling group of your applications (sound applications up, compiler jobs down).

For all machines i'm responsible for I roll out a kernel containing the CK patch (which includes the cpu scheduler BFS) and BFQ (a better I/O scheduler). On a work laptop laptop I dual boot win 7, and the difference is striking: on win 7 sound skips under load, whereas my patched linux kernel does not show any sound issues.

http://ck-hack.blogspot.com/

http://www.algogroup.unimore.it/peop...lo/disk_sched/

http://slackbuilds.org/result/?search=schedtool&sv=14.0

Edit: just read your last post. network latencies are a different beast altogether...

Last edited by Martinus2u; 03-29-2013 at 06:33 AM.
 
Old 03-29-2013, 08:43 AM   #8
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 225

Rep: Reputation: 52
Back when reading up on for NFS (v3) tuning on a cluster setup, I looked into 5 areas that can be tweaked to improve performance:

(1) /etc/exports - using sync or async (If you want to mount with the same UID as on the host, then you have to use sync). Section 5.9
(2) Increasing the read buffer (rsize) in /etc/fstab. You have to experiment with this as the performance increase peaks at some app-dependent point. Section 5.1
(3) Using TCP instead of UDP, and, if your switch and network cards on both ends support it, using jumbo frames.
(4) Increasing the number of NFS daemons. I had to do this even for a relatively small 16 node cluster, but it probably won't help you much.
(5) Tweaking /proc/sys/net/core/rmem_default and /proc/sys/net/core/rmem_max. Here are some example values from my /etc/sysctl.conf for a node with 8 GB RAM:
Code:
net.core.rmem_default = 262144
net.core.rmem_max = 8388608
# default tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_rmem = 4096 131072 8388608
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically update "Applications" menu entries from /opt/local/share/applications nomadoro Linux - General 2 08-25-2012 07:26 AM
what is "m" in m:/home/localhost/www/d5605/periodic/cmd.php vickyk Linux - Newbie 2 03-19-2010 02:37 PM
No sound for applications "notifications" but sound works otherwise ?? xdunlapx Linux - General 2 11-06-2008 02:08 PM
System experiencing short "hiccups" / hangers FnordPerfect Linux - General 4 01-09-2007 11:08 AM
Does "ac97 & RH8" imply "buy a Sound Blaster Live"? nicktoop Linux - Hardware 3 02-13-2004 08:53 AM


All times are GMT -5. The time now is 07:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration