Community discussions

MikroTik App
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Sector writes, how big is a "sector"

Tue Apr 10, 2012 4:04 am

Wanting to calculate NAND exhaustion rates on my RB, and all RB's in general.

I see the value "sector writes" in the system | resources section - but without knowing how big a "sector" is, I can't calculate how much impact a single sector write has.

Now, rather than telling me - "well how many writes do you have," "or really unless you're doing a lot of web-cache you don't need to worry" - please stop.

Just assume I'm really miserly, and I want to keep my RB running for the next 1000 years and I want to be sure the NAND will last that long.

I really want to know how big a "sector" write is, so I can use my own judgement.

So again, how big is a "sector write" on the RB?
Does the size of a "sector" vary depending on device or NAND capacity?
Finally, is all recent [last 5 years] RB NAND good for one-hundred-thousand writes?

[I've done some searching and the best I found was only non-confirmed speculation was that a "sector" was 16kb.]

-Greg
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Thu Apr 12, 2012 10:12 pm

Bump...
Here's what I need to know...

So again, how big is a "sector write" on the RB?
Does the size of a "sector" vary depending on device or NAND capacity?
Finally, is all recent [last 5 years] RB NAND good for one-hundred-thousand writes?

[I've done some searching and the best I found was only non-confirmed speculation was that a "sector" was 16kb.]

-Greg
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 11:00 am

here is some more info, including NAND datasheet: http://wiki.mikrotik.com/wiki/Manual:Ro ... bad_blocks
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 7:35 pm

Hey! You didn't answer the most important and basic question...

HOW BIG IS A SECTOR? 4K 16K 4MB?

HOW BIG IS A SECTOR?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 8:15 pm

It's written in the PDF I gave you. It depends on NAND type.
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 8:24 pm

PDF? I see a web-page...?

---
If you're talking about the Hynix data sheet, that's a pretty arcane answer.

The word "sector" isn't mentioned in the article anywhere.
So, perhaps we are talking about what is referred to as "page size."

But heck if I know.

And how would I know if it was a x8 device or a x16 device.

---
Why I'd go looking at the data sheet for a NAND part in your system to determine what size your software considers a "sector" seems like an odd response to a specific question about a Routerboard.

-Greg
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 9:03 pm

So, completely guessing here...

What you call "sector" the data-sheet calls Block, right?

Thus, if it's a x8 device, the block size is 16K + 512bytes spare.
For an x16 device, the block size is 8K + 256 xpare.

But for calculation sake, just use the 8K or 16K
Thus, for a 256M of NAND, and a
1) x8 NAND - you have 16,384 K block size = 16384 blocks per 256MB of NAND
[i.e. 268,435,456 (256MB) / 16384 (block size) = 16384 (total blocks)]

2) x16 NAND - you have 32,768 blocks per 256MB of NAND.
Double the total numbers of blocks

So, lets assume worst case situation.
Lets use the larger block size, (an x8) NAND
Lets also assume we can write the NAND ONLY 50,000 times, instead of 100,000 times [50% of total life]

That would mean in worst case, we're talking about 819 million sector writes before we'd reach what Hynix claims is only 50% of the total write cycles for the device. (i.e. 819,200,000 sector writes) [16384 * 50000 = 819200000]

If you go to 75% of total write cycles, it would be 1.228 BILLION sector writes. (i.e. 1,228,800,000 sector writes)
If you go to 100% of total write cycles, it would be 1.638 BILLION sector writes. (i.e. 1,638,400,000 sector writes)

And those are the most conservative. If you have an x16 NAND, double those figures.

So, I'd guess that less than 41 million sector writes a year on a 256M Disk in a Routerboard would be no problem at all, provided you wanted a 20 year life before you reached 50% of the write spec of the NAND.

Are those calculations correct?

-Greg
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 9:21 pm

Thanks Greg, yes that's what I meant was written in the datasheet
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Fri Apr 13, 2012 9:32 pm

