Main > Main Forum
I would like to use a compact flash as a hard drive in a bartop cabinet, but...
<< < (2/7) > >>
MonMotha:
TRIM does more than just "preemptively erase" logical sectors.  It tells the device that "this data is no longer required; this logical sector can be disregarded and its backing storage returned to the dynamic wear leveling pool".  That last part is very powerful.  It ensures that the device always has 1) lots of free, already erased blocks (which makes writes faster) and 2) ensures that the wear leveling pool is as big as possible, which spreads out wear more.

Without TRIM, the device has to consider all logical sectors that have EVER been written to as "potentially in use" and copy the data around when it gets erased as part of a block erase, and use blocks to back them, even if the filesystem has no use for that data (e.g. it contained part of a file which has been deleted).
jukingeo:

--- Quote from: nox771 on June 17, 2011, 10:56:01 pm ---First, regarding write endurance I think this comes down to whether your CF cards have wear leveling or not.  CF is commonly used as a HD replacement in embedded applications, and I think there are ones out there which do have wear leveling circuits. ....
--- End quote ---

Yes, I know that CF cards are used in embedded applications because I have seen it.  I work for the local Chuck E. Cheese and they have two machines made by Trio-Tech (A Canadian company that makes motion simulator rides/games).   These machines use Windows Embedded with a compact flash as the hard drive.

Now, what is meant by wear leveling?


--- Quote ---I use USB flash drives extensively at my work, and I've run full Linux installs off them for years at a time with no issue.
--- End quote ---

I do run Linux as well and usually it is my first choice, but Linux still isn't 100% with certain applications, particularly for the work that want to do.  Thusfar, Windows XP runs the applications just about flawlessly.  BUT the problem is that that darn OS constantly wants to parse the hard drive.

As far as I know, Linux doesn't do this, but I am not 100% sure.  As it is, I am running Linux on my main machine right now, and the hdd light flashes readily 1 time each second.   Another thing that I am not sure if it 'just doing it' or if it is a read operation or a write operation.


--- Quote ---  I think most controllers these days do dynamic leveling, but I did have one drive which did static leveling (it was unbearably slow).  Currently I have an Arch linux image I run off a USB flash drive (it is a virtualbox image inside a truecrypt container), no problems yet.  My concerns with flash, esp MLC cells, are always much more with regard to bit rot than wear leveling though.  I don't know if there are any studies of MLC flash reliability with regard to environmental factors (ie. heat), but having designed flash cells in the distant past I know leakages are a major concern (and manufacturers are reluctant to disclose mitigating circuitry, such as ECC implementations, probably due to a lack thereof - it makes it very difficult to gauge reliability).
--- End quote ---

That is interesting to know, but this is a problem that would be beyond the user control and thus backups and fail safes should be implemented.  The good thing is that the CF card is easily replaced and that is what I like about the format.


--- Quote ---Regardless of all this, I think the goal of having a never fail CF card is the wrong way to go about it.
--- End quote ---

That isn't what I am going for, but if there is a way I can assist in the LONGEVITY of the card and I have control over that, then I am certainly going to go that route.   But as I mentioned above, if it is something that I cannot control, then it is time to revert to a backup.


--- Quote ---  For a game machine the install is essentially static (aside from maybe high scores).  Small capacity flash is cheap these days, just get a couple cards and make one an offline backup.  If you are constantly tweaking the machine just refresh the backup every 2-3 months or so.  This is actually the way I go about it myself - I put all my files inside a truecrypt container on the flash device, and every day/week/month/whatever I drag and drop the whole container to a backup HD.  Since the HD is much larger than any flash you can keep multiple timestamped images.
--- End quote ---

Sounds like a good plan, and yeah, that is what I would probably do.  I can keep everything stored on my main machine which has two 500gig drives on it.  I have a CF card reader on my printer and I can do dumps to a card from there.


--- Quote ---Your other idea is intriguing though - running it off a ramdisk.  I've never gotten around to it myself, but there is something you could try here:
http://memory.dataram.com/products-and-services/software/ramdisk
--- End quote ---

I will check that out later, but after I made my post last night, I did do some research and it seems that running Windows XP totally from ram alone is a difficult proposition to say the least.  So the jury is still out on this one.  Linux however CAN be run totally from a ram drive.   Most Linux distributions can run a Live CD and does so by running the OS in ram (at least partially).   There is at least one distribution called "Puppy Linux" that is extremely fast once loaded on (via a Live CD) because it is so small it runs ENTIRELY from within ram.

