Solid state disk in a laptop to save power and make system fast.

Submitted by mgiammarco
on October 30, 2004 - 7:30am

Hello,
I would like to improve my laptop experience.
I am thinking to buy a compact flash to put in pcmcia-slot to use as place for /home /etc, perhaps /var and for reiser fs external journal.
I write now my ideas/questions:

- I have found that there are compact flash very fast, like sandisk extreme III at 22MB/sec;
- I have found cardbus compact flash adapters that goes very fast: are they supported by linux?
- Which file system should I use on compact flash to avoid wearing?
- I would like to use a part of compactflash as external journal for reiserfs: this combined with right parameters of laptop mode should give me extended periods of hard drive sleep with more data safety, am I right?
- I will also investigate cachefs filesystem to use flash as a cache for hard disk to extend disk down periods and improve performance.

If you are interested please help me!!
Thanks!

maybe not a good idea

on
October 30, 2004 - 10:44am

Most parts of the filesystem would be fine on a USB flash, but many would not. I think flash devices only support a limited number of accesses, I believe in the millions, but still something like /proc could kill your flash device more quickly than you would like. I'm guessing the journal would similarly not be good to put on the flash device. You mentioned putting /etc/ on there, which would be fine because it's pretty static, but that probably wouldn't speed anything up? Do you just want to do it for backup? My guess would be that only your directories containing binaries and or libraries might speed up the launching of certain programs, or the boot process.

If performance is you main objective, I don't think the flash device would do much for you, unless you had very little memory and were constantly swapping.

maybe yes

on
October 31, 2004 - 10:07am

Main objective is to conserve battery, and improve performance.
Please note that:

1) putting bin and lib in static does not speed up nothing, hard disk is already fast; on the opposite putting home var and other directories full of small files improve performance because it reduces seeks;
2) laptop mode makes hard disk spin down for 10 minutes, but you risk to lose 10 minutes of work. I thaught that a nice improvment would be letting linux write on the journal on flash until is full and then power up hard disk and write on it;
3) Writes on journal are sequential so flash consumption should be even distributed

I am still asking help for suggestions on best file system to use on compact flash or for solid state alternatives to put on pcmcia slot.

Thanks again.

It would probably be feasible

Anonymous
on
November 1, 2004 - 4:39am

It would probably be feasible to keep your binaries, etc on the hard drive, and just keep your home directory on the CF disk. Once your applications are loaded, you should only need to access the hard disk for logs, etc, to start other apps, or to swap.

It would probably be worthwhile analysing your system to see what is spinning up the disk each time, and seeing if you can eliminate those reads and writes.

As far as the file system on the CF disk goes, you might want to investigate some of the Flash File Systems that linux supports, which are designed to spread the writes around the entire space, rather than concentrating, say, directory writes in a single place, which could rapidly use up the 100,000 cycles available. It rather spreads them around, so that each location gets 10 cycles, and the overall disk lasts a lot longer.

Where to find more info?

on
November 1, 2004 - 5:33am

Thanks for replies.
Infact I need several info:
- I do not know how many alternatives of solid state can be used on linux
- I am not used to flash file systems
- I hope to receive some help from authors of laptop mode and cachefs patches

I hoped also that this forum was the one right for my idea, please tell me where I can also post this help request.

Thanks again

I belive many CF-cards do "re

Anonymous
on
November 1, 2004 - 4:06pm

I belive many CF-cards do "reordering of sectors" in hardware to spread writes.

Where to learn more?

Anonymous
on
December 2, 2004 - 9:05am

Has anybody tried this? Where can I find more info about what happens when you write too much on flash card?

Thanks!

Cachefs extension

Anonymous
on
November 25, 2004 - 11:05am

Hi Would it be possible to extend cachefs to only write the first say 50kb (depending on the access times and sequential speeds of both the hard drive and flash drive) of any sequentially read or written piece of data. This would cause the flash disk cache to contain all small files and beginnings of large files leveraging very high random read or write performance. Ofcourse it chews up the flash disk lol but some flash disk products have built in mechanisms to spread writes over the disk.

mcachefs

Leonard (not verified)
on
February 14, 2007 - 3:28pm

Perhaps its worth looking at mcachefs. It is implemented in userspace using FUSE. I haven't tried yet, but it sould be easier to test and modifiy.

Hard drive throughput is fast

Anonymous (not verified)
on
April 13, 2005 - 11:00pm

Hard drive throughput is fast, seek time is slow compared to flash drives so you will see a significant performance improvement in program load times.

Flash filesystems

Anonymous (not verified)
on
July 22, 2006 - 3:12pm

