You are not logged in.

#1 2014-02-04 17:07:00

hippieben
Member
Registered: 2013-10-27
Posts: 218

High disk activity causes Clementine to "buffer"

I mean, it makes sense as another process is tying up the hard disk I/O, but I feel like there is probably a way to make these two process "share" the bandwidth better so my music can continue to play while I am moving oodles of data. 

Any ideas on how I may tweak this for a more enjoyable experience?  Thanks.

Offline

#2 2014-02-04 17:17:43

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: High disk activity causes Clementine to "buffer"

How about this: https://bbs.archlinux.org/viewtopic.php … 6#p1284016

As you can see in that thread, I thought that was a pretty neat idea so I put it in my ".bashrc" file. ...I haven't every actually used it since then, but I assume it works. tongue

Offline

#3 2014-02-04 19:11:18

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: High disk activity causes Clementine to "buffer"

drcouzelis wrote:

How about this: https://bbs.archlinux.org/viewtopic.php … 6#p1284016

As you can see in that thread, I thought that was a pretty neat idea so I put it in my ".bashrc" file. ...I haven't every actually used it since then, but I assume it works. tongue

I'm not too sure how this would solve my issue. I may just not be looking closely enough though.

Offline

#4 2014-02-04 19:24:17

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: High disk activity causes Clementine to "buffer"

All I know about your situation is that "another process is tying up the hard disk I/O", so before you run that "other process" in the command line (if it even IS run from the command line) use the "benice" command and it should.

...Or just use those command line programs that the "benice" command uses to modify whatever process that is "tying up the hard disk I/O".

...Or provide more information about what you're actually doing with your computer. tongue

EDIT: For the record, brebs suggested the same thing I suggested above. tongue

Last edited by drcouzelis (2014-02-05 13:05:31)

Offline

#5 2014-02-04 21:24:38

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: High disk activity causes Clementine to "buffer"

hippieben wrote:

moving oodles of data

Use the ionice command, e.g.:

For a music player, boost its priority because it's real-time, and music interruptions are annoying:

ionice -c2 -n0 nice -n -2 /usr/bin/cmus

Although, the above is with the user being allowed to set negative niceness.

You would initially just use:

ionice -c2 -n0 /usr/bin/cmus

And bonus points if you use ionice on your long copy (with nice too, because it's so easy, convenient and appropriate):

ionice -c3 nice mylongcopyprog

Offline

#6 2014-02-04 22:38:46

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: High disk activity causes Clementine to "buffer"

brebs wrote:
hippieben wrote:

moving oodles of data

Use the ionice command, e.g.:

For a music player, boost its priority because it's real-time, and music interruptions are annoying:

ionice -c2 -n0 nice -n -2 /usr/bin/cmus

Although, the above is with the user being allowed to set negative niceness.

You would initially just use:

ionice -c2 -n0 /usr/bin/cmus

And bonus points if you use ionice on your long copy (with nice too, because it's so easy, convenient and appropriate):

ionice -c3 nice mylongcopyprog

I'll give that a go.  Is there anyway to set it so clementine would default to a higher I/O priority rather than having to manually set it myself?

Offline

#7 2014-02-04 22:46:24

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: High disk activity causes Clementine to "buffer"

If you run clementine from the BASH prompt, add an alias in ~/.bashrc:

alias clementine="ionice -c2 -n0 /usr/bin/clementine"

If you use the GUI menu, edit /usr/share/applications/clementine.desktop (or whatever it is) and change the Exec line to e.g.:

Exec=ionice -c2 -n0 clementine %u

Or whatever. Basically just adding the ionice bit before the command. That %u is for parameter-passing, e.g. song filenames.

Offline

#8 2014-02-05 00:06:31

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: High disk activity causes Clementine to "buffer"

brebs wrote:

If you run clementine from the BASH prompt, add an alias in ~/.bashrc:

alias clementine="ionice -c2 -n0 /usr/bin/clementine"

If you use the GUI menu, edit /usr/share/applications/clementine.desktop (or whatever it is) and change the Exec line to e.g.:

Exec=ionice -c2 -n0 clementine %u

Or whatever. Basically just adding the ionice bit before the command. That %u is for parameter-passing, e.g. song filenames.

If I launch Clementine that way and check the priority with ksysguard it appears that the command increases the CPU priority.  However, what I am trying to do is to change the I/o scheduler to realtime and increase the priority.  I apologize, as I did not make this clear anywhere in my post.

Offline

#9 2014-02-05 09:03:12

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: High disk activity causes Clementine to "buffer"

Only root can set that (and it's all relative anyway - I don't believe you need it). Read "man ionice":

This scheduling class is not permitted for an ordinary (i.e., non-root) user.

By the way, it's pointless to be quoting my entire posts back at me, unless you're being sponsored by mouse manufacturers, to wear out people's scroll buttons wink

Last edited by brebs (2014-02-05 09:03:52)

Offline

#10 2014-02-05 23:56:26

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: High disk activity causes Clementine to "buffer"

brebs wrote:

I don't believe you need it

How else would you suggest I go about it then?  I don't think raising the CPU priority would do anything.

Offline

#11 2014-02-06 09:22:06

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: High disk activity causes Clementine to "buffer"

Do *what*? I just told you what you should be doing. What problem do you have?

There's other tweaks - e.g. /etc/sysctl.conf (to keep the cache size small):

vm.dirty_background_bytes=16777216
vm.dirty_bytes=50331648

Edit: Also a good idea:

vm.swappiness=0

Last edited by brebs (2014-02-06 09:32:43)

Offline

Board footer

Powered by FluxBB