LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-05-2012, 10:57 AM   #1
chudux
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Rep: Reputation: Disabled
Very slow writes on software RAID1


Hello everyone,
I'm somewhere between a linux noob and novice. So please don't assume I've covered all my bases.
I've got Ubuntu server 11.04 on a micro SD in a USB reader as the HD. My storage is a software RAID1 set consisting of two Samsung F4EG HD155UI 1.5GB dries. My read speed is fine, but my write speed is less than 1Mbps. What should I do?

Thanks!
 
Old 06-06-2012, 01:27 PM   #2
chudux
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
OK...It may be an issue with the 4K sectors: http://www.sfnomad.com/?p=68

Could this be causing normal reads but very slow writes?
 
Old 06-07-2012, 08:06 AM   #3
iSpaZZZ^
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by chudux View Post
OK...It may be an issue with the 4K sectors: http://www.sfnomad.com/?p=68

Could this be causing normal reads but very slow writes?

It's unlikely to make a huge difference in most circumstances, I believe that it's only certain usage scenarios that you could notice the sector size making a large difference (lot's of tiny writes. It will not make a performance difference unless in a particular performance sensitive scenario.

check how the RAID is mounted. What are the switches in /etc/fstab ?
 
Old 06-07-2012, 09:43 AM   #4
chudux
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Here's what I found:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sdc1 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdc5 during installation
UUID=xxxx none swap sw 0 0
/dev/md0 /mnt/RAID1 ext4 grpid,nosuid,sync,noexec,nodev 0 0
~

FYI...I'm using Webmin for management.

Thanks!
 
Old 06-09-2012, 11:39 AM   #5
iSpaZZZ^
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
ouch @ webmin.

You will certainly gain a great deal if you wish to learn about linux, by using the commandline.

yes by the looks of it you have the raid set mounted as synchronous. I suggest you at least try changing the 'sync' to 'async' you might also just want to try changing 'grpid,nosuid,sync,noexec,nodev' to 'defaults'

i think this may be the problem, if not you can always revert. Let me know how it goes.
 
Old 06-12-2012, 03:01 PM   #6
vaccinemedia
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
I have the same issue. New server with 1&1. Dedicated, 12GB RAM, Quad Core Xeon, 1TB HD in Raid 1

I first noticed when a simple stock update on an commerce website was taking 14 mins compared to 30 seconds on my local VM. Running sql-bench takes forever and the wait is at 100% when running it.

Here's atop when running sql-bench run-al-tests (may have to copy and paste into a text editor using courier as the font):


PRC | sys 0.08s | | user 0.04s | | | | | #proc 167 | | #zombie 0 | | clones 0 | | | | | #exit 0 |
CPU | sys 10 | | user 0% | | irq 0% | | | | idle 304% | | wait 95% | | | | steal 0% | | guest 0% |
cpu | sys 0% | | user 0% | | irq 0% | | | | idle 98% | | cpu001 w 2% | | | | steal 0% | | guest 0% |
cpu | sys 0% | | user 0% | | irq 0% | | | | idle 7% | | cpu000 w 93% | | | | steal 0% | | guest 0% |
cpu | sys 0% | | user 0% | | irq 0% | | | | idle 100% | | cpu002 w 0% | | | | steal 0% | | guest 0% |
CPL | avg1 2.181 | | avg5 2.11 | | | avg15 2.02 | | | | csw 2738 | | intr 1541 | | | | | numcpu 4 |
MEM | tot 11.6G | | free 10.3G | | cache 149.0M | dirty 0.7M | | buff 129.0M | | slab 56.6M | | | | | | | |
SWP | tot 3.7G | | free 3.7G | | | | | | | | | | | | vmcom 4.8G | | vmlim 9.5G |
LVM | vg00-var | | busy 100% | | read 0 | write 644 | | KiB/r 0 | | KiB/w 4 | | MBr/s 0.00 | MBw/s 0.25 | | avq 1.11 | | avio 15.5 ms |
MDD | md3 | | busy 0% | | read 0 | write 712 | | KiB/r 0 | | KiB/w 3 | | MBr/s 0.00 | MBw/s 0.25 | | avq 0.00 | | avio 0.00 ms |
DSK | sda | | busy 64% | | read 0 | write 295 | | KiB/r 0 | | KiB/w 8 | | MBr/s 0.00 | MBw/s 0.25 | | avq 1.10 | | avio 21.8 ms |
DSK | sdb | | busy 63% | | read 0 | write 302 | | KiB/r 0 | | KiB/w 8 | | MBr/s 0.00 | MBw/s 0.25 | | avq 1.09 | | avio 20.8 ms |
NET | transport | tcpi 7 | | tcpo 7 | udpi 0 | | udpo 0 | tcpao 0 | | tcppo 0 | tcprs 0 | | tcpie 0 | tcpor 0 | | udpnp 0 | udpip 0 |
NET | network | | ipi 7 | | ipo 7 | ipfrw 0 | | deliv 7 | | | | | | | icmpi 0 | | icmpo 0 |
NET | eth0 0% | | pcki 76 | pcko 7 | | si 0 Kbps | so 2 Kbps | | coll 0 | | mlti 0 | erri 0 | | erro 0 | drpi 0 | | drpo 0 |
|
PID RUID EUID THR SYSCPU USRCPU VGROW RGROW RDDSK WRDSK ST EXC S CPUNR CPU CMD 1/1
2104 root root 1 0.03s 0.021 0K 0K 0K 0K -- - S 1 0% htop
2061 mysql mysql 8 0.01s 0.011 0K 0K 0K 560K -- - S 0 0% mysqld
2119 root root 1 0.01s 0.01s 0K 0K 0K 0K -- - R 1 0% atop
34 root root 1 0.01s 0.00s 0K 0K 0K 0K -- - S 0 0% kblockd/0
373 root root 1 0.01s 0.00s 0K 0K 0K 0K -- - S 1 0% md3_raid1
826 root root 1 0.01s 0.00s 0K 0K 0K 152K -- - D 0 0% jbd2/dm-1-8
1418 postfix postfix 1 0.00s 0.00s 0K 0K 0K 0K -- - S 0 0% qmgr
1405 root root 1 0.00s 0.00s 0K 0K 0K 0K -- - S 2 0% master

Also here's the fstab:

/dev/md1 / ext3 defaults 1 1
/dev/sda2 none swap sw
/dev/sdb2 none swap sw
/dev/vg00/usr /usr ext4 defaults 0 2
/dev/vg00/var /var ext4 defaults,usrquota 0 2
/dev/vg00/home /home ext4 defaults,usrquota 0 2
devpts /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /tmp tmpfs defaults 0 0

Last edited by vaccinemedia; 06-12-2012 at 03:02 PM. Reason: additions and clarifications
 
Old 06-14-2012, 09:47 AM   #7
chudux
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
iSpaZZZ^,
Setting the RAID mount to defaults did the trick!
Thank you very much!
 
Old 06-20-2012, 02:49 PM   #8
chudux
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
What's the best way to get my RAID1 drive set to go to sleep. I have done this before with hdparm, but I'm not able to figure it out now. Any advise?

Thanks!
 
  


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
Why Do I Have Slow NFS Writes from Client to Server? distortedstar Linux - Server 5 11-19-2009 10:36 AM
Have software raid1, but like to change to raid1+0 or 0+1, how? spaceuser Debian 8 03-17-2008 02:07 PM
Slow writes and reads to my raid array abefroman Linux - Hardware 1 12-20-2005 01:47 AM
Slow writes in software raid 1+0 (Fedora Core 3) spencerkellis Linux - Hardware 0 09-23-2005 01:11 AM
freeBSD 4.9 SLOW writes to disk dkc_ace *BSD 1 08-04-2005 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:47 PM.

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