PINE64
Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: General Discussion on ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=86)
+--- Thread: Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? (/showthread.php?tid=5922)



Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? - oealias - 03-31-2018

Hi, so I have a USB drive im sharing through Samba.  The drive is encrypted with bitlocker and im using dislocker to decrypt it.  This problem does not occur with bitlocker disabled.

When I test file operations, speeds start at what I expect (~30 MB/s) but quickly drop down to ~3 MB/s.  

I was looking for some guidance on interpreting the result of htop.  This is what it looks like when this is happening:  

https://i.imgur.com/hFpfDpc.jpg

Two main questions around this -   

1.  According to the overview up top, im only using around half the total CPU capacity of my device.  
2.  Breaking it down by core, it looks like the 4th core is getting the most usage, at around ~85%.  But it's still not maxing it out, and how come that number isn't reflected up top?  


Based on this, can it be determined that the CPU load from dislocker is the bottleneck here?  When im not using it, SMB goes fine.


RE: Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? - xalius - 03-31-2018

Hi what image and kernel are you running? Maybe the crypto acceleration / ARMv8 crypto extensions are not used? What algorithm does bitlocker use?


RE: Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? - oealias - 03-31-2018

(03-31-2018, 04:10 PM)xalius Wrote: Hi what image and kernel are you running? Maybe the crypto acceleration / ARMv8 crypto extensions are not used? What algorithm does bitlocker use?

Hi, im using the following:


Quote:[email protected]:~$ uname -a
Linux rock64 4.4.77-rockchip-ayufan-136 #1 SMP Thu Oct 12 09:14:48 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux


I'm not 100% of the algorithm bitlocker uses but from the googling i've done, I believe it's 256-bit XTS-AES.  Is there another software I can use for encryption that would have hardware support?  Ideally it would be cross platform too.  


RE: Slow SMB transfers when sharing encrypted USB drive - is my CPU the bottleneck? - pfeerick - 04-01-2018

(03-31-2018, 04:24 PM)oealias Wrote: I'm not 100% of the algorithm bitlocker uses but from the googling i've done, I believe it's 256-bit XTS-AES.  Is there another software I can use for encryption that would have hardware support?  Ideally it would be cross platform too. 

Maybe have a look at Veracrypt - it's cross-platform and since it's the continuation of Truecrypt, there is probably plenty of documentation on how to get it working. 

From the screenshot, it does look like it's CPU intensive (to be expected since it's encrypted), but also not as intensive as I'd expect for it to be throwing the SMB speeds _that_ much... as your load average is still in the 1.x range... but then again SMB isn't that well behaved on linux anyway... so it's probably the issue still.