Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Poul-Henning Kamp
In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:

ps: the hdd only gets mounted read-only!

There is no known wear-effects in flash storage as long as you
only read.

You may need to do refresh-writes every 5-10 years to avoid
tunnel-leakage bit errors, but most flash controllers use semi-long
ECC syndromes and will do so on first bit that gives an read error.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Matthew Jacob

Putting it better: http://en.wikipedia.org/wiki/Flash_memory#Read_disturb
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Alexander Best
On Mon Dec 19 11, Poul-Henning Kamp wrote:
 In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:
 
 ps: the hdd only gets mounted read-only!
 
 There is no known wear-effects in flash storage as long as you
 only read.
 
 You may need to do refresh-writes every 5-10 years to avoid
 tunnel-leakage bit errors, but most flash controllers use semi-long
 ECC syndromes and will do so on first bit that gives an read error.

this is a regular hdd i believe -- no ssd. at least when i plug it into my
usb drive i hear the hdd spinning up and causing vibrations. i don't think
that would be the case with an ssd.

 
 -- 
 Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
 p...@freebsd.org | TCP/IP since RFC 956
 FreeBSD committer   | BSD since 4.3-tahoe
 Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Poul-Henning Kamp
In message 20111219224700.ga75...@freebsd.org, Alexander Best writes:
On Mon Dec 19 11, Poul-Henning Kamp wrote:
 In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:
 
 ps: the hdd only gets mounted read-only!
 
 There is no known wear-effects in flash storage as long as you
 only read.
 
 You may need to do refresh-writes every 5-10 years to avoid
 tunnel-leakage bit errors, but most flash controllers use semi-long
 ECC syndromes and will do so on first bit that gives an read error.

this is a regular hdd i believe -- no ssd. at least when i plug it into my
usb drive i hear the hdd spinning up and causing vibrations. i don't think
that would be the case with an ssd.

Ahh, sorry, I don't know why I thought it was flash.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Alexander Best
On Mon Dec 19 11, Poul-Henning Kamp wrote:
 In message 20111219224700.ga75...@freebsd.org, Alexander Best writes:
 On Mon Dec 19 11, Poul-Henning Kamp wrote:
  In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:
  
  ps: the hdd only gets mounted read-only!
  
  There is no known wear-effects in flash storage as long as you
  only read.
  
  You may need to do refresh-writes every 5-10 years to avoid
  tunnel-leakage bit errors, but most flash controllers use semi-long
  ECC syndromes and will do so on first bit that gives an read error.
 
 this is a regular hdd i believe -- no ssd. at least when i plug it into my
 usb drive i hear the hdd spinning up and causing vibrations. i don't think
 that would be the case with an ssd.
 
 Ahh, sorry, I don't know why I thought it was flash.

no problem. so will the improper alignment also not cause a life expectancy
shortage in case of a hdd (non-flash-based)?

and one other question: the hdd also supports usb 3. will the improper
alignment have any effect (speed wise) when connected via usb 3, or is even
usb 3 too slow to notice the performance drop due to the improper alignment?

cheers.
alex

 
 
 -- 
 Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
 p...@freebsd.org | TCP/IP since RFC 956
 FreeBSD committer   | BSD since 4.3-tahoe
 Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Poul-Henning Kamp
In message 20111219225633.ga77...@freebsd.org, Alexander Best writes:

no problem. so will the improper alignment also not cause a life expectancy
shortage in case of a hdd (non-flash-based)?

Well, theoretically you will have more track-to-track seeks, as some
blocks will span cylinders, but I doubt that will have measurable
impact on lifetime, compared with the gains you could harvest if you
spin it down for even just 1 hour a day...

Read-Only/Read-Write makes no difference that I know of for hard-disks.

and one other question: the hdd also supports usb 3. will the improper
alignment have any effect (speed wise) when connected via usb 3, or is even
usb 3 too slow to notice the performance drop due to the improper alignment?

Again: I doubt it will be measurable.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Matthew Jacob

On 12/19/2011 2:22 PM, Poul-Henning Kamp wrote:

In message20111219221617.ga70...@freebsd.org, Alexander Best writes:


ps: the hdd only gets mounted read-only!

There is no known wear-effects in flash storage as long as you
only read.


No, sorry, that's not really true.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Poul-Henning Kamp
In message 4eefb9f3.80...@feral.com, Matthew Jacob writes:
On 12/19/2011 2:22 PM, Poul-Henning Kamp wrote:
 In message20111219221617.ga70...@freebsd.org, Alexander Best writes:

 ps: the hdd only gets mounted read-only!
 There is no known wear-effects in flash storage as long as you
 only read.

No, sorry, that's not really true.

Pray tell!

There will always be charge leakage, but last I talked to
silicon-pushers, that was (almost) entirely independent of read-access
and correlated strongly with temperature*duration.

Obviously, if your flash controller lies to you and do needless writes
anyway, we are not talking read-only.

