Ordering an SSD, 2 questions (MTBF, Performance). Thanks!

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@dmoney1980

I only got this disk to try and improve my hibernation/resume experience. Putting / on there was a side effect of getting a 60GB disk to be honest. As for wear and tear there is just so much floating around about it, the only way I can really find out is to just use it exactly as intended.

@alaricljs

I am not sweating this too much at the moment as I got some really good speed going *but* I want to listen to you as best I can here. I can do this again if it means getting it right (the first time) :) I'll post the -l and -lu again on fdisk.

$ sudo fdisk -l /dev/sda

Code:
Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002ff11

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2        5732    46034257+  83  Linux
/dev/sda2            5733        7297    12570862+  82  Linux swap / Solaris

$ sudo fdisk -lu /dev/sda

Code:
Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002ff11

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *       16065    92084579    46034257+  83  Linux
/dev/sda2        92084580   117226304    12570862+  82  Linux swap / Solaris

I followed this http://www.ocztechnologyforum.com/f...Tips-tweaks-and-alignment&p=373226#post373226 but trying to figure out the second partition was a *b%&#. I just don't know how to figure it out exactly and then confirm before committing to it that I got it right.

If you know of a layman guide to doing the alignment I will send you an e-cookie. Thank you for your time, I appreciate every bit of it sincerely!
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
Ok, the second output is right... it's showing you sector assignments as you can see by the Units= line. By that it looks like things are not aligned.

My layman's guide for 2 partitions in linux is dead easy. Go into fdisk and make sure that your working in sectors. The u command in fdisk will switch back and forth, sectors should be the default but I don't know how old your fdisk is.

Create your first partition starting it at sector 2048 and give it a +??GB for whatever size it is you want presumably +48GB since 60-12 is 48 ;) Make sure you specify the GB not just G since you want the base 10 Gig not the base 2. Now you display your partition table and check the "End" of your partition. You want "End"+1 to divide evenly by 2048. If it doesn't, you take the result of that division and drop the remainder and multiply by 2048 then subtract 1.

So: +48GB gives me an "End" of 93752047. + 1 = 93752048 / 2048 = 45777.36... Drop the remainder and get 45777 * 2048 = 93751296 and -1 = 93751295

Delete your partition, and create it again starting at Sector 2048 and ending at that number you calculated = 93751295

Create the 2nd partition accepting the default starting sector 93751296 and accept the default ending sector which should be the end of the disk 117231408

You now have 2 aligned partitions. You can of course make it all the way to 8 partitions using the same basic method.

And this is what it looks like:
Code:
Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4711d693

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    93751295    46874624   83  Linux
/dev/sda2        93751296   117231407    11740056   83  Linux
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
I don't see a way to get cached reads from my hdparm... but here's my disk:

Code:
/dev/sda:
 Timing buffered disk reads:  694 MB in  3.01 seconds = 230.93 MB/sec

/dev/sda1:
 Timing buffered disk reads:   98 MB in  0.42 seconds = 235.39 MB/sec

/dev/sda2:
 Timing buffered disk reads:  690 MB in  3.00 seconds = 229.95 MB/sec

/dev/sda3:
 Timing buffered disk reads:  778 MB in  3.00 seconds = 259.02 MB/sec

/dev/sda4:
 Timing buffered disk reads:  548 MB in  3.00 seconds = 182.65 MB/sec

No idea what's up with sda4 but that's my LVM dg with several VMs on it. It's also my largest partition.

This is attached to a 4port SiI3124 PCI-X 133Mhz SATA controller on a SuperMicro PDSME+ with a Q6600 and 6GB of RAM.
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@alaricljs

Something about your guide is absolutely amazing. Here is what I mean. Following your formula for the first partition works out exactly the way you describe. But I got some questions. I hope their basic but if I got this correct you are a god. I mean this, cause you've really cleared up a lot of fog here.

first question.
When you do the -1 and +1 trick on a partition, the reason you take away 1 from the ending sector is *because* the next partition *starts* in the right alignment correct? So it's not about how it ends *but* about how and where the next partitions alignment begins. In other words, the next partition should start at a number divisible by 2048?

2nd question.
If I plan on making more partitions, the number they start on must be divisible by 2048. I assume, I must follow the same formula of -1 and +1 *if* I plan on adding more partitions to the disk. This is sort of obvious but I want to confirm it.

last question.
When dealing with the last partition of the disk. Is it OK for it to completely consume the rest of the disk or should I somehow work up a formula to end all partitions?

I am right now experimenting in a virtual machine and I think I got your formula down packed. If I am correct you are the man of men for helping me out here. I didn't really expect it. Thank you!
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
You have it exactly, it's where the partitions start that matters and hence the +1/-1. As for ending the last partition in a particular spot, it doesn't matter. Worse case scenario the last block doesn't add up to 4k and actually using that block will be unlikely.

Glad I could help.
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@alaricljs

I followed your guide as best I could in a virtual machine *before* I attempt to do this on the disk and some issues are popping up. I am not certain what in the world is happening. When using fdisk -lu, there is no overlapping but fdisk -l says different.

Code:
Disk /dev/sdb: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x005e05be
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    93751295    46874624   83  Linux
/dev/sdb2        93751296   101560319     3904512   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/sdb3       101560320   109369343     3904512   83  Linux
Partition 3 does not end on cylinder boundary.
/dev/sdb4       109369344   117178367     3904512   83  Linux
Partition 4 does not end on cylinder boundary.

I double checked every start and each is divisible by 2048 evenly. Each one starts 1 after the partition preceding it ends. I believe the fdisk -l may explain why

