OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> 16gb Cf For $159.99 After Rebate
boardboyd
post May 11 2007, 06:22 AM
Post #1





Group: Members
Posts: 50
Joined: 19-November 04
Member No.: 5,523



Found this deal while on Makezine. It is a 16Gb Sandisk Extreme CF card for $159.99 after manufacture's rebate.

16Gb 3100/3200 Anyone?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
ZDevil
post Jun 5 2007, 12:53 AM
Post #2





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Off topic a bit ...
In my case I seldom had data corruption in the swapfile when I was doing quite a bit native compilation under pdaXrom. Swap partition is to prevent file corruption and wearing from spreading all over the card.
My 16gb card has two partitions: one big root (1st partition, ~15GB) and one swap (2nd, the rest of the space). Yet I am not sure if this is a good setting or not.
Now using OpenBSD on 3200, I am a bit amazed that the swap space is often not used (checking with swapctl -l), unless when running big apps with huge overhead such as firefox. Perhaps it's because of the resource-friendliness of OBSD?
For microdrive or HDD, it is advised to put the swap partition as close to the beginning to the drive as possible to improve transfer speed. But flash memory doesn't involve any spinning, so where to put the swap partition may not be an issue. I am no hardware guru at all. Please correct me if i am wrong. smile.gif
Go to the top of the page
 
+Quote Post
kopsis
post Jun 5 2007, 07:57 AM
Post #3





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



QUOTE(ZDevil @ Jun 5 2007, 03:53 AM)
Off topic a bit ...
In my case I seldom had data corruption in the swapfile when I was doing quite a bit native compilation under pdaXrom. Swap partition is to prevent file corruption and wearing from spreading all over the card.


Partitioning may help, but the reason why is a bit more complicated. The real key to long CF life is don't ever get all the sectors on the card "used". Wear leveling needs unused sectors to work. With wear leveling, when you write to logical sector X, the card actually picks a physical sector marked as "unused", marks it "used" and writes your data there. Next time you write to logical sector X, the card picks a different physical sector, writes your new data there, then erases the previous one and marks it "unused". As a result, writes (actually its the erase before the write that wears out flash) are spread over the whole physical flash keeping any one sector from being erased and written over and over.

CF cards start with all logical sectors "unused". The first time you write to logical sector X it becomes "used". Even if you later delete the file that was using it, it is still "used" (there will forever more be a physical sector mapped to it). The CF card doesn't know anything about your filesystem. Everything is a logical sector -- and a previously written logical sector that is back on the filesystem's free list is still "in use" as far as the CF card is concerned.

Using partitions doesn't stop your writes from being spread over the physical card (nor would you want it to), but it does stop them from being spread over all the logical sectors. Without the partitioning, when the OS needs to allocate another sector, it just pulls one off the free list. That may be one that was previously "used" or it may be an "unused" one. If it's an "unused" one, you just reduced your wear leveling pool by one. Over time, unconstrained writes will cause the number of never written sectors to asymptotically approach 0. Partitioning keeps them constrained. Once every logical sector in the main partition has been written once, every subsequent allocation from the free list is forced to grab one of these previously used logical sectors and leave the logical sectors outside the partition untouched.

Good CF cards come with a decent percentage of "spare" sectors that are invisible and are always available to the card for wear leveling. Think of it as a "hidden" partition. But if you want to prolong the life of your card even more (or if you have doubts about how much protection the manufacturer has included), create a "reserved" partition with the number of sectors that you want to forever keep available for wear leveling. Do not create a filesystem in this "reserved" partition. Use the rest of the space however you see fit. Once you have some reserved space, it doesn't really matter if you use a swap file or a swap partition.

