Strange SATA performance

Zurar

Honorable
Mar 30, 2013
12
0
10,510
I've recently run into a strange performance loss after a faulty controller decided to take a dump on a couple of my storage drives. The weird part is, it seems to be unrelated to this "damage" to the drives as I've replaced them with brand new drives, a new motherboard, reloaded Windows 7 (64-bit of course), and loaded all the latest drivers, and yet I still have the issue with the undamaged drives.

To start, my old system spec were as follows:

Asus P8P67 Pro Rev 3.1 (Now thought to be damaged)
2x Plextor 128GB PX-128M3 (still undamaged)
2x Western Digital 500 GB WD500AAKS (now damaged; at least 1 anyway)
1x Samsung 400GB HD403LJ (still undamaged)
Intel Core i5 2400 3.1Ghz Quad-Core
4x 4GB Kingston HyperX DDR3 1600
1x MSI R6850 Cyclone PE Radeon HD 6850 1GB
1x Creative X-Fi Titanium PCIe 1x

I used the on-board lan and many of the USB ports, including the additional front-ports.

Anyway, the controller holding the WD and Samsung drives started randomly disconnecting just the WDs (even though the Samsung was on the same controller, it was on a different physical port "stack" (you know how 2 ports are stacked on top of each other); not sure if this even matters) then reconnecting them (sometimes a restart was required towards the end). I wasn't sure the cause of the disconnecting/reconnecting at the time, so I tried drivers and bios to no avail. After a while, when it started getting worse, I decided to reload Windows since I had a bunch of clutter to clean up anyway, and thought maybe there was some kind of corruption going on with the storage drivers for that controller (I was getting desperate and overlooking things).

Anyway, everything installed smoothly, but low and behold, the problem was still there. Unfortunately, after the reload and a couple more disconnects, one of the WD drives developed bad sectors and both kept disconnecting/reconnecting. Tried new SATA cables to no avail, so I disconnected them to prevent the other from succumbing to the same fate, ordered new parts, and installed all of the parts. The new parts are as follows:

MSI Z77A-GD65 motherboard
2x Seagate SV35 Series 1TB 7200 RPM SATA (to replace the WDs)
and I replace the video card with a GIGABYTE Radeon HD 7850 1GB for the hell of it.

Upon installing the new parts, I decided to go with another clean install on the SSD Raid 0 and everything installed smoothly again.

Here's the weird thing; the performance on the system PRIOR to all of this happening was incredible. Games and programs loaded on the SSDs opened in a flash; one game, notably, would load in about 5 seconds once you hit the "Play Game" button to actually enter the game (somehow got hooked on Civ V lately...). Upon reloading Windows (both pre and post-part replacement), the performance dropped by about 50% or more (seems random)! Civ V was now loading in about 10-15 sec rather than 5. In addition, transfer rates seemed unstable when copying large amounts of files (especially large files). Transferring files from the HDD-to-HDD/SSD, eHDD (USB3.0)-to-SDD/HDD, eSata-to-HDD/SSD, all have this following problem:

When transferring files, the transfer will often start strong (80-100MB/s+ for all the internals), then suddenly drop down to 10MB/s tops, but typically 7-8MB/s, after a random amount of time. After some additional testing on video files, it's even more random. I can sometimes transfer up to a 20GB folder of videos sustaining 60MB/s+ the entire time, other times I can't even transfer a 300MB single video without it slowing down. Even further testing found that, when copying a single video slowed down to that extent, if I waited a little while before transferring again (say 30-60 seconds), it would sometimes run at the expected speed and sometimes at the slower speed. Prior to all of this happening, I had no trouble maintaining 60MB/s+ transfer rates between drives at all times even if I copied the whole drive!

Anyway, I've run out of ideas and just want to get my system back to the performance I had prior to all of this. I do recall doing performance tweaks that supposedly boost SSD performance when I setup the original system, but can't for the life of me remember what they all were, and tweaks or not, the transfers should be more stable than they are now. Anyone have any ideas as to why I'm getting this unusual performance out of my system and how to fix it? Thanks in advance for any help!

