LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-17-2011, 03:07 PM   #1
wjtaylor
Member
 
Registered: Feb 2009
Posts: 78

Rep: Reputation: 15
Extremely slow write speed for SATA drive


Ubuntu 10.04

I have a Samsung F3R drive (SATA II) connected to my motherboard via a Kingwin hot swappable tray.

My current write speeds for extended sequential write are 40.4 Kbs/s! This was verified via a dd write from /dev/zero.

This drive is formatted with ext4.

I've narrowed it down to what I believe is the fstab options. Please give me your thoughts.

Code:
/dev/sde1	/backups	auto	noauto,user,noexec,rw,sync	0	0
Would the sync option cause such awful performance?


My trouble shooting that has led me to this point:

Poor performance with amanda backup: Test drive speed from shell
dd if=/dev/zero of=/backups/writetest bs=512 count=2000000 : ~40Kb/s
swap out drive (mounted explicitly to /mnt): write speed of 198Mb/s (same dd command)
replace original drive (mounted explicitly to /mnt): write speed of 128 Mb/s (same dd command)
mount the current (problematic) HDD via fstab options (listed above) i.e. "mount /backups": 40 Kb/s write speed (same dd command)

Thanks for your help,
WT
 
Old 06-17-2011, 03:20 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Are there any errors/informations in the /var/log/messages file?

Is SMART enabled? Do you have the ability to use the 'smartctl' program to do any testing? It can verify the drives integrity, performance, etc...
 
Old 06-17-2011, 03:22 PM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Yes, you are going in the write direction sync option is used when you want a command to immediately write the changes to disk. This option is good when you are dealing with floppy or usb drive in which you do not want the data write to take place afterwards.

When you issue a command to copy or move system caches it and write to the disk whenever it gets free time. If you use sync option it forces the system to write the changes to the disk immediately.

Use async instead of sync and then see how it goes.

Also is this happened recently or it is like that from the beginning. If it is from beginning I would also suggest checking SATA drive jumper setting.

Last edited by T3RM1NVT0R; 06-17-2011 at 03:23 PM.
 
Old 06-17-2011, 03:25 PM   #4
wjtaylor
Member
 
Registered: Feb 2009
Posts: 78

Original Poster
Rep: Reputation: 15
OK, after testing the async option in the fstab, write speed is: 111 Mb/s

So the question becomes, is there a way I can write synchronously to the hdd and have some reasonable performance?


While async is not a deal-breaker, it seems better to get the backups onto disk immediately, instead of waiting for a sync. I have no idea when the kernel syncs, so it may just be my ignorance.

WT
 
Old 06-17-2011, 04:36 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

I will give you an example:

If I issue cp command to copy some xyz file to USB then kernel keep that in cache and if you remove the USB without issuing umount command then that data might be lost but if you issue umount command before removing USB then kernel will first write data which is in cache to USB and then umount the device.

I hope this will make things clear.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sata disk write speed is very slow! eltonsky Debian 9 09-16-2010 06:07 AM
Extremely slow write on disk with high CPU usage aliojjati Linux - Newbie 1 09-04-2010 01:29 AM
Help - Extremely slow internet speed in etch manusmad Debian 6 04-17-2008 04:37 PM
NF7-S + Sata .... extremely slow speed... Ryanlee Linux - Hardware 1 11-02-2005 12:57 AM
Extremely slow burn speed with cdrecord SilentStrike Linux - Hardware 4 11-17-2002 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration