From: Eric Wong <normalperson@yhbt.net>
To: "Måns Rullgård" <mans@mansr.com>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: [PATCH] use posix_fadvise to increase readahead
Date: Thu, 13 Aug 2020 03:53:50 +0000 [thread overview]
Message-ID: <20200813035350.GA1144@dcvr> (raw)
In-Reply-To: <yw1x1rkctd8a.fsf@mansr.com>
Måns Rullgård <mans@mansr.com> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
>
> > Eric Wong <normalperson@yhbt.net> wrote:
> >> All relevant audio file formats store data sequentially, so
> >> give a hint to the kernel to perform more readahead. In current
> >> Linux, the readahead hint doubles readahead pages and can help
> >> with playback on slow devices.
> >
> > Btw, I've been running this for a few years, too; but pretty
> > much all on FLAC.
> >
> > I don't know if there's audio formats we support which aren't
> > sequential. Maybe there's some wacky audio format which
> > requires random read all over the place...
>
> I can't think of any format that isn't mostly sequential, certainly not
> that's supported in SoX. There might exist some format that separates
> channel data such that reading sequentially from multiple starting
> points is the best strategy.
Yeah, I was wondering about something along those lines,
especially if exceeding 2 channels...
> What sort of improvement do you get from this anyway? I'm not opposed
> to the addition, just curious.
I didn't measure before :x It's more of a "it couldn't hurt"
thing and let the kernel (and configured per-device readahead)
decide. It's only intended as a hint for the kernel, after all.
My 7200 RPM HDD has 256 MB cache on it; I couldn't measure any
difference even with 'echo 3 >/proc/sys/vm/drop_caches' (Linux)
and reading ~300 MB of stuff before testing in hopes it'd clear
the internal HDD cache. Maybe slower mounts (optical storage,
4200 RPM HDDs, or network FSes) will see the benefit.
I used to play audio on a laptop using an sshfs mount back in
the day (with FUSE readahead, too), but haven't had the need or
ability to do that for years, now.
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
next prev parent reply other threads:[~2020-08-13 3:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 1:10 [PATCH] use posix_fadvise to increase readahead Eric Wong
2020-08-12 6:28 ` Eric Wong
2020-08-12 9:39 ` Måns Rullgård
2020-08-13 3:53 ` Eric Wong [this message]
2020-08-13 11:32 ` Måns Rullgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200813035350.GA1144@dcvr \
--to=sox-devel@lists.sourceforge.net \
--cc=mans@mansr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).