Flash filesystem only work on devices where it is possible to
select which flash sector is read/written/erased. Compact flash
and USB devices use an internal varying map that converts
the requested sector into the physical sector on the device.
This is done because some operationg systems are too inflexible
to handle ware leveling. It is possible to use flash emulation
on any block device so you could use JFFS2, but it would be
pointless as you would just get two layers of ware leveling.
JFFS2 is not fast - the entire device must be read to find which
sectors are which before the filesystem can be mounted.

The ware leveling algorithm for CF and USB devices is probably
optimised for FAT. Other filesystems might possibly reduce the
effectiveness of the algorithm.

The mount option nodiratime is your friend. It prevents the
access time field on directories from being maintainted. As this
field is hardly ever used, it is a waste of disc accesses.
There is also a noatime option which applies to files. You
probably want that too.

Putting a journal on CF is not a disaster - the ware leveling
will scatter the writes all over the flash. Each sector can
be erased at least 1000,000 times on modern chips, so at 22MB/s,
a 256MB CF card would not be able to store a 32MB journal after
about 3 years of continous abuse. This assumes that the CF card
is mostly empty, which gives the ware leveling algorithm the most
choice about which sector to erase. If the device is mostly full,
about one in 20 writes will also move some static data to a worn
sector, increasing the number of writes.

The best choice of filesystem is probably unionfs. This will
let you store different types of file in the most appropriate
filesystem. Cramfs could be a good choice - it provides good
compression for static data. Knoppix compresses an ISO image
for the bulk of its data. (Not the same as transparent compression,
which compresses individual files on an ISO image.)
It is possible to compress memory instead of swapping it
immediately so only compressed data is swapped out.
You do want to use compression on static data because it
effectively increases your transfer rate. Compression on
chaning data is more questionable - it depends on how well your
data compresses.

Install plenty of RAM to prevent swapping, and to get the
most benefit from caching.<.p>

Standard PCMCIA will not get you 22MB/s transfer rate. You need
a cardbus CF adapter and a cardbus slot in you laptop. If the
kernel supports your PCMCIA interface at all, then it is very
likely it will support cardbus is the hardware is capable.

There is an article on
linuxjournal
about setting the harddisk spindown time and linux kernel flush
interval to get the best battery life out of your laptop.

Proc, sysfs, devpts and some other filesystems are virtual.
reading and writing these filesystems does not cause any
disk access, so it does not matter which device holds the mount
point.

SSDs available

on
July 22, 2006 - 1:28pm

I purchased a PQI SSD from http://www.dvnation.com/ssd.html . My laptop boots in only 26 seconds using that drive. Even with a reported 15MB/s SUSTAINED throughput, since access time (seek time) is over 10X faster than any hard drive, it really feels snappy. Uses less power too. PQI is coming out with a 2.5" 64GB SATA drive in August or Sep. Samsung is coming out with IDE version in late Q3 / early Q4. Hitachi is coming out with NAND /DRAM drives next year. Really exciting!

Here's a product

on
July 24, 2006 - 10:28am

http://www.geeks.com/details.asp?invtid=77P1686&cat=HDD&cpc=DSP

I'm using this for a Windows XP install that is on a read only partition for long term use. Hardware is fanless brick 1.5ghz Pentium M.

Features/Specifications:

* 2 GB Fast Flash Disk (FFD) IDE Plus 2.5-Inch Hard Drive

* General Features:
* 2 GB capacity
* 2.5-inch form factor with case height from 8.5mm to 34.2mm
* ATA-3 with DMA 0-2 and PIO 0-4 transfer modes
* 16.7 MBytes/sec burst read/write rate
* 8.3-8.7 MBytes/sec sustained read rate (DMA 2)
* 8.0-12.0 MBytes/sec sustained write rate (DMA 2)
* Quick security erase in seconds
* Sanitize confidential data, comply with NISPOM DoD 5220.22-M, NSA 130-2,Air Force AFSSI 020, Army 380-19 and Navy NAVSO P-5239-26
* TrueFFS technology
* >5,000,000 Write/Erase cycles, unlimited Read
* Enhanced endurance by dynamic wear-leveling
* SMART (Self-Monitoring, Analysis and Reporting Technology)
* Data integrity under unstable power conditions
* MIL-STD 810F and NEBS Level 3 compliant

I recommend the PQI SSD. You

on
July 24, 2006 - 12:58pm

I recommend the PQI SSD. You can get them as small as 4GB. Their rated speed of 15MB/s is notably faster than a device that is only 8 to 10MB/s. The site you mentioned says that SSD you are looking at is not in stock. http://www.dvnation.com/ssd.html has the PQIs. 2 weeks for delivery.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.