Those are the only two effects I know of ?


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Alexander Best
On Mon Dec 19 11, Jeremy Chadwick wrote:
 On Mon, Dec 19, 2011 at 10:56:33PM +, Alexander Best wrote:
  On Mon Dec 19 11, Poul-Henning Kamp wrote:
   In message 20111219224700.ga75...@freebsd.org, Alexander Best writes:
   On Mon Dec 19 11, Poul-Henning Kamp wrote:
In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:

ps: the hdd only gets mounted read-only!

There is no known wear-effects in flash storage as long as you
only read.

You may need to do refresh-writes every 5-10 years to avoid
tunnel-leakage bit errors, but most flash controllers use semi-long
ECC syndromes and will do so on first bit that gives an read error.
   
   this is a regular hdd i believe -- no ssd. at least when i plug it into 
   my
   usb drive i hear the hdd spinning up and causing vibrations. i don't 
   think
   that would be the case with an ssd.
   
   Ahh, sorry, I don't know why I thought it was flash.
  
  no problem. so will the improper alignment also not cause a life expectancy
  shortage in case of a hdd (non-flash-based)?
 
 The improper alignment will result in sub-par write performance, and a
 slight decrease in read performance writes -- but will not impact life
 expectancy or harm the drive in any way.
 
 I recommend strongly that you rectify the situation before you get too
 carried away with software installations, etc..
 
 And yes I am aware what you have is a mechanical HDD not an SSD (I say
 in this advance of what I'm about to write).
 
 If you need a safe alignment value, most software on Windows
 (including Windows 7) pick a value of 2MBytes as the alignment offset,
 which I believe is LBA 4095, since everything software-wise uses
 512-byte sectors.  That's calculated via: 2097152 / 512.
 
 This number is also evenly divisible by 4096 bytes (which is what you're
 trying to ensure for performance).
 
 Readers, as well as you, may wonder where the magical 2MByte value
 comes from, and can you pick something smaller.  Yes you can pick
 something smaller, but the value itself stems from the added complexity
 of SSDs and NAND erase page size vs. NAND page size.  A value of 2MBytes
 works well on all brands of SSDs on the market (as of this writing).
 
 Which reminds me -- I need to go back and redo most of our systems that
 use Intel SSDs, since at the time I picked the default offset in
 sysinstall (LBA 63, thus 64 * 512 = 32KBytes), which though divisible by
 4096, is not optimal for NAND erase page size.
 
 I would love to advocate FreeBSD change sysinstall/bsdinstall to use a
 default offset of 2MBytes, but I imagine that would upset a lot of
 people who install FreeBSD on limited space devices (CF, etc.).
 Honestly though, with the size of media these days

thanks a lot for the explanation. i'm going to get another drive, soon, and
will then be able to fix the alignment, as i currently have no place where
i can backup the data of my current (misaligned) hdd.

 
  and one other question: the hdd also supports usb 3. will the improper
  alignment have any effect (speed wise) when connected via usb 3, or is even
  usb 3 too slow to notice the performance drop due to the improper alignment?
 
 USB 3.0 vs. 2.0 vs. eSATA vs. native SATA has no bearing on the
 situation.  Those are transport protocols that define maximum
 bandwidth.
 
 By the way, the hard disk itself does not support USB 3.0 -- your
 drive is in an enclosure that contains a SATA-USB3.0 conversion
 chipset inside.  If you open the enclosure, you will find the hard disk
 is SATA, and probably supports SATA600.

i was ware of this fact. what i meant by speed in connection with usb 3 was the
following example-case (please don't take the numbers literally)

1) the drive itself can do 500 mb/sec when aligned properly
2) the drive does 350 mb/sec when aligned improperly (512 boundry)
3) usb 3 can do 100 mb/sec

... so in this case the improper alignment wouldn't have an impact, since
even with proper alignment only 100 mb/sec were possible. however in the
following example:

1) 500 mb/sec
2) 100 mb/sec
3) 200 mb/sec

the improper alignment would have an impact, since usb 3 *could* perform at
200 mb/sec with proper alignment, but will drop to 100 mb/sec in the case of
improper alignment.

again...please don't take the transfer rates literaly. they're most defenately
bogus.

cheers.
alex

 
 -- 
 | Jeremy Chadwickjdc at parodius.com |
 | Parodius Networking   http://www.parodius.com/ |
 | UNIX Systems Administrator   Mountain View, CA, US |
 | Making life hard for others since 1977.   PGP 4BD6C0CB |
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Jeremy Chadwick
On Mon, Dec 19, 2011 at 03:20:10PM -0800, Jeremy Chadwick wrote:
 On Mon, Dec 19, 2011 at 10:56:33PM +, Alexander Best wrote:
  On Mon Dec 19 11, Poul-Henning Kamp wrote:
   In message 20111219224700.ga75...@freebsd.org, Alexander Best writes:
   On Mon Dec 19 11, Poul-Henning Kamp wrote:
In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:

ps: the hdd only gets mounted read-only!

There is no known wear-effects in flash storage as long as you
only read.