Edit: Boy that was a lot longer than I though... anyway, forgot to mention, the whole cause of the problem is believed to be an extra motherboard riser that was shorting out the old board's one controller.
 
Solution
Stripe size performance can vary depending on a number of factors.
Like you summerized, stripes work by assigning data into a certain size block, and once it's full, writing a parallel (or identical) block on the next drive in the raid configuration.

For best performance, you want to be able to write the largest blocks that can be completely filled, rather than leaving half filled blocks. For example, if you're copying a bunch of small system files (let's say smaller than 32kb), then a stripe size of 64kb would be slower and less efficient than a 32kb stripe because you have a bunch of half-filled 64kb blocks that have to be written instead of full 32kb blocks. Since it takes longer to write a 64k block than a 32k block, your...

aramisathei

Honorable
Aug 25, 2012
303
0
10,810
Ignoring any differences between the motherboards, have you tried backing up and secure erasing your SSD?
Performance degrades over time, and sometimes they simply need to be flushed out.

The only real tweaking I can think of that would've have any real impact on performance is whether or not TRIM was enabled; if TRIM had/has been disabled, that would explain your performance loss.

Especially when ran in raid, since z77 only recently started supporting TRIM in raid, but usually needs to be enabled by a firmware patch to the mobo in order to do so.

What's the entire configuration of your drives/raid setups?
Please include which disks/raid configs are on which SATA ports too, if you don't mind.
 

Zurar

Honorable
Mar 30, 2013
12
0
10,510
Hey aramisathei, thanks for taking the time to take a look at my issue. I'll try to answer your questions as best as I can.

The SATA drive configuration is as follows:
Ports 1/2 are the 2 Plextor SSD drives set to Raid 0
Ports 3/4 are the 2 Seagate HDDs in standard mode
Port 5 is the Samsung HDD
Port 6 is connected to a case based eSata port
Port 7 is empty
Port 8 is my Blu-ray drive

Also, just in case you can't find the the manual online, the ports are configured as follows:
1-2 and 7-8 are 6GB/s Ports, 1-2 being Intel Z77 7-8 being Asmedia ASM 1061 controllers, while 3-6 are Intel Z77 3GB/s ports.

As for the Raid setup; the 2 Plextor SSDs are in a Raid0(Stripe) with 128KB Strip

The rest of the drives are run normally on the controller (ports 3-6 show up in the raid menu, so I'd assume they're on the same controller; sorry, newish to Raid, so only know the basics and the main dangers/benefits). Also, due to another issue I had when first setting up the board (the Lan didn't want to work right away) I flashed the bios to the latest version from MSI. Also, all drivers are the latest available versions from MSI. (Product overview page here with links to downloads).

Also, not sure how much it helps, but below is a snapshot of the Windows Disk Management screen (still confused as to why one of the Seagates is "active/primary" while the other is only "primary"):
drives.png


In addition, the IEEE 1394 port and onboard sound are disabled in bios (I never use the 1394 port an have a better quality dedicated sound card). Anyway, let me know if I missed anything you need or if you need any other info. And thanks again for taking the time!

Edit: Forgot to mention, but I didn't do a secure erase as far as any special software, but I did split the raid, boot to windows installer and partition/format them separately before rebuilding the raid and loading Windows.
 

aramisathei

Honorable
Aug 25, 2012
303
0
10,810
For SSDs, they need to be secure erased. Simply erasing/formatting/rebuilding doesn't clear the actual data from the disk--just sets it in another sector. This eventually gets resolved so long as Trim is in play, but if Trim isn't functional than this might be your issue. Something like PartedMagic can do this just fine.
http://partedmagic.com/

Additionally, you'll want to change your stripe to 64k unless you only work with huge files. 64k is generally the highest performing stripe block for every day operations/OS drives.
 

Zurar

Honorable
Mar 30, 2013
12
0
10,510


As you guessed, the SSDs are primarily used for the OS and every-day operations, but it does also hold some heavier duty programs as well as some games for fast load times. I do leave my system on 24/7 most of the time, so if my understanding of the stripe size is correct, wouldn't it be better to use a smaller stripe to spread smaller files across the drives more? I suppose that would depend on how the program/game I'm using is setup; but since these are SSDs, I would think the smaller stripes would be better since the drive's not reading a spinning platter, wouldn't it? There's obviously a lot more for me to learn about raids yet.

On another note, I did check into the TRIM function, and it is enabled, though the secure erase option sounds like a more immediate result. I'll take a look at that program you suggested. Thanks again for all your help so far!
 

aramisathei

Honorable
Aug 25, 2012
303
0
10,810
Stripe size performance can vary depending on a number of factors.
Like you summerized, stripes work by assigning data into a certain size block, and once it's full, writing a parallel (or identical) block on the next drive in the raid configuration.

For best performance, you want to be able to write the largest blocks that can be completely filled, rather than leaving half filled blocks. For example, if you're copying a bunch of small system files (let's say smaller than 32kb), then a stripe size of 64kb would be slower and less efficient than a 32kb stripe because you have a bunch of half-filled 64kb blocks that have to be written instead of full 32kb blocks. Since it takes longer to write a 64k block than a 32k block, your performance in this exercise will be slower with a 64k stripe.