Code:
Disk /dev/sdb: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x005e05be
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        5836    46874624   83  Linux
/dev/sdb2            5836        6322     3904512   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/sdb3            6322        6808     3904512   83  Linux
Partition 3 does not end on cylinder boundary.
/dev/sdb4            6808        7295     3904512   83  Linux
Partition 4 does not end on cylinder boundary.

The first partition I believe is 44GB and 2,3 and 4 are 4GB each. I could have sworn I followed your solution to the T. What do you think the issue is? I am using fdisk (util-linux-ng 2.17.2).
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
Well, let's start with cylinder boundaries meaning nothing when it comes to SSDs and next to nothing on HDDs. fdisk 2.18 doesn't say anything about cylinder boundaries no matter how you mangle it.

It appears that you used 44G which is 44GiB or 46.8GB. using G with fdisk gives you base 2 Gigs, using GB gives you base 10 Gigs. Your 60G drive is a 60GB drive (base 10) so you can safely/easily divide 60GB into however many parts and always use the whole disk if you specify all sizes for fdisk as GB.

So all in all you aligned everything just fine and the warning means nothing.
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
Brother, I did this for so long it ain't funny. If I follow your steps exactly *but* call fdisk like so fdisk -cu /dev/sda I get all these notices. **but** if I simply call fdisk -like this fdisk -u /dev/sda and follow your directions again to the letter, I size everything up exactly as before but get no warnings.

It turns out, fdisk -cu and following your directions results in warnings. They're always printed in fdisk -lu. Calling it just fdisk -u and following your directions results in no warnings. I kept passing the -c parameter because fdisk always mentioned this on start up

Code:
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').

Well, forget about that -c flag for now. Leaving it off and following your formula works very well. I may have come up with another formula though that may be simpler, are you interested in discussing it maybe tomorrow?

Thank you again very much. You were right from the start. Fdisk just toyed with me in the end. Thanks again!
 

wpcoe

Senior member
Nov 13, 2007
586
2
81
... so if your using an SSD, you should have disable hibernate (which everybody says you should do)...
Oh, my. Something else I'm doing wrong. I've got hibernate enabled. Only problem is that when coming out of hibernation, sometimes my spinning HDD's are no long found. (I have an SSD boot drive, a 1.0TB WD HDD, and a .5TB WD HDD.)

Where is a good discussion about disabling hibernation on SSDs?
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@alaricljs

I think I did it all thanks to you and that formula. I hope I got it right this time. Check it out, what do you think?

sudo hdparm -tT /dev/sda*
Code:
/dev/sda:
 Timing cached reads:   7740 MB in  2.00 seconds = 3870.92 MB/sec
 Timing buffered disk reads:  638 MB in  3.00 seconds = 212.32 MB/sec

/dev/sda1:
 Timing cached reads:   7784 MB in  2.00 seconds = 3893.47 MB/sec
 Timing buffered disk reads:  640 MB in  3.00 seconds = 213.08 MB/sec

/dev/sda2:
 Timing cached reads:   7734 MB in  2.00 seconds = 3868.32 MB/sec
 Timing buffered disk reads:  612 MB in  3.01 seconds = 203.50 MB/sec

sudo fdisk -lu /dev/sda
Code:
Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002ff11

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    25167871    12582912   82  Linux swap / Solaris
/dev/sda2   *    25167872   117231407    46031768   83  Linux
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
Oh, my. Something else I'm doing wrong. I've got hibernate enabled. Only problem is that when coming out of hibernation, sometimes my spinning HDD's are no long found. (I have an SSD boot drive, a 1.0TB WD HDD, and a .5TB WD HDD.)

Where is a good discussion about disabling hibernation on SSDs?

Personally I will not in any way really listen to this. I didn't get a pickup truck so not to pick stuff up or an off-road vehicle to stay on the road. I got a fast drive so everything that goes on a drive is fast. Period. If OCZ didn't want me to use the drive for hibernation (which is blazing) they should have warned me about it upfront. Otherwise I personally did not get the Vertex 2 to pamper it and only somewhat use it.

I'd suggest you just use the drive.
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
The biggest problem with fdisk and most common distros is that fdisk is changing pretty quickly to keep up with the changing technology and traditional distros can't keep re-packaging a new version. Yours is from March of this year which isn't "old" but in comparison to the newest version which is only 3 months newer (June) the changes are pretty big making all the defaults pretty much the opposite of what they've been for a long time.

I think the performance speaks for its self, but the math also says you have them aligned just fine.


Good job.
 
Last edited:

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@alaricljs

I just gotta say thank you! Again! Really, I appreciate your time, insight and demystifying wisdom. It's all been very much appreciated. I'd be unaligned without you :)
 

poohbear

Platinum Member
Mar 11, 2003
2,284
5
81
why would u use hibernate on an SSD? a sandforce drive has a random access time of .1 ms vs 8 ms for the fastest 7200 rpm drives, its totally unnecessary. it loads everything ridiculously fast in the first place, hibernate was meant for mechanical drives which are much slower.
 

FishAk

Senior member
Jun 13, 2010
987
0
0
why would u use hibernate on an SSD?

The reason is that you don't have to save everything before hibernation, and when you wake the system, everything opens to the same condition you left it in.

Wither you hibernate or shut down, the system memory gets populated from storage, since removing power from the system memory causes it to loose all it's data. From the hibernate state, all data is recovered from the SSD, if configured that way, but when starting and opening the files from scratch, the system memory gets populated from wherever the needed data is stored. Some of this data is likely to be on a HHD.
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
And to expand on that answer, vbgunz uses it to keep his state while dual booting to Windows from Linux. But he already explained all that earlier.