DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd December 2018
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default slow flash drive write speed

I have a USB3-capable flash drive that holds a single 16GB fat32 partition. I need fat32 because this flash drive is used on OpenBSD, GNU/Linux, and also Windows (imposed at work). In the tests below I'm plugging this flash drive into the same USB2 port of my T400 ThinkPad.

When booted into my GNU/Linux partition, I can copy a 260 MB test file to this drive in 18 seconds.

When booted into my OpenBSD 6.4 partition, it takes 120 seconds to copy the same file to the drive.

I tried mounting the drive in OpenBSD with all of these commands, with similar results:
Code:
# mount /dev/sd1i /home/bruno/usb
# mount -o async /dev/sd1i /home/bruno/usb
# mount_msdos -u bruno -g bruno /dev/sd1i /home/bruno/usb
Surely OpenBSD must be capable of writing to a flash drive faster than 2.1 MB/sec, so the problem must be me. What am I doing wrong? I've been going around in circles and am not sure what else to try.

P.S. I also tried formatting the drive to ext3 (even though I can't keep it as ext3 for because of forced Windows at work) and got similar write speeds.
Reply With Quote
  #2   (View Single Post)  
Old 22nd December 2018
Prevet Prevet is offline
Shell Scout
 
Join Date: Oct 2017
Posts: 84
Default

120 seconds? Is that all? When I first came to OpenBSD I tried copying files to USB sticks. The first 40MB would be fine, but after that it slowed to a crawl, and would take hours to copy 1GB. Very frustrating. After that I just used the network to copy files between different file systems.

OpenBSD doesn't have the resources of Linux, where big megacorps have their fingers in it. A small number of people work on it, it is security focused, and is designed to be a server. So if you transfer files the way it was designed to, you won't have any problems. If your issue Isn't resolved in this thread then copy the files to a second Win or Linux machine, and copy them to OpenBSD over the network. But 120 seconds isn't worth it.
Reply With Quote
  #3   (View Single Post)  
Old 23rd December 2018
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Your speeds seem pretty normal (for OpenBSD), I dare say.
Code:
 time cp test.img /mnt/                                           
    2m11.16s real     0m00.00s user     0m01.84s system
That's a 260M image file of random data copied to a FAT32 formatted (newfs_msdos(8)) USB stick attached to a USB 2.0 capable controller on my ten year old laptop. Took 131.16 seconds to copy. You'll just have to live with it.
Reply With Quote
  #4   (View Single Post)  
Old 23rd December 2018
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you very much, Prevet and fvgit. I assumed there was a problem with either my system or with my understanding, so you just saved me hours of troubleshooting and chasing my tail on this.

If this is part of the price to pay in order to use a secure and elegant system that is put together by scrupulous developers who are in no way beholden to megacorps, count me in!

Thanks again for confirming that this is normal for OpenBSD.
Reply With Quote
  #5   (View Single Post)  
Old 23rd December 2018
hermano hermano is offline
Port Guard
 
Join Date: Mar 2017
Posts: 18
Default

Ayup - I can also confirm that OpenBSD writing to a USB widget is about 5 times slower than other systems. Why this is, I haven't the foggiest.
Reply With Quote
  #6   (View Single Post)  
Old 23rd December 2018
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Quote:
Originally Posted by hermano View Post
I can also confirm that OpenBSD writing to a USB widget is about 5 times slower than other systems.
On some devices yes, but on others no. I have a new 16GB flashdrive and two 500GB external hard-drives that are both several years old. OpenBSD writes to them significantly quicker than the Windows system in the office downstairs. Windows on computers in the teaching building write to those devices at about the same speed as my OpenBSD. A flashdrive I threw away worked normally on Windows but OpenBSD took forever to write to it. Five to ten minutes to write 100MB! I do not know if my experience typical, but I have found that different devices react differently to the system.
Reply With Quote
Reply

Tags
drive, flash, speed, usb, write

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which filesystem should I use for USB flash drive ? bsd007 OpenBSD General 16 15th October 2018 06:59 PM
formatting USB Flash Drive amphibious OpenBSD Installation and Upgrading 4 20th April 2017 01:49 AM
Creating USB flash drive drive image from FreeBSD disc1.iso FBSD Guides 1 10th February 2010 04:42 PM
Backup to USB flash drive giga FreeBSD General 5 8th December 2008 11:06 PM
USB flash drive criglerj NetBSD General 1 26th July 2008 01:25 AM


All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick