Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB3 HD latency high?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Wed Sep 25, 2013 5:18 pm    Post subject: USB3 HD latency high? Reply with quote

The mpd client cantata is very laggy when scrolling through album art which is stored on my USB3 hard drive. If I unmount the drive, scrolling is very fast as it uses cached images at that point. I filed a cantata bug and the author says no one else has complained about this and there must be a problem with my hard drive setup. Can I test the drive's latency or something?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Wed Sep 25, 2013 5:23 pm    Post subject: Reply with quote

You should be able to use the normal tests on a USB3 HDD, not any different than USB2 except speed. You can try hdparm -t on it just like any other hard drive, to see how it does for sequential reads. See if there are any messages showing up in dmesg.

At one point I had an SSD on USB3 and it was not a problem at all. Getting 170+ MB/sec through USB3. The SSD is now on a 6Gbps SATA port so it's not likely to see USB3 again.

USB3 however is still under development and who knows what shows up from time to time.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Sep 26, 2013 7:29 am    Post subject: Reply with quote

Is this OK?

# hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 218 MB in 3.00 seconds = 72.62 MB/sec

Is that a good benchmark to diagnose the type of problem I described?
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Sep 26, 2013 8:08 am    Post subject: Reply with quote

it is good read speed if your drive is not a SSD. With my Seagate FreeAgent I have 73.22 Mb/sec.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Sep 26, 2013 10:05 am    Post subject: Reply with quote

Can I run a test specifically for latency instead of throughput?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Thu Sep 26, 2013 12:34 pm    Post subject: Reply with quote

You can try bonnie++ or iozone to check out iops, etc.

I haven't seen too many cases where hdparm shows up fairly good and iops isn't already as high as it could be for a specific hardware without a kernel fix, but I could be wrong.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Thu Sep 26, 2013 5:09 pm    Post subject: Reply with quote

Wait a minute...

If you do hdparm over and over again on your USB3 drive while scrolling through album art that's *not* stored on that USB3 drive, how bad is it?

Perhaps your USB3 controller is not doing DMA properly?

Does it work better when you hooked up to a USB2 port?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Sep 26, 2013 7:02 pm    Post subject: Reply with quote

I checked it on a USB2 port and unfortunately it's no better.

I scrolled through the album art that is already cached and it's fast, even if I run the hdparm test on the drive while I'm scrolling. As soon as I get to the uncached art, it becomes very laggy again.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Fri Sep 27, 2013 4:31 pm    Post subject: Reply with quote

The cantata author added a couple directives that completely fixed this. For anyone else having this problem, add the following to the [Global] or [General] section of ~/.config/cantata/cantata.conf or ~/.kde/share/config/cantatarc:

maxCoverFindPerIteration=0
maxCoverUpdatePerIteration=1

*Highly* recommended mpd client.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Fri Sep 27, 2013 6:49 pm    Post subject: Reply with quote

This is very weird. USB HDDs shouldn't be that slow to cause UI slowdown...
Bleh, crappy software...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum