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 24th November 2017
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default Slow USB

I formatted a USB several months ago on OpenBSD. I can't remember what I did exactly, but I definitely selected the DOS version so I could use it on OpenBSD, Linux, and Windows. It worked well copying data from Linux to the USB as well as copying from the USB to OpenBSD, but writing from OpenBSD to the USB is slow. A file of 583045872 took around two hours.

So to my questions. Is it a problem with the USB? Its very old. It was meant to function as USB 2.0, but it only worked as USB 2.0 with the manufacturer's software installed and that was for Windows. So if the problem is the USB stick, can anyone recommend one I can buy that works well with OpenBSD?
Reply With Quote
  #2   (View Single Post)  
Old 25th November 2017
GarryR's Avatar
GarryR GarryR is online now
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 254
Default

Quote:
A file of 583045872 took around two hours.
Errr ?, Gb, Mb, or Kb, or other ? It takes me about 4 hours to write 500 gb, to a portable USB drive, using the 'dd' command, so depending on what 583,045,872 is, I would
say that 2 hours, sounds pretty fast.

USB sticks do wear out, and they do get slow when they are getting ready to fail.
Also a old, worn out usb port can be slow, or erratic.
__________________
My best friends are parrots
Reply With Quote
  #3   (View Single Post)  
Old 25th November 2017
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

OpenBSD reports it that way, so I assume its bytes, so the file is about ~500-600 Mb.

The USB is an old 8 GB. It reads fine on Linux, OpenBSD and Windows. Linux has repeatedly written >2GB files to the USB in about 5 or 10 mins.

The USB ports on my PC's case are USB 3.0 and the case is only a couple of years old. I also have no problems copying from my secondary drives to my main hard drive. I have not written to my secondary hard drives on the OpenBSD system, as I set them to read only.

I will try writing the same file from Linux to the USB and report back.
I will also try writing again using a different USB port.

Last edited by Prevet; 25th November 2017 at 03:28 AM.
Reply With Quote
  #4   (View Single Post)  
Old 25th November 2017
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 801
Default

Post deleted. I mis-read the size of the file. Sorry.

Last edited by IdOp; 25th November 2017 at 04:33 AM. Reason: brain fart
Reply With Quote
  #5   (View Single Post)  
Old 25th November 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Package Pilot
 
Join Date: Sep 2014
Posts: 199
Default

Quote:
Originally Posted by Prevet View Post
So to my questions. Is it a problem with the USB? Its very old
I doubt age is a factor. I have a fairly new Kingston DTSE9 16GB stick that has the same problem. Writing to it is excruciatingly slow. However, writing to my much older portable hard-drives is normal. And I have never formatted the Kingston. Perhaps some devices just don't play well with the system?
__________________
OpenBSD 6.3
Reply With Quote
  #6   (View Single Post)  
Old 25th November 2017
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

I tried writing the same files from the USB to Devuan and it completed the job in ~20 seconds. Writing from Devuan back to the USB was ~1 minute.

I tried the USB ports on the back and front of my OpenBSD machine and found it writes the same files to the USB stick at about 10 megabytes / minute = 1.4 megabits/second.

According to this https://www.diffen.com/difference/USB_1.0_vs_USB_2.0
USB should get 12 megabits/second. I really hope it isn't my motherboard, as there's not much I can do about that. I have a USB with a much smaller capacity, so I will try again with that.
Reply With Quote
  #7   (View Single Post)  
Old 25th November 2017
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

Quote:
Originally Posted by sacerdos_daemonis View Post
I doubt age is a factor. I have a fairly new Kingston DTSE9 16GB stick that has the same problem. Writing to it is excruciatingly slow. However, writing to my much older portable hard-drives is normal. And I have never formatted the Kingston. Perhaps some devices just don't play well with the system?
Could be. I found a 2010 article where they say USB is awful and shouldn't be trusted.

http://undeadly.org/cgi?action=artic...20100404103735
Reply With Quote
  #8   (View Single Post)  
Old 25th November 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 20
Default

Quote:
Originally Posted by sacerdos_daemonis View Post
I doubt age is a factor. I have a fairly new Kingston DTSE9 16GB stick that has the same problem. Writing to it is excruciatingly slow. However, writing to my much older portable hard-drives is normal. And I have never formatted the Kingston. Perhaps some devices just don't play well with the system?
Portable hard drives contain standard spinning disk or SSD drives, which have much faster read/write speeds than the Flash memory in a USB stick.

Age, as in how many times the Flash memory has been written to, can affect speed as the number of functioning memory cells decreases with repeated use (but that doesn't appear to be the problem the OP is experiencing).

Last edited by johnR; 25th November 2017 at 04:29 PM.
Reply With Quote
  #9   (View Single Post)  
Old 25th November 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 20
Default

Quote:
Originally Posted by Prevet View Post
I tried the USB ports on the back and front of my OpenBSD machine and found it writes the same files to the USB stick at about 10 megabytes / minute = 1.4 megabits/second.
How fast does it write to a USB stick that's formatted for FFS?
Reply With Quote
Old 25th November 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 20
Default

Quote:
Originally Posted by Prevet View Post
Could be. I found a 2010 article where they say USB is awful and shouldn't be trusted.

http://undeadly.org/cgi?action=artic...20100404103735
That article describes problems with cheap USB flash sticks, not USB itself.

Last edited by johnR; 25th November 2017 at 11:53 AM.
Reply With Quote
Old 25th November 2017
GarryR's Avatar
GarryR GarryR is online now
Real Name: Garry Ricketson
Spam Deminer
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 254
Default

Quote:
OpenBSD reports it that way, so I assume its bytes, so the file is about ~500-600 Mb.
You can use 'ls -slh 'check the file size, and it should report the size accurately:
Example:
Code:
# mount /dev/sd1i usb
# exit
$ cd usb
$ ls
----snip----
$ ls -slh w3m-0.5.3p3-image.tgz
1984 -rw-r--r--  1 garry  garry   990K Jul 27  2015 w3m-0.5.3p3-image.tgz
$
---------------
Code:
$ pwd
/home/garry/usb
$df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
---- snip ----
/dev/sd1i     14.5G    2.3G   12.3G    16%    /home/garry/usb
============= edited=================
I just now tried copying a 2 gb directory,with files, copied to a kingston 16gb "data stick", (usb stick).
About 10 min,... so yes, 2 hours to copy about ~500-600 Mb., seems very slow to me as well.
I think some more details on exactly how you are doing the copy procedure, .... ?
Also I noticed some thing interesting, I wanted to make a couple of screen shots,
but I forgot to cd , out of the usb dir, and back into my home dir, ... so when I made
the screen shots, I was still in the directory where the device is mounted, and the screen
shots got saved to the device, at that time, I noticed the estimated time , on the files I was copying , slowed way down, it showed a estimated time of 2 hours,
Hoping this makes sense, any way, if there are other tasks being done, or something else is keeping the device "busy", that could/does slow down the file copy operation considerably.
__________________
My best friends are parrots

Last edited by GarryR; 25th November 2017 at 02:45 PM.
Reply With Quote
Old 26th November 2017
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

Hey Garry,
I was using cp. While the first copy was going I watched videos on Youtube. When I did the later tests on the front and back ports, there was nothing else running except for a second console window, where I ran ls -l to see where the file copy was up to.

As per johnR's suggestion I will try formatting it to FFS and see if it makes a difference.
Reply With Quote
Old 5th December 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 20
Default

Just to add some info to this thread, I tried copying a couple of GB from OpenBSD to an ext2fs formatted USB stick (using cp). It was quite a bit slower than copying to the same stick from Linux on the same hardware.

After formatting the stick to FFS the copy speed was back up to what I'd normally expect. It appears that copying to a non-native file system is slow.
Reply With Quote
Old 29th March 2018
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

Quote:
Originally Posted by johnR View Post
Just to add some info to this thread, I tried copying a couple of GB from OpenBSD to an ext2fs formatted USB stick (using cp). It was quite a bit slower than copying to the same stick from Linux on the same hardware.

After formatting the stick to FFS the copy speed was back up to what I'd normally expect. It appears that copying to a non-native file system is slow.
Sorry for the very late reply.

Yes that is what I found. It copies from OpenBSD to non-native file systems at about 1 Mb per second even on hard drives. So I decided not to use the OpenBSD file system for long term storage of big files.
Reply With Quote
Old 29th March 2018
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 447
Default

Copying from FFS to FAT on the same HDD is also slow. It's better to use FFS as much as possible.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 30th March 2018
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

Quote:
Originally Posted by e1-531g View Post
Copying from FFS to FAT on the same HDD is also slow. It's better to use FFS as much as possible.
I have an external FAT backup drive and copying data from it to OpenBSD is quite fast. I still use Windows and am using Linux on another machine for a little while longer, so I need something they can all talk to.
Reply With Quote
Old 30th March 2018
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 447
Default

Quote:
Originally Posted by Prevet View Post
I have an external FAT backup drive and copying data from it to OpenBSD is quite fast. I still use Windows and am using Linux on another machine for a little while longer, so I need something they can all talk to.
On the same HDD i had different feel, but of course it is faster than pendrive.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 30th March 2018
Prevet Prevet is offline
Fdisk Soldier
 
Join Date: Oct 2017
Posts: 68
Default

Oops. I forgot that I am using NTFS with Fuse.
Reply With Quote
Reply

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
Slow ssh connect bryanlharris OpenBSD General 3 4th August 2017 12:04 AM
Slow SSH login flit OpenBSD General 3 16th May 2013 08:29 PM
Anonymous Ftp is too slow daemonfowl OpenBSD General 25 4th August 2012 12:50 AM
Does anyone know why Gnome is so slow on BSD? TerryP General software and network 11 27th August 2010 06:06 PM
slow io from hdd knasbas OpenBSD General 3 25th July 2009 02:51 AM


All times are GMT. The time now is 01:03 AM.


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