Donate

Categories

Advert

XHTML

Valid XHTML 1.0 Transitional

Storage vs RAM Size

In a comment on my post Shared Objects and Big Applications about memlockd [1] mic said that they use memlockd to lock the entire root filesystem in RAM. Here is a table showing my history of desktop computers with the amounts of RAM, disk capacity, and CPU power available. All systems better than a 386-33 are laptops – a laptop has been my primary desktop system for the last 12 years. The columns for the maximum RAM and disk are the amounts that I could reasonably afford if I used a desktop PC instead of a laptop and used the best available technology of the day – I’m basing disk capacity on having four hard drives (the maximum that can be installed in a typical PC without extra power cables and drive controller cards) and running RAID-5. For the machines before 2000 I base the maximum disk capacity on not using RAID as Linux software RAID used to not be that good (lack of online rebuild for starters) and hardware RAID options have always been too expensive or too lame for my use.

Year CPU RAM Disk Maximum RAM Maximum Disk
1988 286-12 4M 70M 4M 70M
1993 386-33 16M 200M 16M 200M
1998 Pentium-M 233 96M 3G 128M 6G
1999 Pentium-2 400 256M 6G 512M 40G
2000 Pentium-2 600 384M 10G 512M 150G
2003 Pentium-M 1700 768M 60G 2048M 400G
2009 Pentium-M 1700 1536M 100G 8192M 4500G
2010 Core 2 Duo T7500 2200 5120M 100G 8192M 6000G

graph of RAM/disk sizes from the above table

The above graph shows how the modern RAM capacities have overtaken older disk capacities. So it seems that a viable option on modern systems is to load everything that you need to run into RAM. Locking it there will save spinning up the hard drive on a laptop. With a modern laptop it should be possible to lock most of the hard drive contents that are regularly used (IE the applications) into RAM and run with /home on a SD flash storage device. Then the hard drive would only need to be used if something uncommon was accessed or if something large (like a movie) was needed. It also shows that there is potential to run diskless workstations that copy the entire contents of their root filesystem when they boot so that they can run independently of the server and only access the server for /home.

Note that the size of the RAM doesn’t need to be larger than the disk capacity of older machines (some of the disk was used for swap, /home, etc). But when it is larger it makes it clear that the disk doesn’t need to be accessed for routine storage needs.

I generated the graph with GnuPlot [2], the configuration files I used are in the directory that contains the images and the command used was “gnuplot command.txt“. I find the GnuPlot documentation to be difficult to use so I hope that this example will be useful for other people who need to produce basic graphs – I’m not using 1% of the GnuPlot functionality.

2 comments to Storage vs RAM Size

  • Tom

    It would be really cool if a full featured desktop distro would work with this approach. Provide small stripped down packages and load everything to RAM and only suspend/resume from there on out.

    But sadly Distro makers are not visionaries .. if only I had the time and/or the money.

  • Ben Martin

    You might like to glance over this:
    http://ldn.linuxfoundation.org/article/generating-graphs-with-gnuplot

    You can plot multiple data series in a single command:
    set xlabel “Year”
    set ylabel “MB”
    set logscale y 10

    set key left

    plot “ram” using 1:2 with l smooth bezier title “ram”, \
    “max-ram” u 1:2 w l smooth bezier title “max ram”, \
    “disk” u 1:2 w l smooth bezier title “disk”, \
    “max-disk” u 1:2 w l smooth bezier title “max disk”

    I find bezier to be nicer to get overall trend impressions, the above makes this with a suitably configured ~/.gnuplot. See my ldn link above to see the core of my .gnuplot file.

    http://www.23hq.com/monkeyiq/photo/5427609