But do the calculations above look correct?

Since this appears to be the ONLY time I've seen anyone actually try to give some real authoritative and calculated basis, I want to be sure they are good calculations.

Thanks!

-Greg
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Tue Apr 17, 2012 5:48 am

Bump...

Normis. Can you please confirm the general calculations made above.
Namely.

The 256M NAND has either
16384 blocks/sectors or 32768 blocks/sectors

So, in worst case, with only 16384 sectors...
If you can write each "sector" 100000 times - then:
You would expect to get about 1.638 billion "sector" writes before write exhaustion.
[16384 * 100000 = 1,638,400,000 writes]

Or at:
50% of total expected write life, figure ~820 million sector writes.
75% of total expected write life, figure 1.228 billion sector writes.

This all assumes that the hynix "block" size is the same as what RoS uses as "sector" writes.
Hynix Block = RoS "Sector"

TIA
-Greg
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Tue Apr 17, 2012 9:14 am

Some clarifications from the developers:

With "Sector Writes" we mean nand page writes. One page on 256 MB nand is 2 KB (2048 bytes). For smaller 64 MB nands one page is 512 bytes (0.5 KB).
 
gsloop
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Wed Jan 04, 2012 11:34 pm
Contact:

Re: Sector writes, how big is a "sector"

Tue Apr 17, 2012 9:39 am

