Slashdot Mirror


How To Use a Terabyte of RAM

Spuddly writes with links to Daniel Philips and his work on the Ramback patch, and an analysis of it by Jonathan Corbet up on LWN. The experimental new design for Linux's virtual memory system would turn a large amount of system RAM into a fast RAM disk with automatic sync to magnetic media. We haven't yet reached a point where systems, even high-end boxes, come with a terabyte of installed memory, but perhaps it's not too soon to start thinking about how to handle that much memory.

83 of 424 comments (clear)

  1. 1 TB of memory... by Digi-John · · Score: 5, Funny

    Finally, I'll have enough space to run Firefox, OpenOffice, and Eclipse *all at the same time*! As long as I don't leave Firefox running too long.

    --
    Klingon programs don't timeshare, they battle for supremacy.
    1. Re:1 TB of memory... by smittyoneeach · · Score: 4, Funny

      You are wise to avoid discussion of emacs...

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:1 TB of memory... by Digi-John · · Score: 2, Informative

      emacs is a Lisp interpreter, an editor, a games package, an irc client, many things, but its memory usage is just a drop in the bucket compared to the monstrosities I mentioned above. Of course, there's quite a few complete operating systems that can boot in the amount of RAM required by emacs :)

      --
      Klingon programs don't timeshare, they battle for supremacy.
    3. Re:1 TB of memory... by digital+bath · · Score: 5, Funny

      Of course, there's quite a few complete operating systems that can boot in the amount of RAM required by emacs :)

      emacs, for starters
      --
      find / -name "*.sig" | xargs rm
    4. Re:1 TB of memory... by osu-neko · · Score: 5, Funny

      Of course, there's quite a few complete operating systems that can boot in the amount of RAM required by emacs

      Yes, but they're substantially less functional operating systems than Emacs.

      --
      "Convictions are more dangerous enemies of truth than lies."
    5. Re:1 TB of memory... by frovingslosh · · Score: 5, Insightful
      I'm not sure why people are rating your post as funny. I have not had moderator points in a long time, but if I did I would mark it insightful.

      As to the problem of how to use 1 TB of RAM, spending any time at all thinking of this is foolish and wasteful. Of course, I remember the days when we rated our computers in how many kilo bytes of memory we had, and plenty of readers here will remember having 20 to 40 meg hard disks in PC's with far less than 1 meg of physical RAM memory. In those days (and I'll avoid the famous Bill Gates quote on the subject), how would you have spent your time deciding what to do with the memory if you had a computer with 1 gig, 2 gig or even 4 gig of memory? You may have come up with all sorts of amazing ideas. But none of them would have done you any good, because the developers (Mostly Microsoft, but Linux is far from lean and mean any more either) already decided what to do with it, waste it and leave you wanting more. And one of your ideas for a 4 gig system might not have even been to just pretend that most of the last gig of memory wasn't there and ignore it!

      So why even have a post about what to do with a terabyte of memory? The solution is simple, install Windows 9 and try to quickly order more memory on-line before the memory hungry service pack comes out, forces it's install on you, and your TB isn't enough.

      --
      I'm an American. I love this country and the freedoms that we used to have.
    6. Re:1 TB of memory... by jrockway · · Score: 4, Interesting

      It's interesting how times have changed. Over the years, emacs has used pretty much the same amount of memory. (My big emacs with erc and gnus is using about 67M right now. Firefox is using 1.7G.)

      In the 80s, the overhead of a lisp machine just to make your application customizable was absurd (hence the emacs jokes). Writing an editor all in C was a great idea. Speed! Memory savings! This approach made vi very popular.

      Now that it's 2008 and every new computer has a few gigs of RAM, it's not so absurd to write an editor in a dynamic language running on top of a minimal core. An experienced elisp coder can add non-trival functionality to emacs in just a few hours. emacs makes that easy and enjoyable.

      vi(m) may use less memory, but that just doesn't matter anymore. If you want to customize it (non-trivially), you have to hack vim and recompile. So while emacs jokes are hilarious, it dates you to the early 80s. There is no reason to write tiny apps in assembly anymore. Big apps that can be extended are a much better approach.

      --
      My other car is first.
    7. Re:1 TB of memory... by Bandman · · Score: 4, Interesting

      virtual machines. lots of 'em

    8. Re:1 TB of memory... by dgatwood · · Score: 2, Insightful

      Eighty Megamebibytes And Constantly Swapping?

      Besides, isn't it obvious how one should use a terabyte of RAM? Use it to upgrade your PC to run Windows Vista MegaUltimate, of course. :-D

      Or, to put it another way, the question of what to do with the extra RAM is a non-issue. Install software. Software developers will find a way to waste as much RAM as you can put in and performance will still be slow. It's just the nature of progress....

      *sigh*

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    9. Re:1 TB of memory... by Digi-John · · Score: 2, Interesting

      I see by your sig that you're a Lisp programmer :)
      I don't program much in Lisp, although I have some familiarity with it, but on Linux my editor and my window manager are both written in Lisp: emacs and stumpwm. They work quite well... stumpwm includes an entire lisp interpreter in its binary and comes in at just 33M; you can hit C-t : at any time to evaluate a Common Lisp expression, and of course the window manager can be modified on the fly if you're a leet haxxor.

      --
      Klingon programs don't timeshare, they battle for supremacy.
    10. Re:1 TB of memory... by dougmc · · Score: 2
      Sorry, but jokes about emacs memory usage are old and busted. Emacs, even xemacs, is memory frugal by today's standards! (And yes, vi is even more so.)

      The new hotness in memory suckage is anything based on java.

    11. Re:1 TB of memory... by rbanffy · · Score: 4, Funny

      It's a nice OS. Too bad it lacks a decent text editor ;-) /me ducks

    12. Re:1 TB of memory... by wsanders · · Score: 2, Funny

      Yeah, I look forward to our new "java -Xms1000000000" incompetent overlords.

      --
      Give a man a fish and you have fed him for today. Teach a man to fish, and he'll say "WHERE'S MY FISH, YOU IDIOT?"
    13. Re:1 TB of memory... by Shai-kun · · Score: 5, Funny

      Doesn't emacs run vi by now?

      --
      ...or so I've been told.
    14. Re:1 TB of memory... by Usquebaugh · · Score: 5, Insightful

      In the early 80s there was this funny machine called a System/38 from IBM that morphed in the AS/400 that is now called an iSeries. Now this machine was a RDBMS engine with simple green screens attached.

      Under the covers the System/38 was a cisc box, the AS/400 could be CISC or RISC and the iSeries is all risc. From an app dev point the same compiled object code could run on all three. Stop and think about for a second.

      Now the System/38 had a very advanced constraint based security system. For example you could use an object that you could not see. But in general is allowed for very fine grain control of security. Of course this has been improved throught to the iSeries.

      Also, this machine had a single address space for all storage. An app didn't need to worry about memory size, the machine automatically used ram as disk and disk as ram.

      Of course this machine has had a life of 30+ years and most OS designers have zero idea about just how revolutionary it is same sort of thing as the MCP for a Burroughs B5000. People who do not know history are doomed to repeat it over and over again.

    15. Re:1 TB of memory... by masterzora · · Score: 5, Funny

      Fortunately, you can run vi inside emacs, so it does indeed have a good text editor.

      --
      Remember, open source is free as in speech, not free as in bear.
    16. Re:1 TB of memory... by hey+hey+hey · · Score: 3, Insightful
      vi(m) may use less memory, but that just doesn't matter anymore. If you want to customize it (non-trivially), you have to hack vim and recompile. So while emacs jokes are hilarious, it dates you to the early 80s. There is no reason to write tiny apps in assembly anymore. Big apps that can be extended are a much better approach.

      Give it up, this is a religious war. Those of us who prefer vi(m) consider it a more focused editor. We neither need, nor want the extensibility crave. Those of you who prefer emacs consider the extensibility vital to your work, and can't imagine how anyone can live without it.

      We have been debating this forever, and will continue to do so, as long as there are vi(m) and emacs users out there. There is no "right" answer, so just enjoy the jokes (they are normally harmless, and often good for at least a smile).

    17. Re:1 TB of memory... by blair1q · · Score: 3, Funny

      You don't customize emacs. It customizes you.

    18. Re:1 TB of memory... by Anonymous Coward · · Score: 2, Informative

      It does indeed, the implementation of vi for emacs is called viper, there might be another one as well, but I'm not sure.

    19. Re:1 TB of memory... by yorde · · Score: 3, Funny
    20. Re:1 TB of memory... by Arethan · · Score: 2, Funny

      At least they come with a decent text editor.

    21. Re:1 TB of memory... by BiggerIsBetter · · Score: 3, Funny

      You don't customize emacs. It customizes you. In Russia.
      --
      Forget thrust, drag, lift and weight. Airplanes fly because of money.
    22. Re:1 TB of memory... by 313373_bot · · Score: 2, Funny

      My very own internets?

      --
      ^[:q!
  2. You only need 16GB of RAM for this to be useful by 2nd+Post! · · Score: 5, Insightful

    Given that the core components of an OS are only a few GB, even 8GB systems might be able to do this, today.

    1. Re:You only need 16GB of RAM for this to be useful by Digi-John · · Score: 3, Funny

      640K should be enough for anyone.

      --
      Klingon programs don't timeshare, they battle for supremacy.
    2. Re:You only need 16GB of RAM for this to be useful by Kjella · · Score: 5, Insightful

      Personally I just wish there was better cache hinting on current software. For example, playing a huge movie will swap out all my software to disk even though the 30GB Blu-Ray movie will likely be played start-to-finish once and give no benefit whatsoever. To the best of my knowledge (at least I've never seen it exposed to any API I've used), there's nothing like "Open, for reading, with READ cache but don't bother keeping it around in SYSTEM cache" flags.

      --
      Live today, because you never know what tomorrow brings
    3. Re:You only need 16GB of RAM for this to be useful by Dolda2000 · · Score: 2, Interesting
      Yeah, imagine, then, to be able to use such a fast disk as your swap device! That'll make your system swiftz0rs. Or, hey, wait a minute...

      In all honesty, though, I don't really get the point of this. Isn't the buffer cache already supposed to be doing kind of the same thing, only with a less strict mapping?

    4. Re:You only need 16GB of RAM for this to be useful by Ed+Avis · · Score: 2, Interesting

      Database systems use that sort of thing all the time, telling the kernel not to bother caching their file I/O but send it straight to disk (of course, they have their own cache configured by the database administrator). Typically if it needs to scan table more than the size of available memory, it reads the data from start to finish off the disk but doesn't cache any of it.

      --
      -- Ed Avis ed@membled.com
    5. Re:You only need 16GB of RAM for this to be useful by exley · · Score: 2, Informative

      Things like this (somewhat smaller scale) already are (somewhat bigger scale) being done.

    6. Re:You only need 16GB of RAM for this to be useful by QuoteMstr · · Score: 5, Insightful

      See posix_fadvise. Using that API, a process can have as much control over a file as it needs; too bad the kernel does basically nothing with that information.

    7. Re:You only need 16GB of RAM for this to be useful by Anonymous Coward · · Score: 5, Interesting

      Did I hear a summer of code application?

    8. Re:You only need 16GB of RAM for this to be useful by zappepcs · · Score: 2, Insightful

      Go a couple of steps further. Today's motherboards are designed to support one cpu system and a compatible OS. Why not design them to support multiple cpu systems. A VME system will allow you to plug in multiple CPU cards and memory cards, map your apps to the right memory space, share memory.

      Something similar could be done with one supervisor cpu handling video mapping for multiple slave cpu's as well as managing a RAID-5 or better disk system that is partitioned and mapped to RAM disk mirror/buffers. Most home users are not having threading issues, they see I/O bottlenecks. When your bittorrent client is downloading and buffering a file while you are trying to watch a DVD it's difficult to get a full system clamav scan done in the background. Using multiple systems, this would be possible and easy. The supervisor system could give you Picture in Picture or tiled views of the video displays of all slave systems, so that while watching the DVD, if there is a pop up window from your system scan it shows in the upper corner somewhere.

      Sharing hardware among processes works, but if you really want speed, you need each process to have the full attention of the cpu. More RAM and specialized hardware would allow that for multiple processes. Tasks could be shared out by the supervisor to any non-active processors on the system such that by initializing a virus scan via the supervisor, it pushes the process off to the most available slave system cpu.

      Well, that is the thought. I'm certain that many will tell me why it won't work. I just think that if you are going to make specialized hardware you should do more than a bit extra RAM. Go full on with mini clusters or supervised slave systems.

      I currently sit infront of four screens at work. I'd like them all to be in the same box if possible, thanks. Running VMs might be an idea, but I like how they work separately too much. Yes, I would add one NIC for each slave system also.. they're cheap.

      Once you see the size of some mini-atx boards, it's not inconceivable that you could put 5 cpu systems in one tower case and have a 1TB RAID-5 system in there also. You just need a bit of specialized hardware, and some drivers to make it all look/feel real to the slave systems. You could support built-in video and NICs on the cpu system plug-in cards if you wanted. Treat it like a special motherboard with 4+ slots for system-on-module expansion cards. The variants of the PCI standard would make it fairly easy... I think

    9. Re:You only need 16GB of RAM for this to be useful by dougmc · · Score: 2, Interesting
      An Azul Vega 2 7280 can have up to 768 MB of RAM -- and fits in 14U of rack space. It also has up to 16 cpus giving you a total of 768 cores. Crazy stuff!


      Granted, it doesn't run Linux (or if it does, it's kept hidden from the user.) But with these awesome specifications, I have to wonder why they don't just sell general purpose computers -- people would port Linux to them, and they'd clean up! Is there something special about their processors that they're good at doing java or what?

    10. Re:You only need 16GB of RAM for this to be useful by beuges · · Score: 4, Interesting

      Yeah, except Vista already does aggressive caching and makes full use of RAM that isn't currently being used by applications, but slashdot keeps going on about how its a bloated piece of crap that uses 2GB of RAM when idle. Yet they don't complain that their system runs a lot smoother thanks to prefetching which analyses program usage and preloads (in the background) data that it anticipates being loaded from disk in the future.

      Here's a question... if you actually had a system that had 1TB of RAM, wouldn't you like to see a lot of your hard drive contents being loaded into RAM in the background because you have the RAM to store it, and you know that it can be discarded at any time because its just cache memory and not committed memory? I mean, you've gone to all the trouble and cost of getting yourself that much RAM... do you ONLY want to ever make use of it all on the rare occasion you need to edit a 500megapixel picture in photoshop? Do you want your ram to sit idle the rest of the time, and have your hard drive grind away because /. would rather see the OS use 100mb of ram at idle and have the rest doing nothing?

    11. Re:You only need 16GB of RAM for this to be useful by Daniel+Phillips · · Score: 2, Informative

      Yeah, imagine, then, to be able to use such a fast disk as your swap device! That'll make your system swiftz0rs. Bingo. That is one way you can use the Violin 1010 without needing any special backing to disk at all. In fact, this is a nigh-on perfect use of the device, because the 2x8x PCI-e bus connection, while fast, is still not as fast as main memory. But the swap subsystem knows now to manage that latency increase quite nicely. Such a swap arrangement will even tend to bring things back in balance as far as the Linux VM goes, since in the good old days when swap was invented, disk was only two or three orders of magnitude slower than memory instead of 5 orders like today.

      Or, hey, wait a minute... In all honesty, though, I don't really get the point of this. Isn't the buffer cache already supposed to be doing kind of the same thing, only with a less strict mapping? Indeed, less strict, and it also does not know how to flush dirty cache to disk and switch to synchronous mode when running on UPS power, or how to fully populate the cache as fast as possible on startup. Indeed, buffer cache can be taught these things, but I have already created a block driver to do it, which has the added benefit of supplying a nice general interface that will no doubt be repurposed in ways I did not think of. Maybe after Ramback is really solid I will create a variation that sits right in the VFS, though actually there are other more important projects in the pipe so anybody who wants to do that, be my guest.
      --
      Have you got your LWN subscription yet?
    12. Re:You only need 16GB of RAM for this to be useful by shapor · · Score: 3, Informative

      posix_fadvise() technically does allow you to do what you want. You can use posix_fadvise(POSIX_FADV_DONTNEED) to evict the buffer cache in the IO loop of the program. See http://insights.oetiker.ch/linux/fadvise.html for the ugly details. Unfortunately you can't just make one system call and have it effect an entire file or process. POSIX_FADV_NOREUSE is supposed to be the default in the kernel buffer cache management so it is implemented as a no-op.

    13. Re:You only need 16GB of RAM for this to be useful by GigaplexNZ · · Score: 2, Interesting

      if you actually had a system that had 1TB of RAM, wouldn't you like to see a lot of your hard drive contents being loaded into RAM in the background Not really. Vista does this already. Too bad it copies a 700MB ISO into memory every time I reboot (even though I have only used it once) and then proceeds to attempt to load 5 more ISOs each around 2GB. I have 2GB of RAM, which means it is copying all this data into a circular cache overwriting anything that might be useful. All I want it to do is cache system libraries and frequently used applications, not obscure user data.
  3. Add-Free one-page Version of the story by saibot834 · · Score: 4, Informative

    For those of you who don't have Adblock: Printerfriendly Version

    1. Re:Add-Free one-page Version of the story by Freedom+Bug · · Score: 4, Informative

      Here's a much better link on Jon Corbet's own site, the famous Linux Weekly News:

      http://lwn.net/Articles/272011/

  4. Memory usage by qoncept · · Score: 4, Interesting

    I would think that, since we aren't even close to having boxes with more memory than we actively use, and RAM isn't growing any faster than we are using it up, that using it as a "disk" is even further off than the article would seem to imply.

    --
    Whale
    1. Re:Memory usage by Bryansix · · Score: 2, Insightful

      For some uses we use all the RAM and for others we don't. For instance I think WIN98 boot disks create a RAMDRIVE which is pretty usefull when you can't access any of your hard drives because they aren't formatted or partitioned.

    2. Re:Memory usage by wizardforce · · Score: 5, Interesting

      since we aren't even close to having boxes with more memory than we actively use
      640k should be enough for anyone. you do realize that the fact that computer manufacturers are happy bundling over 2 gigs of RAM in a default install so it runs Vista all prettily gives the linux users of us a fantastic advantage when we don't use anywhere near that on a regular basis. there are already linux distros that are small enough as to be sitting entirely in RAM, some even small enough to run on the L2+3 cache if you like. being able to do things like this is going to be a major advantage.
      --
      Sigs are too short to say anything truly profound so read the above post instead.
    3. Re:Memory usage by Ephemeriis · · Score: 3, Insightful

      RAM is getting cheaper every day. Capacity is constantly growing. I just bought 4 GB RAM for about the same price I paid a few years ago for 1 GB. Right now I could build a system with 16 GB RAM without breaking the bank, all from basic consumer-grade parts available on NewEgg. It isn't going to be long before we see systems with more RAM than we know what to do with. Turning a chunk of it into a big RAMdisk sounds like a good idea to me.

      --
      "Work is the curse of the drinking classes." -Oscar Wilde
    4. Re:Memory usage by geekoid · · Score: 2, Interesting

      well I wish 64 Bit would get pushed and 32 Bit activly phased out. as in, stop making it.

      I can get a 64bit mobo, 64bit proc, and still ahve problem finding on that can take more then 8Gigs of ram.

      I want to load up my games into a ram disk and play them from their. I've didi it in the bad ol'/good ol' days. I want to put a 2 hour movie entirely in RAM. I want 100+gigabytes of RAM, damn it. I've beens tuck at 4 Gigs for years. ENough already.

      also, I want a pony.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  5. One Terabyte by Cedric+Tsui · · Score: 4, Funny

    One Terabyte ought to be enough for anybody.

    1. Re:One Terabyte by Captain+Splendid · · Score: 4, Funny

      One Terabyte ought to be enough for anybody.

      Obviously you're running windows XP, not Vista!

      --
      Linux, you magnificent bastard, I read the fucking manual!
  6. Windows 7? by Lectoid · · Score: 4, Funny

    See also, Windows 7 minimum requirements.

    --
    Is it just me, or do you hate it when people say "Is it just me..."?
  7. Vista SP1 by sakdoctor · · Score: 3, Funny

    Is that the recommended or minimum requirement?

  8. 8 GB by Rinisari · · Score: 5, Funny

    I have 8 GB of RAM and rarely use more than four of it unless I'm playing a 64-bit game which eats it up (Crysis). Yes, I am running both 64-bit Linux and Windows.

    One time, I opened up more than a thousand tabs in Firefox just because I could.

    1. Re:8 GB by Gr8Apes · · Score: 2, Informative

      I run Oracle on Linux - it barely fits into 4GB. Add in a few other daemons, and I can easily fill 8GB.

      --
      The cesspool just got a check and balance.
  9. Power Failure by Anonymous Coward · · Score: 3, Informative

    One important thing to consider, is that if using a ramdisk for important stuff, what happens when the power dies?

    For example, will the stuff synced from magnetic media be stored elsewhere? If so, what happens to the speed?

    -B

    1. Re:Power Failure by itsjz · · Score: 5, Informative
      There's about three paragraphs in the article discussing this. Basically, use a UPS:

      If line power goes out while ramback is running, the UPS kicks in and a power management script switches the driver from writeback to writethrough mode. Ramback proceeds to save all remaining dirty data while forcing each new application write through to backing store immediately.
    2. Re:Power Failure by Znork · · Score: 3, Insightful

      Basically, use a UPS

      Then it goes on with the other questions, like, what if the hardware or kernel crashes and answers them with 'use things that don't crash'.

      Agh. I mean, that's really, really bad engineering. You don't engineer things with the assumption that everything will work. You engineer them to fail gracefully when everything that can go wrong does go wrong. And preferably with margin.

      If the system requirements for this are UPS, crashproof hardware and a completely bug-free OS, well, I'm sorry, but there's no system in the world capable of fulfilling the requirements.

      Still, I'm sure there are cases where it's useful; as long as speed is of higher importance than data integrity, this sounds very useful.

  10. With that much RAM... by erroneus · · Score: 2, Insightful

    ...I might be able to run Vista!!! (I wonder how many people have written this prior to me already?)

    It's a lot of RAM and at today's computational speeds, it's not likely that it could be used for anything beyond a RAM drive.

    Is it too soon to think about how to use that much RAM? NO! It's the lack for forward thinking that caused a lot of artificial limitations that have been worked around in the past. We're still dealing with limitations on file systems and the like. I've got an old Macintosh that can't access more than 128GB or something like that because its BIOS can't handle it... I had to get another PCI controller installed to handle larger drives.

    What it is time to think about is now to code without such limitations built-in. This would better enable things to grow more easily and naturally.

  11. The problem with giving Windows 1TB... by Gybrwe666 · · Score: 4, Funny

    The System Tray would end up filling most of my dual monitors with all the crap Microsoft will inevitably find "necessary" to run the OS, leaving me with a small, 640x480 patch and approximately 640k for applications.

    1. Re:The problem with giving Windows 1TB... by W2k · · Score: 3, Informative

      If you run MS SQL Server and don't manage the RAM then it will use it all just for the fun of it.

      If you find this in any way strange, wrong or confusing, perhaps you should read up as to what the primary purpose of a frikkin' DATABASE SERVER is.

      Here's a hint: the more data it can keep readily accessible (that is, in RAM) the better it will perform. And as you mentiones, you can of course set it to use less RAM if you have to. It's just that it's optimized for performance by default.

      --
      Quality, performance, value; you get only two, and you don't always get to pick.
  12. uh - there is at least one system with 1TB of RAM by Anonymous Coward · · Score: 5, Informative

    You wrote: "We haven't yet reached a point where systems, even high-end boxes, come with a terabyte of installed memory" - this is not true. Sun's E25k can go over 1TB of memory.....

  13. How ? by herve_masson · · Score: 5, Funny

    // Use 1TB of RAM
    char *ptr=malloc(1099511627776);
    memset(ptr,1,1099511627776);

  14. nothing new here by dltaylor · · Score: 3, Informative

    Linux gobbles free RAM to add to the buffer cache. This is already a large RAM disk with automatic sync. In embedded systems, you can even decouple the buffer cache from any physical media and just live in a variable size RAM disk, which means that Linux finally catching up to AmigaDOS.

  15. What about copy-on-write for executables? by Enleth · · Score: 3, Interesting

    I'm using regular ramdisks initalized with data on bootup, composited with temporary, empty disk partitions using unionfs and synchronized back to their real partitions on powerdown, so that I have an extremely fast read time for most things contained on such a disk and conventional write-reread times. However, the problem is that for the upper layers of the kernel, those ramdisks are not RAM at all, just some other block device around - and when it comes to loading executables and libraries, they are copied, well, from memory to memory. What's missing is some way to tell the damn thing to use the data pages that already are there and issue a copy-on-write only when required. If this mechanism can do that - well, I'll be in as soon as they make it a little bit more fault-tolerant.

    --
    This is Slashdot. Common sense is futile. You will be modded down.
  16. Not so far off by Guspaz · · Score: 3, Interesting

    Current high-end server boards support up to 64GB of RAM (16 slots, 4GB DIMMs).

    By Moore's Law, we should hit 1TB in a high-end server 6 years, high-end desktops (assume 8GB of RAM, currently selling for $180 CAD) in 10.5 years, and the average midrange desktop (assume 2GB of RAM, currently selling for $45 CAD) in 13.5 years.

    We might be a while off in consumer applications, but for high-end servers, 6 years doesn't seem very far away.

  17. Re:1TB of RAM is available today in a server by thinduke · · Score: 2, Informative

    IBM p595 can have 1TB of RAM too. And yes, they run Linux.

  18. Re:1TB of RAM is available today in a server by thatskinnyguy · · Score: 2, Informative

    Something like this one?

    --
    The game.
  19. Oh yea? by SeePage87 · · Score: 5, Funny

    Well I can do cock push-ups.

  20. Video Streaming Server by JoeRandomHacker · · Score: 3, Interesting

    Check out the specs on the Motorola (formerly BroadBus) B-1 Video Server:

    http://www.motorola.com/content.jsp?globalObjectId=7727-10991-10997

    Sounds like a good use for a terabyte of RAM to me.

    Disclosure: I currently work for Motorola, but I don't speak for them, and don't have any involvement with this product beyond salivating over it when it was announced that we were buying BroadBus.

  21. We'll be there soon enough. by darkmeridian · · Score: 2, Interesting

    Ten years ago, my PC had 8 megs of system RAM. My laptop now has four gigs of RAM. In ten more years, I am sure we'll have a terabyte of RAM.

    --
    A NYC lawyer blogs. http://www.chuangblog.com/
  22. take it to the next step... by ecloud · · Score: 4, Interesting

    If you are planning on having a few minutes' worth of UPS backup then why would you need to write to the hard drive continuously? Keep the hard drive spun down (saving power). If the system is being shut down, or AC power fails, then spin up the drive and make a backup of your ramdisk, thus being ready to restore when the power comes back up.

    Next step beyond that: stop using a filesystem at runtime. Just assume your data can all fit in memory (why not, if you have a terabyte of it?) This simplifies the code and prevents a lot of duplication (why copy from RAM to RAM, just to make the distinction that one part of RAM is a filesystem and another part is the working copy?) But you will need a simple way to serialize the data to disk in case of power-down, and a simple way to restore it. This does not need to be a multi-threaded, online operation: when the system is going down you can cease all operations and just concentrate on doing the archival.

    This assumption changes software design pretty fundamentally. Relational databases for example have historically been all about leaving the data on the disk and yet still fetching query results efficiently, with as little RAM as necessary.

    Next step beyond that: system RAM will become non-volatile, and the disk can go away. The serialization code is now used only for making backups across the network.

    Now think about how that could obsolete the old Unix paradigm that everything is a file.

  23. Re-inventing the disk cache wheel by flyingfsck · · Score: 3, Interesting

    Geez, I wrote a floppy disk cache driver as a programming homework exercise in the 1980s. Talk of re-inventing the wheel...

    --
    Excuse me, but please get off my Pennisetum Clandestinum, eh!
  24. cachefs by argent · · Score: 2, Informative

    A fully caching file system that could be layered on top of your network or disk file system. Sun did this for dataless workstations and it worked pretty well.

    Another historically interesting ram file system was the Amiga Recoverable RAM Disk. You coudl even boot off it.

  25. Re:Cache as RAM, RAM as hard disk by darkpixel2k · · Score: 2, Interesting

    Use a large geographically distributed cluster with the ability to pxe boot off each other.

    Then a power outage wouldn't be an issue. Power comes up, machine PXE boots off a machine in a neighboring town, state, country, whatever.

    I know--not really feasible, but you'd be the king of basement dwellers if you could pull it off...

    --
    There's no place like ::1 (I've completed my transition to IPv6)
  26. Floating point voxel octree Google Earth by heroine · · Score: 3, Interesting

    Still think the floating point voxel octree version of Google Earth will use that memory before any ramdisk gets it.

  27. Mobile much? by tepples · · Score: 5, Insightful

    Now that it's 2008 and every new computer has a few gigs of RAM Handheld computers don't.

    There is no reason to write tiny apps in assembly anymore. Other than the fact that embedded systems outnumber PCs?
  28. Re:uh - there is at least one system with 1TB of R by Dammital · · Score: 2, Informative

    IBM's just-announced z10 mainframe, with 1.5 TB memory.

  29. Speed vs tmpfs? by SanityInAnarchy · · Score: 5, Interesting

    How it seems to work:

    Actual "ramdisk" -- that is, like /dev/rd -- that is, appears as a block device. You can run whatever filesystem you want on it, but it's still serializing and writing out to... well, RAM, in this case. No sane way for the kernel to free space on that "disk" that's not actually used.

    How I wish it worked:

    No Linux that I know of has used an actual ramdisk in forever. Instead, we use tmpfs -- a filesystem which actually grows or shrinks to our needs, up to an optional configurable maximum size. It'll use swap if available/needed. It's basically a RAM filesystem, instead of a RAM disk.

    Even initrds are dead now -- we use initramfs. Basically, instead of the kernel booting and reading a ramdisk image directly to /dev/rd0, it instead boots and unpacks a cpio archive (like a tarball, but different/better/worse) into a tmpfs filesystem, and uses that.

    So, how I would like this to work is, use a tmpfs filesystem -- as I suspect it will be faster, and in any case simpler, than a ramdisk -- and back it to a real filesystem on-disk. The only challenge here is that it's not as deterministic -- it would be more like a cp than a dd.

    An even better (crazier) idea:

    Use a filesystem like XFS or Reiser4 -- something which delays allocation until a flush. In either case, it would take a bit of tweaking -- you want to make sure no writes, or fsyncs, block while writing to disk, so long as the power is on -- but you'll hopefully already be caching an obscene amount anyway, so reads will be fast.

    In this case, forcing everything out to disk could be as simple as "mount / -o remount,sync" -- or something similar -- forcing an immediate sync, and all future writes to be synchronous.

    Conclusion:

    Either of the two ideas I suggested should work, and could perform better than a traditional ramdisk. If it is, in fact, a simple disk-backed ramdisk (not ram filesystem), then it's both not as flexible (what if your app suddenly wants 50 gigs of RAM in application space?) and a bit of a hack -- probably a hack around traditional disk-backed filesystems not being able to take advantage of so much RAM by themselves.

    In fact, glancing back at TFA, it seems there are some inherent reliability concerns, too:

    If UPS power runs out while ramback still holds unflushed dirty data then things get ugly. Hopefully a fsck -f will be able to pull something useful out of the mess. (This is where you might want to be running Ext3.)

    Now, true, this should never happen, but in the event it does, the inherent problem here is that the ramdisk doesn't know anything about the filesystem, and so it doesn't know in what order it should be writing stuff to disk. Ext3 journaling makes NO sense for a ramdisk when the ramdisk itself knows nothing about the journal -- the journal is just going to slow down the RAM-based operation. Compare this to a sync call to XFS -- individual files might be corrupted, but all the writes will be journaled in some way, so at least the filesystem structure will be intact.

    This gets even better with something like Reiser4's (vaporware) transaction API. If the application can define a transaction at the filesystem level, then this consistent-dump-to-disk will happen at the application level, too. Which means that while it would certainly suck to have a UPS fail, it wouldn't be much worse than the same happening to a non-ramdisk device, at least as far as consistency goes. (Some data will be lost, no way around that, but at least this way, some data will be fine.)

    --
    Don't thank God, thank a doctor!
  30. memory test by Skapare · · Score: 2, Funny

    You better skip the memory test.

    --
    now we need to go OSS in diesel cars
  31. DSOrganize by tepples · · Score: 2, Interesting

    I'm curious, how often do you bring up vi on your mp3 player? I play .ogg and .mp3 on a PDA made by Nintendo, on which I also use a text editor (although not vi or Emacs). It has 4 MB of RAM and a 1 GB microSD card.
  32. Virtual Machines by nurb432 · · Score: 2, Insightful

    Thats the only reason i can see to have that much ram. Unless our current crop of so called programers bloat their code to fill the expansion for yet another worthless feature.

    --
    ---- Booth was a patriot ----
  33. Some of us do have access to 1TB or more of RAM by Colin+Smith · · Score: 4, Interesting

    Well, closer to 1.2 TB. 40 systems with 32Gb each. Want to know what it's used for? Disk cache... It's virtually all I/O buffer.

    All RAM is used as cache anyway. When an application allocates some RAM, it's in lieu of directly manipulating the permanent (disk) storage because it's horribly horribly slow. That's really an operating system failure. Network file systems, disk, RAM should all be completely transparent, the OS should abstract all that away and allow application programmers to handle it simply as storage.

    --
    Deleted
    1. Re:Some of us do have access to 1TB or more of RAM by kesuki · · Score: 3, Interesting

      you know, this subject (1 TB RAM) brings up an annoying point, every year RAM access has gotten slower and slower relative to the CPU. when you bought a 486 computer, the RAM and Processor were running essentially at the same speed if the CPU needed data, as fast as it could be transfered from disc to ram was good enough, the cpu never hit cycles where the ram couldn't keep up with cached data and would miss a cycle for the want of data. But every new system, from the Pentium 1 on up ram has gotten slower and slower than the CPU, so now the CPU comes with 256KB to 8MB of 'very fast ram' that is specially designed to run at the speed of the processor, because the processor needs that cache for when the ram hasn't acquired and written the data to ram from HD because the system memory simply isn't fast enough.

      I have a gaming rig I custom built 5 or 6 years ago with some very sweet OCZ ram with 2-2-2-2 timings, but now when i was wish-listing a new gaming PC the best ram i could find was 3-4-4-15 timings that's ALMOST HALF THE SPEED that means that it's going to hit those 'unable to fetch ram for the CPU' TWICE AS OFTEN with horrendous results... And it's getting worse, DDR3 ram is all running at 5-5-5-15 timings stock, and mind you 4-4-4-15 is the normal variety of DDR2 'fast' ram, this was again OCZ over-clocked ram...

      with multi-core processors this is only going to get worse, with a dual processor rig, to truly keep both processors from missing cache you realistically need 1-1-1-10 ram and they KEEP MAKING THINGS WORSE by bumping up the amount of 'burst' data the RAM can put out, instead of how FAST the ram can access and reload ram!!!

      really with such pathetic timings realistically a dual core is going to be spending about 20% of it's cycles 'waiting on ram' if it needs randomly accessed memory, that can't be 'burst read' a lot of applications need random access, database, server farms, complex 3-d video game graphics... the reason why 512MB graphic cards cost so much is they really all need REALLY FAST random access memory that is way faster than 'stock' DDR3... and the reason why frame rates don't scale with more processor pipelines very well, is because those cards keep missing strokes because the system wasn't able to load the memory in time for the processor to work on it...

      I can't think of a single mainstream computers need to 'burst' more GB/second Instead of improving latency, yet the crazy computer scientists keep making it worse by engineering for 'burst' mode rather than latency.

      it almost makes one want to use normal DDR 1 ram, with the sweet 2-2-2-2 timings instead of ddr2...

    2. Re:Some of us do have access to 1TB or more of RAM by gfody · · Score: 2, Insightful

      If the table fits in the cpu's data cache don't the lookups get executed as fast as possible (multiple lookups per cycle fully utilizing the ILP window)? Granted, i*c+j would be a single lea instruction anyways.. but even so there could be benefits to using a lookup to eliminate a branch that would otherwise be in the inner loop or to handle some odd case (that would otherwise be a branch in your loop) etc.

      --

      bite my glorious golden ass.
  34. Closer than you think by stabiesoft · · Score: 2

    Chip design apps (and I imagine a number of other ones) will likely need 1TB in a year or so. I already know of several companies using boxes with 64G of RAM and the apps are consuming like around 40-50 of it. Designing (& analyzing) those multi-billion transistor designs eat memory. My sw package was designed to allow for ~80G per cell in the hierarchy. Since my system allows 128K cells, thats about 10TB of RAM that could be used. I have even wondered if the 80G limit needs to be increased in the near future.

  35. Databases have a better answer by rdebath · · Score: 2, Interesting

    I really don't like the idea that this is racing with the UPS. When the battery gets old it's ability to hold a charge drops and a timeout that was sufficient in the old days won't be now. I've also had situations where the battery was supposed to tide you over till the generator kicked in; but the system was never tested for the generator failing at exactly the wrong moment.

    I'm pretty sure the answer to this is a simple generation number on the blocks so you can use a database checkpoint scheme.

    1) Every write to the ramdisk brands that block with an ever increasing number (transaction number).
    2) When you initiate a checkpoint the driver finds all blocks that have changed since the last checkpoint and writes them to a "physical log", followed by the checkpoint marker.
    3) The same blocks are then written to the actual disk area; nb application writes to these blocks must be diverted.
    4) The "physical log" is cleared.
    5) Block diversions from (3) are cleared.

    Using this well known scheme the disk is always either in a consistent state or easy to get there.

    Note the "diversions" may mean that clean blocks must be discarded from the ramdisk/cache to prevent the applications being blocked by the checkpoint.

    If you want the ability to have the system 'roll forward' after a crash you need a transaction log where the updates are written to the log as they happen, because this is linear it happens at the maximum transfer rate of the disk; but it's still limited in performance.

    This also looks a lot like doing a backup from a volume snapshot.

  36. Access by Forty+Two+Tenfold · · Score: 3, Insightful

    The question should be not WHAT to fill it with, but how to read/write gargantuan amounts of data quickly.

    --
    Upward mobility is a slippery slope - the higher you climb the more you show your ass.