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 28th October 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default Softupdates and Softraid

I have made transfer tests to a Softraid RAID1 discipline, and write speed does not change much with or without softupdates enabled in my system. Is it an expected outcome from the Softraid overhead? Do I get enhanced data integrity from enabling Softupdates due to the ordered metadata?
Reply With Quote
  #2   (View Single Post)  
Old 28th October 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

RAID 1 is mirroring. In softraid(4), this is at least two drives. Write operations are sent to at least two drives.

Soft updates, mount option softdep, only provides asychnronous writes for filesystem metadata. All other write operations -- your data -- are done synchronously.

Soft updates are most effective when doing mass delete operations, which are metatdata write operations.
Reply With Quote
  #3   (View Single Post)  
Old 28th October 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

I understand.
Reply With Quote
  #4   (View Single Post)  
Old 31st October 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

What could mean to the performance of the RAID1 that the time spent in disk accesses (by systat) are very different (eg, sd0 = 0.4, sd1 = 1.0)? sd0 is a Samsung and sd1 is a Seagate purchased in 2009 and 2012.
Reply With Quote
  #5   (View Single Post)  
Old 31st October 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Without knowing any of the details of your environment: disk drive models, hardware configuration (e.g.: shared bus or separate buses), competing uses of the drives outside of RAID, the details of the array's configuration, and a complete I/O performance report ... I can only make guesses. Here are three of them:

Guess 1: Perhaps sd1 is being utilized for reads more often than sd0 is?
Guess 2: Perhaps you have active non-RAID partitions using sd1?
Guess 3: Perhaps there are significant performance differences between the two disk drives?

Your disk drive models and hardware configuration are in your dmesg(8). If you use either of these drives outside of the softraid(4) array, this should be clear from the drives' disklabel(8). There's a lot of information in the iostat view of systat(8):
Code:
     iostat      Display statistics about disk throughput.  Statistics on disk
                 throughput show, for each drive, data transferred in
                 kilobytes, number of disk transactions performed, and time
                 spent in disk accesses (in fractions of a second).
I hope this helps.
Reply With Quote
  #6   (View Single Post)  
Old 31st October 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

Curiously, in read operations, sd0 is doubles the time spent by sd1; however in write operations is the opposite: sd1 doubles or triples the time spent by sd0.

BTW, I see a 50% penalty in read performance compared to not using softraid raid1. I mean, each disk alone has about 120 MB/s (non part of sr raid1), but RAID1 has a maximum of about 60 MB/s, giving each about 30 MB/s.

Last edited by Martillo; 31st October 2013 at 03:35 PM.
Reply With Quote
  #7   (View Single Post)  
Old 31st October 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Without more information, I cannot make further comment.
Reply With Quote
  #8   (View Single Post)  
Old 31st October 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

Sorry, the read performance is about 100 MB/s using dd, with 50 MB/s each. The former 60 MB/s was surely interfered by qemu operations.

Do not worry jggimi, I will dig myself into the subject. In the end I am the one that has the keyboard attached to that machine and can experiment at will

P.S.: Yes, I *like* machines.
Reply With Quote
  #9   (View Single Post)  
Old 31st October 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
...using dd..
Even something as simple as that can have unexpected results, and this is why details are needed for any of us (not just me) to provide useful advice.

You may or may not be using a raw device with dd(1). You haven't stated. But you should, as block mode disk device nodes should not be used with dd on OpenBSD. They work, eventually, with significantly degraded performance.
Reply With Quote
Old 1st November 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

So I should not use something like this
Code:
dd if=/dev/zero of=cero bs=1m count=1024
being "cero" a filename?
Reply With Quote
Old 1st November 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

No that's fine. I meant a read or write test to the underlying softraid device with dd. Block devices (e.g. /dev/sd4c) should not be used with dd. Instead, use the raw device (e.g. /dev/rsd4c).

This gives me the opportunity to state this again, for the fourth time. Complete information from you would go a long way towards having me providing you with any useful advice.
Reply With Quote
Old 1st November 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

Sorry jggimi, I am in the process to upgrade to 5.4 (plus family duties). I am retaking the subject after the upgrade if you don't mind.
Reply With Quote
Old 7th November 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Martillo, there was a question about RAID1 I/O on the OpenBSD misc@ mailing list today, that was just answered by Joel Sing, one of the lead developers on softraid(4).

http://marc.info/?l=openbsd-misc&m=138383080931098&w=2
Reply With Quote
Old 7th November 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Default

Thanks jggimi. I suspect that being both sdX disks on the same controller (X58 / ICH10R), the read may be somehow "limited", but it shouldn't be so much, so I suspect on the drives.

Both drives have 1 TB, but from different brands. I have tested them under Softraid, Raidctl and ZFS, and under ZFS the Samsung always gives bursts and idles intermittently while the Seagate has a steady read throughput, so I suspect he Seagate is lagging the Samsung.

This leads me to the conclusion that in my specific case I get little benefit from RAID1. This machine is not a server, and I also have three different back up copies of my information in external USB and network devices, so no need for mirroring if it decreases my speed.
Reply With Quote
Old 7th November 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

There was some follow-on discussion on that thread. Constantine Murenin noted that write speed will be at the speed of the slowest drive. However, as you are using the same controller, your I/Os are in sequence. SATA may be faster than PATA, but unless I misunderstand the technology -- and I might -- only one data transfer at a time is possible on a single ATA bus.

Last edited by jggimi; 7th November 2013 at 06:50 PM. Reason: typo
Reply With Quote
Old 8th November 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 79
Post

I have done some testing:

Common data:
  • 1 TB
  • Configured as AHCI
  • 7,200 rpm
  • 512 bytes per sector
Commands to write & to read:
Code:
write: dd if=/dev/urandom of= alea bs=10m count=1024
read: dd if=alea of=/dev/null
disk0:
  • SAMSUNG HD103UJ
  • NetBSD FFS2
  • Write speed = 134 MB/s
  • Read speed = 166 MB/s
disk1:
  • SEAGATE ST31000524AS
  • FreeBSD UFS2 + Softupdates journaling
  • Write speed = 63 MB/s
  • Read speed = 116 MB/s
Note: the u in urandom means the two different forms used in each OS.

As we can see, the SAMSUNG disk performance surpasses the SEAGATE disk's one by factors of 2.1X (write) and 1.4X (read). Although they may work together, it is a waste for the faster to pair them. I also suspect that the slower suffers to keep up, so any kind of RAID with them is discarded.
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
Big problems 4.9->5.0 with softRAID delorean OpenBSD Installation and Upgrading 13 22nd February 2012 05:38 PM
RAIDframe -> Softraid jggimi OpenBSD General 12 3rd October 2011 12:16 AM
FreeBSD Journaling softupdates, SU+J Oliver_H News 5 12th December 2009 12:36 AM
softraid encryption Sunnz OpenBSD Security 6 24th September 2009 04:58 AM
SOFTRAID(4) revzalot OpenBSD Installation and Upgrading 3 27th July 2008 08:40 PM


All times are GMT. The time now is 02:57 AM.


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