The caveat is that Puppy Linux is Slackware based and as such the repositories are not very endowed.  I have had trouble with getting Mame to work correctly, but it does support Wine and I have managed to get some Windows based programs to run, but not the ones I need for my embedded projects.   Still the door is open with this OS as I have not completed my testing on it.   But for Ubuntu...nope.  I don't think it will work.


--- Quote ---I think if you can get your image small enough to fit inside a ram disk, plus allow enough working ram for the thing to function, then that is a great idea.  I remember running a Puppy Linux live CD a long time back, and it would load itself entirely into ram, and it was blazing fast - programs would open instantly.  I've had that sort of thing on my to-do list for a long time, so if you do that I would be interested in knowing your results.
--- End quote ---

LOL!  This is what I get when I read and respond. 


--- Quote ---Actually this gives me another idea - if you use a ramdisk to load the OS and emulator and then add in a wireless card and a NAS, you could source the ROMs wirelessly from the NAS so you would have no capacity issue.

--- End quote ---

For MAME, naw...I only have about 400 roms and most of them are classic games.  However, that idea does have merit for the jukebox program since I can keep all the songs in one place and the jukebox can parse a NAS unit that has many music titles on it.   Since music takes up quite a bit more space than a MAME rom, it would be best to have all my music on a NAS with a standard hard drive.   So yeah, then that is a good idea.


--- Quote from: cotmm68030 on June 17, 2011, 11:07:12 pm ---Why not use a proper ssd with a sata-to-ide adaptor?

--- End quote ---

Because that is expensive and an ssd cannot be easily removed and attached to my main computer as a compact flash card can.


--- Quote from: MonMotha on June 17, 2011, 11:44:29 pm ---With proper wear leveling, "wearing out" a large flash devices is not really a concern.  I wouldn't recommend using them as swap,
--- End quote ---

Point noted.  My computer is recognizing the Syba adapter as a removable drive and as such the feature of having a swap file is grayed out anyway.  So the swap file is 'off'.   Even with as low a ram as I have on my test machine, I didn't notice any problems (thusfar).


--- Quote ---If you must run WindowsXP, there are some tricks, but I think MS only officially supports them on the "embedded" version.
--- End quote ---

Yeah, last night I was reading up on something called an Enhanced Write Filter.  This is something that is included with the embedded version of XP.  However, it is also something that can be added to Windows XP Professional too.

I do not have any details yet as I found this info late last night.


--- Quote ---  You can have it do copy-on-write to a ramdisk.  This effectively "freezes" the system partition as any changes you make exist in RAM only and go away when you reboot and everything loads back off the mass storage.  This avoids the overhead of a full ramdisk while still removing all write activity to the system partition.  There's a "thaw" command if you want to make changes and commit them.  I don't know anything about how to do this, only that it exists.  A similar trick can be done on Linux via a variety of methods, or it's possible to just run Linux with everything mounted readonly, if you're careful.

--- End quote ---

Wow, you did mention a mouthful here and this does look like the direction that I would like to head in.  Yes, I know that some distributions of Linux can be made Read Only.   I have Ubuntu 10.04 and with this version you must supply a password to mount drives.   Thus read/writing is automatically blocked.  You can set permissions to read only if you like.  The only thing is that I am not sure if the main OS partition could be set up this way.  With Puppy Linux, I am sure it can be done since that OS is already set up to be able to run in RAM.   A boot partition could be set up on the Compact Flash in which you can load up the OS straight into RAM.  However, I don't know how to do it.   But if it can be done with a CD-ROM, I am sure it can be done with a Compact Flash.


Now I know the rest of you have been talking about TRIM, but at this point in time my goals are to have the OS write to the compact flash as little as possible, or better yet, not at all.

So what it looks like I have to do is either find a way to get Windows XP to stop haphazardly writing to the compact flash, or I am looking at going with a different OS.   The latter would be difficult as just about all my applications use sound and finding drivers for a non-parsing OS such as Windows 98 or DOS would be difficult.   I am mostly dealing with newer style motherboards and just about all have built in sound.

I know that both MAME and DWJukebox can be set up on a DOS machine, but then I would probably have to look into a full sized motherboard that has an ISA slot on it.  An ISA slot would allow the use of a Soundblaster 16 and I would be set there.   Surprisingly this would solve the bulk of my problems, but not all.  There are just some programs that I have that need to run on Windows.  OR I could use Wine if I could get the darn com ports to work!

Thanx for the info guys and keep the suggestions coming.

Geo

ark_ader:
Puppy Arcade is your ticket , but if I remember you was already was looking for a similar result and I did mention it, but you didn't like the front end.

