...making Linux just a little more fun!
Ben Okopnik [ben at okopnik.com]
Hi, Hans-Peter -
On Mon, Feb 07, 2011 at 06:52:06PM -0500, hanspetersorge@aim.com wrote:
> Hi Ben, > > I just read the thread - no idea how to append..
Just send your message to The Answer Gang (tag@lists.linuxgazette.net), and we'll add it to the next issue. I've cc'd this response there, so it'll get used that way.
> My 2-cents: USB is being polled.
You're probably right - and very likely, it's getting polled very rapidly, given the task. I'm not sure what could be done about that - some kernel setting, perhaps?
> strace -p .... might give you some clues too.
The question is, what would I attach it to? 'rsync' wouldn't make a whole lot of sense, since it's not involved in USB polling.
Ben
-- OKOPNIK CONSULTING Custom Computing Solutions For Your Business Expert-led Training | Dynamic, vital websites | Custom programming 443-250-7895 http://okopnik.com http://twitter.com/okopnik
Mulyadi Santosa [mulyadi.santosa at gmail.com]
Hi Ben...
On Thu, Feb 10, 2011 at 20:47, Ben Okopnik <ben@okopnik.com> wrote:
> You're probably right - and very likely, it's getting polled very > rapidly, given the task. I'm not sure what could be done about that - > some kernel setting, perhaps?
Might be two things IMHO: 1. the kernel module itself...quite likely the "usb-storage". From modinfo, I think you need to thinker "delay_use" parameter during insmod/modprobe
2. your desktop environment setting...I am not sure which setting control the polling...I usually just rely to "powertop" and whenever it yields "turn on USB auto suspend", I simply agree and press the correspondent shortcut button.
If my assumption is wrong, feel free to adjust
>> strace -p .... =A0might give you some clues too. > > The question is, what would I attach it to? 'rsync' wouldn't make a > whole lot of sense, since it's not involved in USB polling.
in that sense, rsync might do poll by either calling poll() or the new epoll(). Blocking wait should use select() AFAIK. Not sure about futex()...it's kinda fast lock so it might fall into non blocking lock thus closer to polling characteristic IMHO.
Your call Ben...
-- =
regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com TAG mailing list TAG@lists.linuxgazette.net http://lists.linuxgazette.net/listinfo.cgi/tag-linuxgazette.net
Ben Okopnik [ben at okopnik.com]
[Please CC tag@lists.linuxgazette.net on these emails; that'll make things easier. Thanks!]
On Fri, Feb 11, 2011 at 10:43:00AM +0100, Hans-Peter Sorge wrote:
> Hi Ben, > > To reflect on "full back backup": Does it include /proc, /var and > /media/USB (the backup itself?
[laugh] I've been working with computers for quite a while now - getting onto 30 years - and that class of mistake isn't one I'm likely to make. I was backing up /home and /var/{mail,svn,www} - that's it.
Ben
-- OKOPNIK CONSULTING Custom Computing Solutions For Your Business Expert-led Training | Dynamic, vital websites | Custom programming 443-250-7895 http://okopnik.com http://twitter.com/okopnik
Ben Okopnik [ben at linuxgazette.net]
Hey, Mulyadi -
On Fri, Feb 11, 2011 at 12:33:14AM +0700, Mulyadi Santosa wrote:
> Hi Ben... > > On Thu, Feb 10, 2011 at 20:47, Ben Okopnik <ben@okopnik.com> wrote: > > You're probably right - and very likely, it's getting polled very > > rapidly, given the task. I'm not sure what could be done about that - > > some kernel setting, perhaps? > > Might be two things IMHO: > 1. the kernel module itself...quite likely the "usb-storage". From > modinfo, I think you need to thinker "delay_use" parameter during > insmod/modprobe
Ah. Great; didn't know about that one. Hmm, I wonder if running 'nice -n 12' or so with 'rsync' would improve things?
> 2. your desktop environment setting...I am not sure which setting > control the polling...I usually just rely to "powertop" and whenever > it yields "turn on USB auto suspend", I simply agree and press the > correspondent shortcut button.
Wow, I'm learning about all kinds of nifty gadgets from you. I'd never heard of 'powertop'. Cool - thanks!
According to powertop, 'ehci_hcd:usb1, uhci_hcd:usb2, ath, i915@pci:0000:00:02.0, HDA Intel' is one of the two top "causes for wakeups" (the only thing higher than that is tick_sched_timer.) That's definitely an eye-opener. The suggestion it gives - what a clever gadget! - is to increase the "VM dirty writeback" and to turn on USB auto suspend. Bingo! Did that.
> If my assumption is wrong, feel free to adjust > > >> strace -p .... might give you some clues too. > > > > The question is, what would I attach it to? 'rsync' wouldn't make a > > whole lot of sense, since it's not involved in USB polling. > > in that sense, rsync might do poll by either calling poll() or the > new epoll(). Blocking wait should use select() AFAIK. Not sure about > futex()...it's kinda fast lock so it might fall into non blocking lock > thus closer to polling characteristic IMHO.
OK - selecting just those in stracing rsync might make sense. I've just bought another backup drive (2TBs are getting cheap, woohoo!), so I'm going to get another chance to do all of this again very soon now.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Mulyadi Santosa [mulyadi.santosa at gmail.com]
Hi Ben
On Fri, Feb 11, 2011 at 19:39, Ben Okopnik <ben@linuxgazette.net> wrote:
> Wow, I'm learning about all kinds of nifty gadgets from you. I'd never > heard of 'powertop'. Cool - thanks!
Ok, let's say you owe me...so actually you owe really bunch of thanks to Arjan van de Ven @ Linux division of Intel corp AFAIK he single handedly created it, at least initially
My ruleof thumb so far: wanna lower power consumption? use powertop it's a monitoring + tweaker....
> According to powertop, 'ehci_hcd:usb1, uhci_hcd:usb2, ath, > i915@pci:0000:00:02.0, HDA Intel' is one of the two top "causes for > wakeups" (the only thing higher than that is tick_sched_timer.) That's > definitely an eye-opener.
ahem, so IMHO your system might be busy either: - checking something in USB - sending data or reading data to i915 Intel graphic card - or....you're probably currently playing a music
AFAIK, it's quite typical to see that kind of pattern...but one way or another...if some of them are on the same data bus, that might explain the situation of slower data transfer in rsync (crowded bus)
>The suggestion it gives - what a clever > gadget! - is to increase the "VM dirty writeback" and to turn on USB > auto suspend. Bingo! Did that.
Nice !
> OK - selecting just those in stracing rsync might make sense. I've just > bought another backup drive (2TBs are getting cheap, woohoo!), so I'm > going to get another chance to do all of this again very soon now.
Probably you need to try eSATA...?
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com TAG mailing list TAG@lists.linuxgazette.net http://lists.linuxgazette.net/listinfo.cgi/tag-linuxgazette.net