You may need to do refresh-writes every 5-10 years to avoid
tunnel-leakage bit errors, but most flash controllers use semi-long
ECC syndromes and will do so on first bit that gives an read error.
   
   this is a regular hdd i believe -- no ssd. at least when i plug it into 
   my
   usb drive i hear the hdd spinning up and causing vibrations. i don't 
   think
   that would be the case with an ssd.
   
   Ahh, sorry, I don't know why I thought it was flash.
  
  no problem. so will the improper alignment also not cause a life expectancy
  shortage in case of a hdd (non-flash-based)?
 
 The improper alignment will result in sub-par write performance, and a
 slight decrease in read performance writes -- but will not impact life
 expectancy or harm the drive in any way.

This should have read ...slight decrease in read performance, not
read performance writes.  Editing mistake on my part.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator   Mountain View, CA, US |
| Making life hard for others since 1977.   PGP 4BD6C0CB |

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Jeremy Chadwick
On Mon, Dec 19, 2011 at 10:56:33PM +, Alexander Best wrote:
 On Mon Dec 19 11, Poul-Henning Kamp wrote:
  In message 20111219224700.ga75...@freebsd.org, Alexander Best writes:
  On Mon Dec 19 11, Poul-Henning Kamp wrote:
   In message 20111219221617.ga70...@freebsd.org, Alexander Best writes:
   
   ps: the hdd only gets mounted read-only!
   
   There is no known wear-effects in flash storage as long as you
   only read.
   
   You may need to do refresh-writes every 5-10 years to avoid
   tunnel-leakage bit errors, but most flash controllers use semi-long
   ECC syndromes and will do so on first bit that gives an read error.
  
  this is a regular hdd i believe -- no ssd. at least when i plug it into my
  usb drive i hear the hdd spinning up and causing vibrations. i don't think
  that would be the case with an ssd.
  
  Ahh, sorry, I don't know why I thought it was flash.
 
 no problem. so will the improper alignment also not cause a life expectancy
 shortage in case of a hdd (non-flash-based)?

The improper alignment will result in sub-par write performance, and a
slight decrease in read performance writes -- but will not impact life
expectancy or harm the drive in any way.

I recommend strongly that you rectify the situation before you get too
carried away with software installations, etc..

And yes I am aware what you have is a mechanical HDD not an SSD (I say
in this advance of what I'm about to write).

If you need a safe alignment value, most software on Windows
(including Windows 7) pick a value of 2MBytes as the alignment offset,
which I believe is LBA 4095, since everything software-wise uses
512-byte sectors.  That's calculated via: 2097152 / 512.

This number is also evenly divisible by 4096 bytes (which is what you're
trying to ensure for performance).

Readers, as well as you, may wonder where the magical 2MByte value
comes from, and can you pick something smaller.  Yes you can pick
something smaller, but the value itself stems from the added complexity
of SSDs and NAND erase page size vs. NAND page size.  A value of 2MBytes
works well on all brands of SSDs on the market (as of this writing).

Which reminds me -- I need to go back and redo most of our systems that
use Intel SSDs, since at the time I picked the default offset in
sysinstall (LBA 63, thus 64 * 512 = 32KBytes), which though divisible by
4096, is not optimal for NAND erase page size.

I would love to advocate FreeBSD change sysinstall/bsdinstall to use a
default offset of 2MBytes, but I imagine that would upset a lot of
people who install FreeBSD on limited space devices (CF, etc.).
Honestly though, with the size of media these days

 and one other question: the hdd also supports usb 3. will the improper
 alignment have any effect (speed wise) when connected via usb 3, or is even
 usb 3 too slow to notice the performance drop due to the improper alignment?

USB 3.0 vs. 2.0 vs. eSATA vs. native SATA has no bearing on the
situation.  Those are transport protocols that define maximum
bandwidth.

By the way, the hard disk itself does not support USB 3.0 -- your
drive is in an enclosure that contains a SATA-USB3.0 conversion
chipset inside.  If you open the enclosure, you will find the hard disk
is SATA, and probably supports SATA600.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator   Mountain View, CA, US |
| Making life hard for others since 1977.   PGP 4BD6C0CB |

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: can a wrong alignment cause a decrease in a hdd's life expectancy?

2011-12-19 Thread Warren Block

On Mon, 19 Dec 2011, Alexander Best wrote:


no problem. so will the improper alignment also not cause a life expectancy
shortage in case of a hdd (non-flash-based)?

and one other question: the hdd also supports usb 3. will the improper
alignment have any effect (speed wise) when connected via usb 3, or is even
usb 3 too slow to notice the performance drop due to the improper alignment?


Many variables: file system, file size, drive firmware...  The only 
reason not to fix it is time.  And space for a temporary copy... two, 
two reasons not to fix it.


Benchmark it as-is, back up, realign, restore, benchmark again.

Or live with the gnawing, creeping doubt of not knowing for sure. 
Every day wondering is that drive slower than it could be just from a 
simple alignment error?  Is every read a mere fraction of its 
potential?


But it's probably fine.  No pressure.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org