However, say you have a 15mb install file you need to move, 64kb blocks work better than a 32kb stripe because only half as many blocks need to be written to write the entire 15mb worth of data.

Some people like smaller stripe sizes like 8-16kb since many systems files are pretty small and this can sort of improve responsiveness of the OS, but this sacrifices performance for anything involving a file larger than 16k (which is probably most of the system), so a good compromise has to be made.

From my personal tests, I found that a 64k stripe works best for my needs, and from what I've read it's a generally good configuration. Other stripes may end up suiting you better based on your habits, so you can use something like CrystalDiskMark to test and see what works for you.
 
Solution

Zurar

Honorable
Mar 30, 2013
12
0
10,510
Awesome, thanks for all the tips! I'll try a couple different stripe sizes and see what works best for me. I have a feeling it will be either 32 or 64 considering the programs I typically run on it. I'll be sure to mark one of your responses as the solution if it does solve my issue.
 

Zurar

Honorable
Mar 30, 2013
12
0
10,510
Interesting articles fzabkar. I love how they tip-toe around what exactly happens when someone encounters the issue though; choosing to not specify exactly what is happening to the hardware connected to those ports. The most they ever mention is "functional issues", but not what kind; though I recall the term "performance" being used in reference to the issue as well.

Thing is, my performance on that motherboard was superior to the performance I'm getting with the new board (at least until I had reloaded windows on the old one the first time), which just adds to the confusion. And based on the dates provided, mine should have been from a batch of boards with the fixed chips.

Anyway, I did locate the source the the problem in my case. I actually found it after some trouble with the on-board lan on my new board. With the new board, the on-board lan was showing up but not working, stating an error code 10 in the driver. I later found out this was due to an extra motherboard riser near the lan chipset shorting it out. After looking over my old motherboard, the SATA controller was in the same general area. Additionally, the problems with my old board only began after I moved my computer (it doesn't move very often), so the stress on the case from moving it was apparently just enough to allow that extra riser to make contact with the board where it wasn't previously.

Regardless, there was something I apparently did differently the first time I loaded windows that provided increased performance over what I'm getting now.

Still, I thank you for the articles fzabkar, as it gives a little more insight into past issues with the chip; and I'm not one to rule out the possibility of a bad chip somehow getting mixed into the batch of new chips (or me getting an old version of the motherboard that sat on a shelf forever), but I would still think it very unlikely.

Anyway, I'll be reloading the system when I get some time to, but right now I'm a bit busy with work, so it may have to wait until the weekend.
 

Zurar

Honorable
Mar 30, 2013
12
0
10,510
Well, the stripe size and secure erase seems to have helped a LOT with transferring files to the SSDs. I'm now getting over 100MB/s transfer rates to my SSD Raid from the other drives and the programs loaded on them now load like they used to! Thanks again for all the help aramisathei!