So, a sector is 2048 bytes for 256MB "disks" [NAND]
(i.e. a RB450G has a 256M disk, and it's sector size is 2048 bytes, correct?)

So - we have a lot of re-calculating to do.
If the 256MB NAND is 268,435,456 bytes, and a sector is 2048 bytes: Then
There are 131072 "sectors" in the 256MB NAND Disk. [268435456 / 2048 = 131072]

Therefore: for 256M disks
For 10K writes [10% of estimated write exhaustion spec]: 1.310 billion "sector" writes (131,072 * 10,000)
For 50K writes [50% of estimated write exhaustion spec]: 6.553 billion "sector" writes (131,072 * 50,000)
For 70K writes [75% of estimated write exhaustion spec]: 9.830 billion "sector" writes (131,072 * 75,000)
For 100K writes [100% of estimated write exhaustion spec]: 13.1 billion "sector" writes (131,072 * 100,000)

So, for a 256M disk, and a 20 year lifespan, only using 50% of predicted write cycles, you should be fine if you have fewer than 325 million writes per year. [Or 27 million sector writes per month.]

Since the 64M NAND is 25% as big and the page size is also 25% as large, then the numbers are the same.

So, those numbers are pretty incredible.
If you can live with a 20 YEAR lifespan, and even then only using 50% of the write cycle capacity of the NAND, you can allow up to 27,000,000 [that's 27 MILLION] "sector" writes per MONTH.

Given that - it's hard to imagine the disk failing EVER, even if it's used for a full-on proxy cache.

Seriously. Normis? Is that right?

-Greg
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Tue Apr 17, 2012 9:43 am

Yes sounds right. We haven't seen any NANDs failed due to writes so far. Also, RouterOS doesn't write to disk much, unless you use it for webproxy (which is useless on such small size NAND).
 
User avatar
DogHead
Member Candidate
Member Candidate
Posts: 196
Joined: Thu Jan 03, 2008 9:36 pm
Location: Anywhere you want me to be

Re: Sector writes, how big is a "sector"

Wed Apr 25, 2012 4:57 am

We are seeing increasing bad blocks on RB433 and RB411. It appears to be correlated to power resets. Once total bad blocks reaches over 2% it is inevitable that the board will fail. We attempt format of NAND but it doesn't fix the bad blocks.

see http://forum.mikrotik.com/viewtopic.php?f=3&t=61321 for more.
 
User avatar
DogHead
Member Candidate
Member Candidate
Posts: 196
Joined: Thu Jan 03, 2008 9:36 pm
Location: Anywhere you want me to be

Re: Sector writes, how big is a "sector"

Fri May 11, 2012 6:29 am

The wiki manual only has data sheet for Hynix NAND, but almost all boards we have received in the last 6 months have used Samsung NAND. Do you have a datasheet for these too?

I am still convinced that the recent releases of boards with Samsung NAND and DTC RAM are prone to progressive NAND corruption and eventual failure. Support continues to ignore the data we have sent and somehow claims that there must be something else going on. The problem is very hard to troubleshoot as it does not happen all at once. We need help here. Can someone in tech support confirm that you are looking at this problem, testing boards with this NAND/RAM combination, and have some advice or diagnostic.

Throwing 10% of our routerboards in the trash is not acceptable.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Sector writes, how big is a "sector"

Fri May 11, 2012 8:28 am

10%? Then really something else must be going on. We rarely see anyone writing about bad sectors. You might be one of 2-3 people in the last few months, and mostly it's because of enabled debug logs to disk (which causes enormous amount of writes per minute). You need to investigate what configuration is there, and at which point does the problem start. I guess it's not taking place right after you turn on the device, with no config?
Support continues to ignore the data
Support asked you many questions, you are not responding to our emails.
 
User avatar
DogHead
Member Candidate
Member Candidate
Posts: 196
Joined: Thu Jan 03, 2008 9:36 pm
Location: Anywhere you want me to be

Re: Sector writes, how big is a "sector"

Sat May 19, 2012 11:06 pm

We have responded to every single question from support.

We do not have debug logging enabled. And have turned off all store writes.

We are convinced that we have a bad lot of RB433, as we only see these problems on RB433 with DTC/SAMSUNG combination. All other RB433 behave normally with exact same configuration.

Once you receive back the RMA boards you can tell us what went wrong. In the mean time we have told all distributors that we will not take any RB with Samsung/DTC combination.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Sector writes, how big is a "sector"

Mon May 21, 2012 8:42 am

DogHead,
We are waiting for support files from router, that is close to failure point.
Thank you for the RAM memory test output by the way, as we agreed on our conversation below,

Support:
2) It is very important to get support output file from one of the routers with
longer uptime (more NAND writes), perhaps the best is file from router that is
close to failure point.
Your reply:
...
I will attempt for run a board to the edge of failure so you can see what is
going on.
...
 
User avatar
DogHead
Member Candidate
Member Candidate
Posts: 196
Joined: Thu Jan 03, 2008 9:36 pm
Location: Anywhere you want me to be

Re: Sector writes, how big is a "sector"

Tue May 29, 2012 4:02 am

We have been really busy and doing testing for Mikrotik manufacturing defects is not the top of our list of things to spend our time on.

I have a few boards that I have been cycling to try to get the bad blocks near the failure point. Seems pretty random. Sometimes they fail at 2% and sometimes at 10%. Once they fail, reimaging with netinstall brings them back to the .5-2% range again. I will run one up a few times so that each time it has progressively more bad blocks and send you the suppout on them.

There seems to be little indication of when they will fail. Just that they will.
 
jahatkeh10
just joined
Posts: 7
Joined: Sat Mar 23, 2013 7:18 am

Re: Sector writes, how big is a "sector"

Sat May 18, 2013 6:44 pm

Really, there's no point trying to compare the paper calculation with reality.
Sales brochure always written like a superhero product dream. While in reality... hmmm... you know.......... just dreaming.

I have an RB that's used for only daily usage where the max client is < 5.
Disable store on lease disk. Only give PCQ for global Upload and download.
very easy task right. Guess what? only 717537 total sector writes and the bad blocks already 1.6%. Very Far from what the paper says right.
(don't talk about netinstalling to wipe the bad blocks. cause I've done it and it's useless).

I don't say all the product is bad. Since most of my RB is good. Just want to say, just forget about what the paper says guaranted and bla bla bla... you buy it. you stick with it. useless to calculate it.

Who is online

Users browsing this forum: DanMos79, dozer46 and 67 guests