That saying, Puppy can install from CF like a HDD you just have to get a cheap USB adapter.  I used to use the CF cards on the OLD Thinkpad 365x laptops as they can boot from CF.

Puppy runs in RAM (256mb) then you have your roms. 

Are we talking one game?  If so you can use DOS.  If you have DOS and want to use USB check out PLOP.  Lots of goodies in there.  ;)

If you want XP, look at getting Bart's PE and that should sort your rewrite problem.  Earlier CF cards had the issues, but newer ones are not that bad.  Actually I have MicroXP running on a CF card without swap and the registry hacks that do not prefetch data off the HDD/CF, it runs in RAM.  It is on a crap laptop but it works.

Why be cheap, just buy a 2.5 HDD.  Easy.
jukingeo:

--- Quote from: ark_ader on June 18, 2011, 04:09:33 pm ---Puppy Arcade is your ticket , but if I remember you was already was looking for a similar result and I did mention it, but you didn't like the front end.
--- End quote ---

That is correct.  I did try it out, but I had problems with it.  It ran extremely slow and the frond end seemed more like a 'home' quality cluster of emulators.  I was looking for something more 'arcade' quality...something like Mala or Hyperspin.  Puppy Arcade looked too "Windows" based if you know what I mean.

I did end up going back to SDLMame and Wahcade for Linux.  I got the speed problem fixed, but the sound is on the choppy side and it is an issue with SDLMame.   I also ran into a similar sound issue with DWJukebox.  I have to run this in Wine and for the most part it works, but the audio has quite a bit of noise and hiss in it.


--- Quote ---That saying, Puppy can install from CF like a HDD you just have to get a cheap USB adapter.  I used to use the CF cards on the OLD Thinkpad 365x laptops as they can boot from CF.
--- End quote ---

I actually have one better.  I have a Syba IDE to CF adapter, which takes USB out of the picture totally.


--- Quote ---Puppy runs in RAM (256mb) then you have your roms.
--- End quote ---

I probably have to get more ram for my test machine as I am right at that point.


--- Quote ---Are we talking one game?  If so you can use DOS.  If you have DOS and want to use USB check out PLOP.  Lots of goodies in there.  ;)
--- End quote ---

No, I would like to run multiple games.  With DOS I can use Arcade OS as a front end as I believe I still have it hanging around.   My issue with DOS is getting the sound to work.  Modern motherboards do not have DOS drivers and that is a problem.  As I said earlier, if I could find some motherboards (preferably newer) that have at least one ISA slot on it, then I could use an old Soundblaster 16 card and that would be supported by DOS.  If that were the case then I could use MAME and DW jukebox with DOS.  DOS loads up into memory and there really isn't write backs to the hard drive.  Also given that it is such a small OS, it does make it a high candidate for a CF based system.


--- Quote ---If you want XP, look at getting Bart's PE and that should sort your rewrite problem.  Earlier CF cards had the issues, but newer ones are not that bad.  Actually I have MicroXP running on a CF card without swap and the registry hacks that do not prefetch data off the HDD/CF, it runs in RAM.  It is on a crap laptop but it works.
--- End quote ---

What is MicroXP?

I just started to read about Bart's PE as I found out about it last night.  As such, I have not delved too deep into it currently.  


--- Quote ---Why be cheap, just buy a 2.5 HDD.  Easy.

--- End quote ---

For a couple projects in which I need Windows XP with a swap file I have no choice but to go that route...but the main reason I want to go with Compact Flash is that I can set up a 'system' that could be easily duplicated on my main computer and then just pop it into the next build I am going to work on.  Also making updates is very easy as I can pull the Compact Flash card out easily and pop it on my main computer.   It is a little harder to do that with a regular HDD.

Thanx,

Geo
leapinlew:

--- Quote from: jukingeo on June 18, 2011, 07:27:40 pm ---For a couple projects in which I need Windows XP with a swap file I have no choice but to go that route...but the main reason I want to go with Compact Flash is that I can set up a 'system' that could be easily duplicated on my main computer and then just pop it into the next build I am going to work on.  Also making updates is very easy as I can pull the Compact Flash card out easily and pop it on my main computer.   It is a little harder to do that with a regular HDD.

Thanx,

Geo

--- End quote ---

There are tons of ways you can easily duplicate a system, and how much more difficult would it be to pull a 2.5" HD and mount to an external 2.5" to USB adapter on a computer? Sure it'll be faster to do CF, but we are talking mere seconds.

I like the project, I think it sounds like a fun education project, but it's hard to come up with a practical reason to do it.
Navigation
Message Index
Next page
Previous page

Go to full version