Note that you have to do this early in the life of the CF card. Once a card has been thrashed, it's not clear if there is a way to ever get the "used" sectors back to "unused". There is a low-level ATA "format sector" command that may do the trick, but it's impossible to tell if it really has any effect (and it's tough to find a disk formatting program these days that offers a "low-level format" option). That's also why buying a used CF card is such a gamble!
Go to the top of the page
 
+Quote Post
speculatrix
post Jun 5 2007, 02:26 PM
Post #4





Group: Admin
Posts: 3,281
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



QUOTE(kopsis @ Jun 5 2007, 04:57 PM)
Partitioning may help, but the reason why is a bit more complicated. The real key to long CF life is don't ever get all the sectors on the card "used". Wear leveling needs unused sectors to work. With wear leveling, when you ...


this seemed to make sense, but I think that the logic breaks down. Lets say you have a digital camera fitted with huge 16GB CF card, and only ever write 4GB to it before "emptying". It will only take four lots before you'll have marked every sector as used?
Go to the top of the page
 
+Quote Post
kopsis
post Jun 5 2007, 04:00 PM
Post #5





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



QUOTE(speculatrix @ Jun 5 2007, 05:26 PM)
this seemed to make sense, but I think that the logic breaks down. Lets say you have a digital camera fitted with huge 16GB CF card, and only ever write 4GB to it before "emptying". It will only take four lots before you'll have marked every sector as used?
*


The confusing part is the subtle distinction between "used" from a CF perspective and "used" from a filesystem perspective. In this example, you write your 4GB (let's say it's just one file for the sake of simplicity) to a brand new card. That marks roughly 8M logical sectors as "used" in both the filesystem and the CF logic. Now you delete the file. Those sectors are still "used" as far as the CF card is concerned (it won't use them for wear-leveling) but they're "free" as far as the filesystem is concerned.

Now when you write another 4GB file, the filesystem has to pick another 8M of logical sectors to write to. It *may* pick the same ones it used before (it sees them as "free"). In that case what really happens is that a new batch of physical sectors get written and the old ones get erased, but there is no net change in the number of logical sectors that are marked "used". In a controlled example like this that's very likely to happen. In reality where there are somewhat random file operations, the filesystem probably picks some previously used sectors and some never used sectors (they all look "free" to the filesystem). The result now is a net drop in "unused" logical sectors.

Repeat the process and the next time around the filesystem may pick a different batch of 8M logical sectors. Eventually it is possible that all the logical sectors will have been marked "used" in the CF. And though they may be available for the filesystem to reuse, they're no longer available for wear leveling.

Another example may make this easier to understand. Let's say you fill up a 16 GB card. Every logical sector is marked used in the CF and the filesystem. Now you delete all the files. The filesystem sees the card as empty but the CF logic says they're all "used". Now you create a zero byte file. All that does is write some stuff to the sector where the root directory is stored. Let's say that's logical sector 42 smile.gif The CF card could just erase the physical sector that is mapped to logical sector 42 and then write the new data, but if you do that a million times the physical sector could wear out.

So it grabs an unused physical sector. Now, since every logical sector is marked as used and mapped to a physical sector, the only unused physical sectors available are in the reserve pool. So it grabs a reserved sector, writes it, updates logical sector 42 to map to it, then erases the physical sector that was mapped to logical 42, and puts that erased sector in its reserved pool (all in a matter of microseconds!). Assuming that the reserved pool has 10 sectors and that sectors can handle a million writes, now we can do our zero byte file create 10 million times before we get into trouble.

Now, that example is pretty far from what someone would really do, but it illustrates the problem. On a CF card that has a small pool of unused sectors, writing the same logical sectors over and over (as happens with a swap file and a swap partition) will greatly accelerate wear on those sectors due to the reduced size of the wear-leveling pool. Keeping a large chunk of logical sectors forever unused (through partitioning) can dramatically increase the size of the wear-leveling pool and protect against the abuse of things like swapfiles.
Go to the top of the page
 
+Quote Post
ShiroiKuma
post Jun 6 2007, 01:16 AM
Post #6





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



So concretely speaking, how does that work?

If you'll have a new 16GB card, you'd create one extra primary partition? Then not mkfs it? Is that all? How big should this partition be for a card this size, to provide the additional level of security you speak about and yet not be unnecessarily big?
Go to the top of the page
 
+Quote Post
adf
post Jun 6 2007, 04:48 AM
Post #7





Group: Members
Posts: 2,821
Joined: 13-September 04
From: Wasilla Ak.
Member No.: 4,572



and on another note entirely, I was thinking more of using something like swapd that places relatively small files in; I suppose; random locations. I'm not sure now if this would help...it seems like it might.
the other option, of course, woild be to swap to the cheaper and easier to replace (due to the external slot) SD card. of course SD writes on the Z are sloooooow.
would something like swad be an improvement ata least as wear levellingi s concerned?
Go to the top of the page
 
+Quote Post

Posts in this topic
boardboyd   16gb Cf For $159.99 After Rebate   May 11 2007, 06:22 AM
InSearchOf   QUOTE(boardboyd @ May 11 2007, 10:22 AM)Found...   May 11 2007, 06:32 AM
ShiroiKuma   Could somebody buy this card for me, as it's o...   May 12 2007, 08:48 AM
ztep   QUOTE(ShiroiKuma @ May 12 2007, 06:48 PM)Coul...   May 15 2007, 08:16 AM
Cresho   oh MAN! I just updated to a 8gb cf card. To ...   May 12 2007, 10:05 PM
ZDevil   Great! I will be in US soon. The offer is real...   May 16 2007, 07:05 AM
ZDevil   Aaargh. The rebate form says it's for "US...   May 16 2007, 07:09 AM
Cresho   I can help anybody who wants to buy it. my email...   May 16 2007, 08:21 AM
ZDevil   Cool! Cresho, just PMed you.   May 16 2007, 08:33 AM
speculatrix   flash memory prices are dropping fast in Europe to...   May 16 2007, 10:15 AM
Cresho   sorry all! sorry, zdevil has first bids and I...   May 16 2007, 09:42 PM
ShiroiKuma   What a shame, I missed out, came second after Zdev...   May 16 2007, 09:43 PM
ZDevil   Sorry, ShiroiKuma. I guess there should be some ot...   May 17 2007, 12:01 AM
Cresho   a small update, the card works. I took a screensh...   May 21 2007, 11:35 PM
speculatrix   QUOTE(Cresho @ May 22 2007, 08:35 AM)a small ...   May 22 2007, 02:09 AM
Cresho   I did nothing to it. I just poped it in, checked ...   May 22 2007, 05:54 AM
kurochka   QUOTE(Cresho @ May 22 2007, 05:54 AM)I did no...   May 22 2007, 11:15 AM
Cresho   I just came accross a 16gb sandisk for 109 after r...   May 22 2007, 01:05 PM
ZDevil   I guess what Cresho is talking about is this one: ...   May 22 2007, 01:44 PM
ZDevil   Cool, so Cresho now has got his own 16gb card, whi...   May 23 2007, 01:16 AM
kurochka   So, what will it take to replace the internal hard...   May 25 2007, 10:46 AM
Capn_Fish   QUOTE(kurochka @ May 25 2007, 01:46 PM)So, wh...   May 25 2007, 11:24 AM
ZDevil   Finally I got the card from Cresho! Thanks...   May 29 2007, 04:30 PM
Capn_Fish   Good luck. Hope to hear reports on speed/battery l...   May 29 2007, 04:37 PM
ZDevil   I've created a slideshow of the swapping surge...   Jun 3 2007, 08:41 AM
ShiroiKuma   QUOTE(ZDevil @ Jun 3 2007, 05:41 PM)I've ...   Jul 16 2007, 10:06 PM
adf   fwiw I've been using the a-data 40x 16g for ab...   Jul 16 2007, 11:45 PM
Capn_Fish   Nice!   Jun 3 2007, 08:48 AM
speculatrix   I've seen cheap MLC cards in UK now (use froog...   Jun 3 2007, 01:25 PM
ZDevil   QUOTE(speculatrix @ Jun 3 2007, 11:25 PM)I...   Jun 3 2007, 01:40 PM
speculatrix   QUOTE(ZDevil @ Jun 3 2007, 10:40 PM)Surprised...   Jun 4 2007, 02:10 PM
adf   [there are A-Data 16 Gb cards available for @160 u...   Jun 4 2007, 04:25 PM
Capn_Fish   QUOTE(adf @ Jun 4 2007, 07:25 PM)[there are A...   Jun 4 2007, 04:32 PM
Meanie   QUOTE(Capn_Fish @ Jun 5 2007, 10:32 AM)QUOTE(...   Jun 4 2007, 05:11 PM
ZDevil   QUOTE(Meanie @ Jun 5 2007, 03:11 AM)QUOTE(Cap...   Jun 4 2007, 09:34 PM
adf   I wasn't sure about how partitioning works on ...   Jun 5 2007, 12:34 AM
ZDevil   Off topic a bit ... In my case I seldom had data c...   Jun 5 2007, 12:53 AM
kopsis   QUOTE(ZDevil @ Jun 5 2007, 03:53 AM)Off topic...   Jun 5 2007, 07:57 AM
speculatrix   QUOTE(kopsis @ Jun 5 2007, 04:57 PM)Partition...   Jun 5 2007, 02:26 PM
kopsis   QUOTE(speculatrix @ Jun 5 2007, 05:26 PM)this...   Jun 5 2007, 04:00 PM
ShiroiKuma   So concretely speaking, how does that work? If y...   Jun 6 2007, 01:16 AM
adf   and on another note entirely, I was thinking more ...   Jun 6 2007, 04:48 AM
kopsis   QUOTE(ShiroiKuma @ Jun 6 2007, 04:16 AM)If...   Jun 6 2007, 05:36 AM
ZDevil   Thanks for the precise explanation. This forum is ...   Jun 5 2007, 09:17 AM
Cresho   I just grabed this infro from the wikipedia. It t...   Jun 6 2007, 04:40 AM
wsuetholz   Not to get off topic, but does switching from the ...   Jun 28 2007, 07:12 AM
ZDevil   Okay, here is the much belated mini-benchmarking r...   Sep 19 2007, 12:30 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 12:44 AM