Slashdot Mirror


Other Uses For The Linux RAM Disk?

Dante_J asks: "Recently I discovered an old Amiga DOS 1.3 Manual I had lying around. While thumbing through it I remembered all the joyful days of good fun hacking. One thing I particularly remembered was how anyone with 3Mb of ram was considered especially blessed with resources because they could copy all their system files into the ram disk and have a 'trans-warp' fast machine on their hands. In this age of more Ram than sense why are Ram Disks only used for Linux installation floppies? Sure buffers are great, but why not mount /tmp to a Ram Disk, and the cache directory for Web browsers too? Does Linux support dynamically reseizing Ram Disks? Surely they would be vital in remote booting, diskless thin clients."

320 comments

  1. One problem... by drudd · · Score: 3

    The problem with allocating that much ram to just hold cache for a web browser or similar program is that they're designed to expect that disk cache to be very VERY slow.

    So you'd be better off just using that memory to allow the OS to buffer disk accesses and your programs to do their own in-memory caching than to have it act as a ramdisk.

    Doug

    --
    Venn ist das nurnstuck git und Slotermeyer? Ya! Beigerhund das oder die Flipperwaldt gersput!
    1. Re:One problem... by drudd · · Score: 2

      Obviously file operations to a ram disk are faster than their hard-drive counterparts. But my point is that programs which cache data optimize for the 99% who are caching to a high-latency medium, not memory. Most programs also tend to do their own second layer of caching in memory, as well as the OS's buffering of file operations. Both of these optimizations are harmed by reducing the overall amount of available ram, and thus using a ramdisk probably does more harm than good (unless you are rich enough to just buy 10x the ram you could possibly ever need).

      Doug

      --
      Venn ist das nurnstuck git und Slotermeyer? Ya! Beigerhund das oder die Flipperwaldt gersput!
  2. RAMdisk for netscape cache by pyros · · Score: 1

    I never tried it on my linux box, but I know it always sped things up on a Mac.

  3. Ram is usually needed elsewhere and is expensive by sips · · Score: 1

    If I have ram it's going to make more executables fit in memory at one time. Persoanlly why don't you just get a faster drive?

    --
    Respond to s
  4. Dynamic Sizing of Ramdisks by Jason+Straight · · Score: 5

    The 2.4 kernel does support dynamic ramdisks.

    1. Re:Dynamic Sizing of Ramdisks by mahju · · Score: 1

      Talking of things that fit in RAM, the linux router project , is a project set up to make a distro small enough to fit on a single 1.44MB floppy disk for networking stuff. Really who needs 128MB?

  5. Ram disk on Macs by Cire · · Score: 1

    People have been putting their NS cache into ram disks on Macs for a long time now, it speeds things up considerably.

    1. Re:Ram disk on Macs by DFDumont · · Score: 3

      One of the Fundamental differences between all Unixes and every other OS ever invented is the use of memory to buffer the filesystem. There are no direct writes to a disk, ever! All file IO is done to the buffers in memory, and then eventually the bdflush daemon runs and syncs the disk to the image in memory. Notwithstanding the recent journaling file-systems, and the sync-write IO calls, Unix today still does all its file-IO in this manner...which is why a RAMdisk is redundant. You already HAVE a RAMdisk.

      Mac, Windows, VMS, MVS, Amiga, et.al all do direct and/or syncronous writes to the disks. That's why a RAMdisk has such an effect.

      Linux boot floopies use a RAMdisk because they can't put all the needed files onto a 1.44MB floppy without compressing the image. The RAMdisk is simply the "disk" to which the decompression runs its output. If the root filesystem could fit entirely onto a floopy, there'd be no need for a RAMdisk upon install. See Redhat verion 3.x

    2. Re:Ram disk on Macs by SuiteSisterMary · · Score: 2

      Actually, every modern OS has buffering options. But you really do need to have the option to have syncronous I/O. Databases, for example. Why do you think Oracle prefers to have raw disks? Filesystems get in the way, and async i/o is a real bummer for data integrity. :-)

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    3. Re:Ram disk on Macs by Mr+Z · · Score: 1
      Mac, Windows, VMS, MVS, Amiga, et.al all do direct and/or syncronous writes to the disks.

      I can't comment intelligently on Mac, VMS, MVS or Amiga, but I can say that Windows does permit a write-behind cache. (Or at least, some versions of SmartDrive provided a write-behind cache.) The problem was, though, that DOS or Windows would often crash with dirty blocks still in the cache, and you'd end up with a toasted FAT or whatever. So, around DOS 6.2 timeframe, MS changed the default to "write-behind off."

      --Joe

      --
    4. Re:Ram disk on Macs by Bushwacker · · Score: 1

      NO not really. NOt on Win98 anyway. It's actually more pain than it's worth. However, it's great for speeding up Apache. That is if you can get it to recognize and write to the ramdisk in the first place ;-) The OS where RAMDISKS are most effictive is actually BSD.

      --
      -----------------------------------------
      Perversely greped and groped by PowerPenguin
    5. Re:Ram disk on Macs by abiogenesis · · Score: 1

      Is there a need to store NS cache in ram disk? Netscape already has the option to disable the disk cache and increase the memory cache instead.

      --

      Donate free food to the hungry at The Hunger site.
    6. Re:Ram disk on Macs by Karajorma · · Score: 1

      Interesting to note that although many people have commented on the Amiga`s ram disk not one (as far as I noticed) pointed out the main reason I still want one. The Amiga`s system for handling preferences was one of the most elegent I`ve ever seen. On boot up the amiga would copy all the .pref files from a directory on the hard drive (or floppy disk for that matter) called envarc: into a directory on the ram disk called env: If later you changed a preference (e.g screen mode or your backdrop etc) you would be offered the choice of saving the preference (write change to Envarc:) canceling or using (write the change to Env:) The upshot of this was that it allowed you to change preferences until the next reboot when your old preferences would return. As far as I know AmigaOS is the only OS that can do it (at least out of the major OS`s)

    7. Re:Ram disk on Macs by DFDumont · · Score: 1

      Okay, lesson in Operating Systems...

      There is a diference between a user-level service, like SmartDrive, wherein they hook the INT13 calls to redirect them to an in-memory cache - and Unix. Unix uses the memory as part of every read-write operation within the kernel. That saves context switches and page faults.

      Okay, Context switch: when one process foregoes using the CPU so that another process can have time. This involves at a minimum a switch in the stack frame pointer and a fixup to the program-counter and instruction pointer

      Page fault: When a page of memory, typically 4096 bytes but can be as small as 512 bytes or as large as the hardware allows, is referenced (read or write) by a running program. When the memory management unit converts the logical address from the program address register to a physical memory address, and faults - meaing there is no active translation, the running process is halted, put into the WAIT queue, and the PAGING process is sent a message (or called directly) to bring back the page from disk (SWAP). This is Demand-Paging. If there are no unused pages in memory, then when the paging process runs to fulfill the request(s) it will determine which pages can be safely removed from physical memory and written to disk, to make room for the pages that need to be brought back.

      In a memory starved system a great deal of time is spent by the paging process to move chunks of memory, constantly between disk and physical memory. This is called "thrashing".

      Getting back to the original statement, the reason unix is fundamentally different from all the examples of disk caching, is that it is part of the kernel routine for ALL DISK I/O, not just certain files that the caching program likes. Smartdrive has to determine whether the current read is for a regular file, for a paging request or for a system file and acts differently depending on the decision. This all takes TIME. Since in Unix the buffering is part of the kernel, and not a separate process it saves two (2) context-switches on every operation. Since Unix has no distinctions in file types, ALL files are buffered. Since in Unix the buffering is handled at a higher level than the hardware (BIOS) interrupt service routines, which is what SMartdrive has to do, there is no ambiguity between a paging request - no buffering, and a file I/O - buffered. If you ever write a program, in C, on a Unix platform, one of the things that becomes apparent is the use of libary calls - section 3 in the man pages, and system calls - section 2. The library calls are for buffered file i/o. The system calls are for unbuffered i/o. So if you want syncronous writes you can have them. In Windows as in other OS's there is no distinction. You have write() and read(). Even if you have an s_write() (syncronous) call available, if there is a caching program running, since it has hooked the hardware interrupt service routine, it is wholly up to that program to allow your syncronous write through, or not. The upper layer file I/O routines can't tell if the hardware has been hooked.

      As far as read/write performance, that is the essence of the differences in the various file systems. UFS assumed a sequential read and so performs a limited read-ahead, typical just the next block. Other file systems use other read-ahead algorithms - of which I am not specifically privy. Perhaps some of you Linux kernel hacks could expound on e2fs and its read-ahead algorithm.

      In any case the disk meta-data, the inode table and the superblock, are held in memory at all times and are marked as locked, in systems that allow that level of control in their mmu. That is what the FSCK process rebuilds when you fail to do a clean shutdown - it rebuilds the metadata from the files.

      In conclusion, Unix is better because it buffers on every file I/O, because it handles the buffering higher in the call chain, because it buffers without doing an extra context switch, because it performs paging at a lower level in the call chain than the buffering, and because it has the tools in place to do true syncronous writes - if you need them.

  6. This is why we hack kernels by cvd6262 · · Score: 1
    Bob Young spoke at LinuxWorld Expo in San Jose earlier this year and took aim at Microsoft's "Innovations". He didn't mention M$, Bill Gates, or M$ Word or Excel, but he did mention a Redhat/Dell innovation of building a webserver into the kernel and breaking the hit/sec threshold.

    Isn't that basically putting what's most important process into the ram disk to make it run extremely fast?

    --

    I'd rather have someone respond than be modded up.

    1. Re:This is why we hack kernels by RBurbidge · · Score: 1
      Isn't that basically putting what's most important process into the ram disk to make it run extremely fast?

      No. They are two completely independent things.

      Presumably putting the web server into the kernel makes it faster by reducing the context switching between kernel and user mode.

      A Ram disk is fast because it emulates a disk while removing those mechanical components that take so long to respond.

    2. Re:This is why we hack kernels by austad · · Score: 1

      This is something different. It has nothing to do with a Ramdisk. Apparently Redhat's next release is going to include this thing. It can run in the kernel, but can also run separate from it.

      It was posted awhile back, I couldn't find the link though.

      --
      Need Free Juniper/NetScreen Support? JuniperForum
    3. Re:This is why we hack kernels by Mooset · · Score: 1

      It's already been done for Linux, it's called khttpd, and you can read all the specifics of why it's cool in the August 2000 Linux Journal. It's crazy fast, and it automatically throws dynamic stuff to Apache (or whatever server you have set up) while handling the static pages itself. Great for a server that mostly serves images.

  7. Good idea, but... by Neandertal · · Score: 1
    With only 128 meg or so of ram, I rarely have any left over after opening about 6 netscapes (until they crash), 15 Eterms, Star Office, etc. etc.

    Maybe I'll try this at work, I've got over 300 megs there.

    Too bad RAM prices aren't dropping like disk storage prices...

    1. Re:Good idea, but... by Grab · · Score: 4

      This is exactly why we don't use RAM-disks on modern machines.

      The stock A500 had 1/2Meg of RAM, so most stuff was designed to run in that memory space. Most word-pros and spreadsheets would run in this, but didn't have much room spare for file data, so more serious users got a 1/2Meg RAM upgrade for this (and even now, you can store a lot of text in a 1/2Meg file). If you had the money for a 2Meg (or more) expansion card, the world was your oyster. You could then run 2 or more heavy-duty programs simultaneously, and use any space left over to cache your frequently-used commands in a RAM-disk. Well cool at the time.

      Now back to today. It's no longer strange to run several heavy-duty applications together - at any one time in Windows (sorry, but that's what I use at work), I may have Word, Excel, Access, DevStudio, Outlook, Matlab, Acrobat and IE all running together. At this point, the Amiga would have reached the "heavy heavy heavy, man" stage and died with a Guru Meditation error. We have vast stacks of RAM now, but our expectations have risen too, and so have the program sizes. You could still sit down and code a graphics app in Intel assembler if you really wanted to (as one Amiga developer did to get fastest performance and minimum code size), but I wouldn't recommend it.

      Also, the purpose of a RAM-disk has pretty much vanished. When we used floppies, the disk access time was enormous and slowed things down considerably, but modern hard drives are so fast that disk access time isn't as big a deal as it was then. Even then, if you had a HDD (20Megs was state-of-the-art then!) then you didn't really need to use a RAM-disk.

      Grab.

    2. Re:Good idea, but... by gavinhall · · Score: 1

      Posted by polar_bear:

      Amen - how about an "Ask Slashdot" about the apparent conspiracy to keep RAM prices up? I mean, the Taiwan earthquake excuse is a bit ragged by now. RAM is only expensive because there doesn't seem to be too much competition between RAM dealers. Does anyone have an inside scoop on the real price of RAM to manufacture and the actual available supply?

    3. Re:Good idea, but... by the_1000th_Monkey · · Score: 1

      You can free up enough memory for your 15 cool Eterms, and 6 netscapes-a-crashing but not using Staroffice. You can run as many terminals as your little heart could desire in the memory footprint of that behomoth :).

      --
      where'd my typewriter go?
    4. Re:Good idea, but... by Anonymous Coward · · Score: 1

      Since RAM is basically made out of Sand (Silicon) it should be free. We should have Al Gore propose that Congress look into that. I mean, why should we be paying money to Big Business to produce RAM when Federal Laws can be passed requiring them to give it to us for free?

    5. Re:Good idea, but... by GunFodder · · Score: 1

      There IS a conspiracy to raise RAM prices, but it's legal. A couple of years ago RAM prices were dropping daily, and all the major RAM manufacturers were losing their shirts. They came to the conclusion that if they reduced the supply then the prices would go up, so they cut back on production. This is the inevitable result of capitalism. Fortunately it won't last forever; one of those memory manufacturers will get greedy and pump up production to take advantage of high prices. Everyone else will raise production too to keep up, and prices will drop again. If memory serves the same thing happened to the hard drive market at about the same time.

    6. Re:Good idea, but... by Ambassador+Kosh · · Score: 1

      One way to reduce netscape memory, speed it up and reduce the crashes is to use squid. I now set up squid locally on all of my boxes to have them be the web cache. It works really well and squid is a lot faster and better at caching then netscape is. You can even set the caches up to talk to each other if they are on a fast network to make it even more efficient.

      --
      Computer modeling for biotech drug manufacturing is HARD! :)
    7. Re:Good idea, but... by Wilfred+Death · · Score: 1

      I Just have to Object to the claim of running multiple applications simultaneously in Windows


      They Run One at a Time, you click the Task-Bar and THAT APP Pages Back In and Runs

      If any of those named Tasks were Re-entrant I'd be suprised

      I am sure that if you tried to load these huge apps under AmigaDos / WorkBench. It would Not have Issued a GURU by any means.

      When a TASK requested More Memory than Available, the Kernel would have said NO!, so you would have got an "Insufficient free space" message or such.

      Or if you really loaded a LARGE Number of Tasks, you might get a "Task Table Full" message.

      Loading any of those Apps into a 10M space : wait for the BSOD on WIndows

      Anyone Ever Use The MMU on their AMIGA for 'Virtual Memory', it always seemed smoother than Win95

      But then again I had a 40MHZ AMIGA with 10 MEG and a "HUGE" 300M HD. However the damn thing DID MultiTask

      Define MultiTask NOT: A: Play QUAKE, Switch TASK to EXCEL or etc, on WIn9X, when you go back to QUAKE tou will still be in the same 'frozen' spot. AMIGA True MULTITASK: B: Play 'ALIEN SYNDROME ??? {Doom clone}, Switch to SPreadSheet... Switch back,... You Will BE DEAD DEAD DEAD, cos the Game KEEPS Running...

      Yes I use Win9X Now for 300MHZ Clock speed RAM etc etc etc, but it still sucks, and to damn the AMIGA as worse ---- ooh ! that gets my goat!

    8. Re:Good idea, but... by yuri+benjamin · · Score: 1
      ...not using Staroffice. You can run as many terminals as your little heart could desire in the memory footprint of that behomoth :).

      Wanna hear something scary ? ...

      I use StarOffice on a 486 with only 32Mb of RAM.
      And I use KDE.
      And it hurts - while most people have time to make a coffee while waiting for StarOffice to load, I have time to fly to Bolivia and pick the beans myself.

      Show me a fossil of a half evolved eye.

      --
      You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
    9. Re:Good idea, but... by the_1000th_Monkey · · Score: 1

      Is KDE seriously this bad a memory hog... on my 64MB 366Mhz system I just retired, KDE seemed reasonably snappy, and most apps I ran from it did too; it was StarOffice that always ground my system to a screaming halt. I've heard people mention this before, I just never personally noticed.

      --
      where'd my typewriter go?
    10. Re:Good idea, but... by grolim13 · · Score: 1

      KDE is far too slow to be usable in 16mb. (Surprisingly, Enlightenment is actually almost as fast on a 486/66-16mb as on a P2/333-64mb.) It runs quite well on 32mb (which means most computers upgraded within the last 4 years :).

      GNOME has always seemed a lot slower. And for some reason I have never had trouble with Netscape crashing. Mozilla, on the other hand, is different :)

  8. Resizable Ramdisk + Unix = trouble by sprag · · Score: 2
    Where I used to work had /tmp and swap shared via a resizable ramdisk on Solaris. It was a nightmare because we had a developer who was very sloppy and he'd not clean up temp files...after a while, the machine would crash (out of memory) and would be fine after a reboot. I never could convince him that he should erase temporary files after he was done with them...

    That being said, in some respects, its a denial of service attack waiting to happen, though probably no more than a malloc() loop...

    1. Re:Resizable Ramdisk + Unix = trouble by joshua · · Score: 1

      There are some lovely programs out there which will clean up tmpfiles that are old enough (for clean up, read 'delete'). Having this happen a few times hammers the meaning of _temporary_ into people.

      Michael.

    2. Re:Resizable Ramdisk + Unix = trouble by sprag · · Score: 1
      The problem was, they were temp files being created by a CGI app and during busy times, a period of less than an hour might go by between a reboot and out of memory...or it might be weeks. It got old really fast.

      Thank goodness for perlscripts that where specifically written to clean up his mess...

    3. Re:Resizable Ramdisk + Unix = trouble by juhtolv · · Score: 1

      What you definitely need is tmpreaper. Here is part of its copyright-file in my Debian:

      This package was originally an `alien', debianized by the alien program by converting the RPMS Package `tmpwatch-1.2' on Thu, 13 Nov 1997 02:16:28 -0800. It bears a GNU Public Licence, which you will find in "/usr/doc/copyright/GPL". Please read the changelog. The original `tmpwatch-1.2' was downloaded from ftp.redhat.com by karlheg@inetarena.com. Thank You, Erik Troan. This program was sorely needed. We always appreciate the things you provide for the Linux community. I could not have even begun to write a program like this one from scratch. Without the initial program to build on, it would not have been possible. I've learned a lot from this experience. karlheg: Sun, Dec 7, 1997: I am renaming this program from `tmpwatch' to `tmpreaper' to split away from RedHat, who released a `tmpwatch-1.4' with RedHat v5.0 that had zero of the patches I sent for `1.2-1.4'.

      --
      Juhapekka "naula" Tolvanen - http://iki.fi/juhtolv
    4. Re:Resizable Ramdisk + Unix = trouble by lgas · · Score: 1

      1. If you have your system configured so that all of the ram can be taken up by the RAM disks, that's just silly.

      2. More importantly, if your machine crashes when it runs out of RAM, you must be running a horrible operating system. Are you sure you're not thinking of Windows, not UNIX?

    5. Re:Resizable Ramdisk + Unix = trouble by shippo · · Score: 2
      I've got this problem with some machines at a client, which I need constant access to.

      Each machine runs a number of message queue daemons. The 'bright spark' developer of these decided to store the queue state infomation in a scratch file in /tmp. They also havn't heard of shared libararies, so each queue process is enormous due to being statically linked against all bar the C library. And there's over a hundred of these processes per machine.

      The system will run out of memory once a week or so, and when it does so the queue scratch files can't get updated. When the errant process is killed, all queues are corrupted.

      The need a competant sysadmin. Unfortunatly their based in the SE of England where competant staff are thin on the ground, and they seem to employ anyone who knows a few buzzwords.

    6. Re:Resizable Ramdisk + Unix = trouble by sprag · · Score: 1
      I didn't configure it :) I just had to use the damned thing. Having to reboot in the middle of a debugging session was a great way to piss me off.

      We were running Solaris 2.3 or 2.4, I don't remember which.

      When it was reconfigured, the /tmp ramdisk was removed and voila, it was stable as anything...

    7. Re:Resizable Ramdisk + Unix = trouble by InsaneGeek · · Score: 1

      Normally on a Solaris system /tmp isn't a filesystem at all, it is all available free memory (including physical & swap) at boot time. So if you fill up /tmp, you have filled up all your physical AND all of your swappable space; no more memory anywhere is available... crash ensues.

      You can go around this by changing your vfstab entries for swap, etc. but removing this is not suggested. There are lots of "Solaris'isms" that rely on quick access to these files, else your machine will go down to a crawl. I'm sure there also are quite a few 3rd party apps who rely on fast access to the /tmp/ filesystem, that if it were to be slowed down to spinning disk pain would ensue.

      You could probably put quotas onto the partition to prevent individual users from being bad players and taking a machine out. I've not had to do this, probably because I've always been very agressive in beating users into submission that, there are 2 temp areas on a system /tmp and /var/tmp and there better not be anything in /tmp that shouldn't go into /var/tmp.

      Spelling and grammar checker off because I don't care

    8. Re:Resizable Ramdisk + Unix = trouble by QuMa · · Score: 1

      Unix OOM handling could be better too you know.. there are several cases (linux, to name one), where it's: OOM->Kill a random process (Well, not really random, but close enough). Ofcourse you can ulimit, but it's still not nice.

    9. Re:Resizable Ramdisk + Unix = trouble by InsaneGeek · · Score: 1

      The reason this was probably done is to improve performance of their MTA (which was probably failing because it had 500 other mail processes backed up waiting on I/O). For example each sendmail queue run it writes multiple tmp files, which just completely wails on the I/O (you're going to run out of I/O on a mail server before anything else). Stripping your queues over a cached raid system, will greatly improve performance, without having to resort to dangerous things like this. If you really NEED that type of performance using a SSD (a really expensive external ram disk, battery & disk backed up, that connects either using SCSI or F.C.) may be what you need since that will not eat up all system memory, etc., but it is EXPENSIVE with a capital E. Of course you can allways add swapfiles so that the system will stay up, albeit it will run extremely slow (imagine 6+ gig swapped out.. ouch), but it will stay up.

      I wouldn't be so quick to blame the SA, his company may not be willing to get him the hardware he needs to do his job properly, of course I don't know the situation and he may be a complete bumbling idiot, but you never know.

      Spelling and grammar checker off because I don't care

    10. Re:Resizable Ramdisk + Unix = trouble by mors · · Score: 1
      Where I used to work had /tmp and swap shared via a resizable ramdisk on Solaris.

      I can see the point in putting /tmp on a ramdisk, although I think it would be better to use it for buffers. But WHY would anyone want to put swap on a ramdisk. Then when the system runs low on memory it would take some of the contents of memory, and move them to some other memory. That doesn't make a lot of sense.

    11. Re:Resizable Ramdisk + Unix = trouble by jageryager · · Score: 1

      I beg to differ! I have never seen a Sun box that didn't have physical disk for it's /tmp. And I've looked at a lot of them. That's not to say that putting /tmp in RAM doesn't happen.. At companies including Kodak, Xerox and GE/Lockeed/MM over the last 8 years I never saw it. I do agree that on Suns, when /tmp gets full strange things happen, including system reboots and other wierd things. And turning on quotas is a good way to slow things down. I can only imagine that this would be a very bad thing to do on /tmp. Kevin

      --
      "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety"-B.Franklin
    12. Re:Resizable Ramdisk + Unix = trouble by InsaneGeek · · Score: 1

      Hmm... well over the years of doing admin work, all the systems (at least Solaris, not SunOS) /tmp wasn't physical disk. Having had quite a number of friends who have worked in government organization, DOD, etc. companies, honestly it would not suprise me that it might be a hold over from SunOS (that's not supposed to be offensive, just an observation from what I've seen).

      If you look in the Solaris 2.6 System Admin. Guide, under the section about "Swap Space and the TMPFS File System", Solaris 2.x uses the swap for the temp filesystem. That doesn't say you can't change it, but for most of the apps we run on Sun (Oracle, etc.), having /tmp as a "virtual ram disk" gives us an obvious order of magnitude performance increase over spinning disk. Your applications may not get anything from /tmp & memory being together, so one can't make any blanket statements about setup for all configurations.

      Like I said I've never tried running quotas on the /tmp filesystem (I've beat my users into submission), and yes you'd get a bigtime slowdown, but off hand I can't think of another way to control the /tmp filesystem without a third-party reaper app. But you never know, quotas may not be that bad since you don't have to wait for the physical drive to give you information, one already has it in physical memory... I guess I know what I'll be trying on my new 420 tomorrow.

    13. Re:Resizable Ramdisk + Unix = trouble by kelleher · · Score: 1

      Sorry, the developer's actions may have been the imediate cause, but an ignorant/lazy SA was the root cause.

      There are too many sloppy commercial developers around to assume the ones at your company aren't, so you make /tmp a physical disk -or- Read The Fine Manual for mount_tmpfs and put the size=sz option in the vfstab file.

      This may seem a bit harsh, but I've had to cleanup too many systems to have any patience left with this kind of thing.

    14. Re:Resizable Ramdisk + Unix = trouble by shippo · · Score: 2
      The system I'm talking about is an in-house written transaction processing package. My responsiblity is ensuring that remote systems can communicate properly, obeying the various specifications.

      The problem here is that there is no-one in overall control of the network of at least 7 high-end Solaris machines. Security is a joke - everyone logs in to the same machine as the same user, then rlogins to the rest of the network. They often run out of PTYs (due to constant use of login between machines without logging out) and have no idea who is consuming them, this results in either bling panic or a system reboot. They also have a nasty habit of rebooting whenever performance suffers, instead of performing preventative measures. They once rebooted one of these machines due to performance problems - all that had happene was someone had accidentally started a couple of huge web server daemons on this machine, and then not terminated it. And so on.....

      When I here how much money some of these people are on, I get really angry.

    15. Re:Resizable Ramdisk + Unix = trouble by Lozzer · · Score: 1

      like find with an exec rm{} in it

      --
      Special Relativity: The person in the other queue thinks yours is moving faster.
  9. Don't use that, use this by pwhysall · · Score: 1

    Instead of using eterm, use something smaller, like rxvt.
    --

    --
    Peter
    1. Re:Don't use that, use this by Neandertal · · Score: 1

      ... exactly, I use Eterm for the aesthetic value. I'm tired of boring desktops. The little bit of extra resources is worth it.

    2. Re:Don't use that, use this by austad · · Score: 1

      Aterm. Aterm is a highly modified rxvt that has all the goodies of Eterm. Eterm is a memory piggy. Aterm uses about the same as a regular xterm.

      --
      Need Free Juniper/NetScreen Support? JuniperForum
  10. Uhhm... by Ether · · Score: 1

    "Sure buffers are great, but why not mount /tmp to a Ram Disk, and the cache directory for Web browsers too?"

    Or, you could simply increase the size of the Memory Cache in Netscape. Edit...Preferences, Advanced, Cache, Memory Cache Size.

    I'm not enough of an expert on Linux's tmpspace to comment on that part of the proposal... but IMO, it seems like a really bad idea.

    --
    --I hate people when they're not polite -"Psycho Killer", Talking Heads
  11. Ramdisk as browser cache by BELG · · Score: 2

    Using a ram-disk to cache web-content seems a bit strange.. Most browsers I have seen already have options for setting how much ram you want to use for cache, and all you would have to do is increase it. When it comes to /tmp, if you have enough ram, Linux will just write-behind cache the file until its use is over.

    1. Re:Ramdisk as browser cache by mlepore · · Score: 1

      The major difference between the using a plain RAM cache and a RAM disk cache is that a RAM disk cache will persist between browser sessions (not between reboots though), while a RAM cache will clear if you exit the browser. If you have a less-than-stable browser, its not a terrible thing... unfortunately the memory isn't available for other applications which may need it...

  12. But it's harder than hell by sips · · Score: 1

    Speaking as a person who does program the kernel looks like ancient Greek written by a dieing man. Also isn't creating more and more programs in dedicated kernel mode a really, really bad idea? Isn't this what causes NT to die hideously because of it's integrated kernel graphics mechanism?

    --
    Respond to s
    1. Re:But it's harder than hell by j-pimp · · Score: 1

      Also isn't creating more and more programs in dedicated kernel mode a really, really bad idea?

      Well it can be problemsome, however when you have a customizeable kernel and can decide if a particular function (in this case http daemoning) is performed in userspace or kernel space there's not really a problem. In such a case if an isp can simply unload the httpd module if thet determine its unstable and let apache handle the rest. Also if the kernel httpd proves useful someone might add cgi support to it and make it more useful.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    2. Re:But it's harder than hell by SuiteSisterMary · · Score: 2

      Besides, on NT, the reason having the GDI subsystem in kernelspace sucks is because the drivers tend to be buggy. The http-kernald only serves up text pages; anything more hefty it tries to send to the actual httpd. So although it IS a security and stability risk, it's a lot easier to debug (all a httpd does, at it's basic level, is parse a text request, read a file from disk, and print it out to a socket.)

      --
      Vintage computer games and RPG books available. Email me if you're interested.
  13. seems to be pointless by nibelung · · Score: 2

    I was under the impression that disk caching renders ram disks obsolete except for the cases where you want to be absolutely certain that the data stays in memory (such as when your files are on removable media).

    1. Re:seems to be pointless by joshua · · Score: 1

      I get the impression that it _should_, but that people are finding that they're better at guessing what should be kept in memory than the caching algorithms...

    2. Re:seems to be pointless by MartinG · · Score: 2

      What if you have an application which reads and writes files that you specifically do not ever want writing to disk eg for security reasons? That's one other good reason for a ram disk.

      --
      -- MartinG To mail me: echo kewyjlcxyzvjfxbqwh | tr bcefhjklqvwxyz .@adgimnoprstu
    3. Re:seems to be pointless by montjoy0 · · Score: 1

      Or you would really like that IDE disk to power down for a while. (anybody know a good way to do that?)

    4. Re:seems to be pointless by Fluffy+the+Cat · · Score: 1

      man hdparm

      hdparm -S Set the standby (spindown) timeout for the drive.
      This value is used by the drive to determine how
      long to wait (with no disk activity) before turning
      off the spindle motor to save power. Under such
      circumstances, the drive may take as long as 30
      seconds to respond to a subsequent disk access,
      though most drives are much quicker. The encoding
      of the timeout value is somewhat peculiar. A value
      of zero means "off". Values from 1 to 240 specify
      multiples of 5 seconds, for timeouts from 5 seconds
      to 20 minutes. Values from 241 to 251 specify from
      1 to 11 units of 30 minutes, for timeouts from 30
      minutes to 5.5 hours. A value of 252 signifies a
      timeout of 21 minutes, 253 sets a vendor-defined
      timeout, and 255 is interpreted as 21 minutes plus
      15 seconds.

    5. Re:seems to be pointless by Mattsson · · Score: 1

      There are cases where you want an extreamly fast drive and *don't* want to keep the content the next time you boot.

      Back in the days when I used the Amiga I had a drive that read 1.5 MB/sec and wrote 0.5 MB/sec. Way to slow for my taste. (Of course, I also feel that my current 24 MB/sec drive is too slow)
      I always used to unpack stuff into ram to gain speed and save space.
      No deleting of temp-directories at bootup, no fragmentation, no unpacked archives cluttering the drive and excellent unpacking performance.

      --
      /.Mattsson - My native language is not English, so please don't whine over linguistic errors. (That's lame anyway...)
    6. Re:seems to be pointless by Dwonis · · Score: 1

      Yes, but it keeps powering up again.
      --------
      "I already have all the latest software."

    7. Re:seems to be pointless by zeugma-amp · · Score: 1

      When I was a system mananger on an HP-3000/70 minicomputer, we created a small ramdisk for certain heavily used files, and spent a hell of a lot of time tuning the random and sequential cache parameters. We managed to eliminate 30% of all I/Os with just 4 or 5 files. The files were probably going to live in the cache anyway, but we just wanted to be absolutely sure that they were in memory. It gave us a serious performance boost. I'm not sure if it was our cache tuning or the ramdisk that did us the most good, but we definitely saw an improvement from the ramdisk. Cache tuning is an ongoing thing that would need to be looked at as your computing environment changes.

      I'd really like to see the ability to do more cache tuning on all the unixen I run. Being able to tell it how much I want read by default when sequential reads are made as opposed to 'random' reads can be a really powerful tool if you do your homework and identify your bottlenecks.

      Z

      --
      This is an ex-parrot!
  14. Solaris already does by larien · · Score: 5
    At least, the /tmp bit. Under Solaris, /tmp is effectively part of virtual memory (used to be just swap space, now includes physical RAM). Causes several problems as:
    • files disappearing from /tmp on reboot which users didn't expect
    • large files eating up swap space
    Personally, I find it a great idea; just some admins don't like it as much.
    --
    1. Re:Solaris already does by Smurphy · · Score: 1

      This is one of the features I actually miss from
      Solaris while using Linux. So who wants to port
      this feature into Linux?

      Guess, I'll have to do it then. :-)

    2. Re:Solaris already does by SuperguyA1 · · Score: 1

      Why are you putting things in tmp that you don't want to lose?
      I do understand though I use Solaris at work and
      learned this one the hard way:)

      --
      "as plurdled gabbleblotchits on a lurgid bee" - Prostetnic Vogon Jeltz. (One man's humorous is another mans flamebait)
    3. Re:Solaris already does by IcePic · · Score: 1

      Other OS:es clear /tmp regurlarly while
      booting, so having stuff disappear on you
      from /tmp after a reboot isn't _that_ unusual
      anyway.

      --
      -- I'm as unique as everyone else.
    4. Re:Solaris already does by Eric+Gibson · · Score: 1

      1) Write an init script that kicks off when the machine goes down to clean up files in /tmp, and archive those that are needed (as an admin I wouldn't suggest that my users keep stuff in /tmp anyway, but...) 2) Set resource limits on the amount of space that can be used on /tmp.

      If your admins didn't immediately think of those things (or somethign similar), they need to go back to admin school. :-)

    5. Re:Solaris already does by Zwack · · Score: 2

      Actually, where I work we use the standard Solaris start up files mostly and those wipe /tmp (usually we have that on disk) on boot.

      This is a sensible strategy, and frankly I wouldn't expect to keep files in /tmp over a reboot.

      You can limit the size of /tmp on the tmpfs file system by using the mount options... -o size=sz sz can be in bytes, kilobytes or megabytes (123, 123k or 123m)

      The main reasons that we don't use it are DBAs...
      We have had one DBA ask us to reduce the size of /tmp and use that space to create a new partition... And they generally don't want to use ANY memory for things other than their programs. tmpfs keeps the filesystem control structures in memory.

      Z.

      --
      -- Under/Overrated is meta-moderation, and therefore is Redundant.
    6. Re:Solaris already does by JCMay · · Score: 1
      SuperguyA1 wrote:
      Why are you putting things in tmp that you don't want to lose?
      Speed. At work we're given network partitions for our projects. Unfortunately, much of what we do is very math, and therefore disk, intensive. When running Ansoft Maxwell (HFSS) for example, solutions can be found at least twice as fast by running in the locally-mounted /tmp than then network mounted /project directory!

      Jeff

    7. Re:Solaris already does by pruneau · · Score: 3

      Well, we're using Solaris at work, and placing swap and /tmp in the same memory bucket has another interesting "side-effect".

      Another rule of the game is : when memory-pigs applications are running, and swap grows too much, the /tmp shrinks accordingly.

      Here, we are using an operating system simulator which was designed like a fortran-77 app. That is, at startup, reserve as much memory you think you need (commonly around 100/200M), and then works with it (or die). When a sufficient number of those apps is running (around 5-7), even our 1G-memory entreprise servers began to stumble under the load.

      Needless to say, when swap grows up to the point of crushing /tmp in the memory bucket, you've got a file system full on /tmp...

      Remember the ol'unix /tmp definition :
      /tmp is the place (filesystem) where any file that won't be needed next reboot should be placed, but _EVERYBODY_ should be able at least to write and read there.

      It's funny how you re-discover the importance of this rule by noticing how many mundane tool need /tmp for writing. And indeed refuse to move when /tmp is full...

      So my .5 cents to whoever will design such a mechanism in (free)*(*n*x). This mechanism really speeds things up, but on the other hand, PLEASE MAKE SURE THAT :
      - either your system does not vitally needs /tmp any more
      - or /tmp will remain sufficiently large for your system to keep running, whatever the conditions.

      Obviously, this is only needed when you run memory-hungry applications. But obviously indeed us modern designer are very carefull not to use to much memory ;-)

      --
      [Pruneau /\o^O/\ warranty void if this .sig is removed]
    8. Re:Solaris already does by Foogle · · Score: 1
      What's to port? You can already set up ramdisks under Linux, and you can already put your /tmp on a seperate partition (naturally). It's just not done in any distributions.

      -----------

      "You can't shake the Devil's hand and say you're only kidding."

    9. Re:Solaris already does by |_uke · · Score: 1

      to start off, it would not be proper for /tmp to retain any files after a reboot. After all its only ment to hold files for a short period of time.

      However, working with large files can be an issue. I was using a /tmp directory loaded into memory via ramfs. The main problem, I dont think ramfs allows the contents to be swaped to disk.

      I was trying to work with a large amount of files, tried to create a tarball and urgh.. things went bad. I think part of the reason might be the fact the kernel I was using had a buggy version of ramfs. But still.

      Anyways.. most unix system do (or should atleast) clear out the tmp directory on reboot.

      --
      Luke
    10. Re:Solaris already does by Ctrl-Z · · Score: 1

      files disappearing from /tmp on reboot which users didn't expect

      It's my opinion that anything in /tmp should
      be *temporary*. If it goes away when the
      system reboots, too bad, so sad, guess you
      should have put it in more permanent storage
      space.

      large files eating up swap space

      That's what tmp cleaners are for.

      Just my 2 cents.

      --
      www.timcoleman.com is a total waste of your time. Never go there.
    11. Re:Solaris already does by KmArT · · Score: 1

      Hrm, maybe users need reminded that /tmp == TEMPORARY == it gets deleted at will (i.e at reboot or when tmp gets cleaned up based on file age). Users should expect that temporary files in a temporary directory disappear after reboot. They should also learn not to put "permanent" files there if they want them stored "permanently".

    12. Re:Solaris already does by alvi · · Score: 1

      That's why you have /var/tmp. It's on the local disc, won't be erased when you reboot, and it's much faster than tmpfs. (tmpfs has some bad overhead, you'll notice that as soon as you compare it directly.)

      I have one problem with tmpfs: You can use it to drive your sysadmin insane. Just create a zillion of files in a subdirectory in /tmp. After a while the machine will be out of swap space even though 'df' tells you a different story. It's quite hard to track that down.

      Alvi.

    13. Re:Solaris already does by larien · · Score: 2
      WTF? What overhead are you talking about? UFS has way more overhead than TMPFS for various reasons. In any case:
      jr:air% cd /var/tmp
      jr:air% time dd if=/dev/zero of=afilename bs=512 count=10000
      10000+0 records in
      10000+0 records out
      dd if=/dev/zero of=afilename bs=512 count=10000 0.24s user 1.98s system 29% cpu 7.537 total
      jr:air% cd /tmp
      jr:air% time dd if=/dev/zero of=afilename bs=512 count=10000
      10000+0 records in
      10000+0 records out
      dd if=/dev/zero of=afilename bs=512 count=10000 0.14s user 1.45s system 65% cpu 2.440 total
      Ie, tmpfs is over twice as fast as UFS. And that's with UFS logging enabled which generally increases the speed.

      For reference, this is a SPARCstation 5/170 running Solaris 7 and the memory is pretty much full, so /tmp is probably using the disk swap by now.
      --

    14. Re:Solaris already does by QZS4 · · Score: 2

      Another rule of the game is : when memory-pigs applications are running, and swap grows too much, the /tmp shrinks accordingly.

      I've been bitten by this (twice!) the other way round: When someone decides to do a 600-meg download into /tmp (because his quota is 20M), the virtual memory shrinks accordingly. After a while all you get at the prompt is this:

      $ls
      zsh: fork failed: Not enough memory

      This symptom is usually followed by an email to the sysop, and a few minutes later everything is back to normal (except for the user who lost a few hundred megs of downloaded stuff :-).

    15. Re:Solaris already does by stevey · · Score: 1

      • files disappearing from /tmp on reboot which users didn't expect .

      Let me tell you a funny story. I'd recently decided to change from a dual boot of Redhat + Windows NT .. to a Debian only installation on my PC.

      I started by backing up stuff I wanted to keep - on Zip drives.

      The install went great, (and Debian rocks;), so once I was finished I moved, (not copied), all my precious data from the zip disks to the new setup .. into "/tmp/"

      Guess what happened when I rebooted next?

      All my precious data *gone*

      Turns out Debian defaults to removing stuff on a reboot..


      Steve
      ---
    16. Re:Solaris already does by trinitor · · Score: 1

      I saw a feature in HP-UX 9.05|9.07 that automatically erased files from /tmp if they were there more than some time(I am not sure how long). Anyway, UNIX admins must simply warn users about things like that, and personally I hate users that download too much crap while their quota is 20M >:|

  15. chroot jails by TWX_the_Linux_Zealot · · Score: 1

    I haven't looked into this at all, so I could be totally off in left field, but wouldn't it be possible to run a chroot jail's storage on a ramdisk? If the content of whatever is in the jail doesn't really change then I don't see how it would matter if the jail were lost, and I would assume that it would be easier to remove a potentially hacked jail by removing the ramdisk or restarting the computer (not that I am in favor of restarting, I don't think that it should ever be necessary). It would also be interesting to boot a box from CD, dump the 'live' distro into a very large ramdisk, and run it that way, so if someone rooted the box and installed their rootkit, a simple reboot would remove all their changes...

    --

    IBM had PL/1, with syntax worse than JOSS,
    And everywhere the language went, it was a total loss...
  16. ramdisk vs. hard disk by VoidOfReality · · Score: 5

    Where I work, we use a bunch of Linux boxes to serve our website. Currently, all of our content is located in ramdisk, as well as a data cache used by the web applications that we run. I'm currently on a project to evaluate the merits of using hard disk for this as opposed to the ramdisk that we're currently using.

    The results of the performance test that I ran were somewhat surprising - it seems the machine with the hard disk actually performed _better_ than the machine with the ramdisk. I'm not a kernel hacker so I don't know exactly why this is the case, but I know that the buffer caching in the kernel really kicks ass (we're running 2.2.10) and I suspect having a ramdisk hampers the kernel's ability to manage the buffer cache (i.e., it takes up space that could be used for buffer cache). Just my $.02...

    -VoR

    1. Re:ramdisk vs. hard disk by Mr+Z · · Score: 5
      The results of the performance test that I ran were somewhat surprising - it seems the machine with the hard disk actually performed _better_ than the machine with the ramdisk. [...] and I suspect having a ramdisk hampers the kernel's ability to manage the buffer cache.

      You're partly right. The other reason is that it forces more pages out to swap, since the RAM disk can't be paged out (I'm pretty sure). Placing your data in a traditional Linux RAM disk has two bad effects:

      • It reduces the total amount of RAM available to applications. This results in more paging activity.
      • It reduces the size of the buffer cache, meaning that files outside the set you've placed in RAM are more likely not cached. This also includes filesystem metadata, such as block bitmaps and the like.

      Even if the Linux ramdisk can be swapped out (I think the new ramfs may be capable of this), it will still likely be slower than a traditional filesystem if you push into swap, because swap gets fragmented over time. In contrast, ext2 resists fragmentation pretty well and so will perform better as a result.

      My 0x02 cents...

      --Joe
      --
    2. Re:ramdisk vs. hard disk by heh2k · · Score: 1

      there several reasons why using a ramdisk instead of a disk-backed fs is a bad idea. eg, no nonvolatile backing store (unless you run a backup script every so often, but that's much worst than most filesystems' automatic syncing). also, it's permanently wired in-core which means non-optimal usage of ram. why waste space on files that are rarely accessed?

      in short: don't do it

    3. Re:ramdisk vs. hard disk by Arker · · Score: 4

      The results of the performance test that I ran were somewhat surprising - it seems the machine with the hard disk actually performed _better_ than the machine with the ramdisk.

      This is exactly what I would suspect - I'm glad you posted this because I don't have time today to test it myself, but this is the result I would bet on.

      The reason ramdisks aren't very useful with Linux is that the kernel has very good buffer/caching code - the effect is the same as having a ramdisk, except that the kernel can dynamically determine the contents based on actual usage. If you stick commonly used data on the ramdisk, you should be able to beat any caching algorithm, in theory, but this requires that there is certain data that you know will always be the most frequently accessed. In the real world, this rarely works out.

      Say you put 16 megs of what you think is the most commonly used data on a ramdisk. Say further that you are right - over time, that 16 megs of data is the most frequently accessed data in your system, by far. If your box is hitting that data constantly, every bit of it, every few cycles, you might get a small performance boost. But more than likely some parts of it will not be hit all that frequently, and there are also likely to be times when it's not being hit at all. Put the same data on hard disk and let the kernel have the ram to manage, and it will manage things on the fly, responding to the actual demands of the system... it's very hard to beat.

      Now, if the caching algorithm was more primitive, something like smartdrv for instance, then you can get a big performance boost out of the ramdisks. I used to play that game quite frequently. But this only worked because smartdrv really isn't very smart.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    4. Re:ramdisk vs. hard disk by el_guapo · · Score: 1

      "because smartdrv really isn't very smart" Hell, it was downright stoopid - it was a SECTOR cache!! In other words, unless the data/file you were accessing just happened to start and end at a sector boundary, it wasn't caching the file at all. Very wasteful and inefficient. It was actually better to set your smartdrv cache at a size just big enough to cache your FAT, and just leave it at that. You got very diminishing returns going beyond caching the FAT.....

      --
      mas cerveza, por favor politically incorrect stu
    5. Re:ramdisk vs. hard disk by Arker · · Score: 1

      Yeah, it's a dumb dog. Norton cache isn't much better. I disagree with sizing it to match the fat though, it's worthwhile at 2 megs.

      Sector caching isn't horribly sophisticated, but it works. It's not that the file has to start and stop on sector boundaries - just that if it doesn't then some other stuff gets cached along with it. Which, of course, also happens with your hardware cache on your hard drive and (in some cases) disk controller . The real problem is just that the cache really doesn't know how to efficiently use more than a few megs of ram, let alone how to dynamically resize itself in response to system usage.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    6. Re:ramdisk vs. hard disk by WNight · · Score: 4

      Yup. Having a ramdisk limits the ammount of ram available for caching and caching caches the files actually used, not just the one you specify.

      There's one time ramdisks are good... If you have a small set of files (relative to your total ram) that you don't use very often, but when you do, you want them to load with as little delay as possible...

      Not really something you'll run into with a webserver where a 10ms lag in HD access will be hidden under at least 50ms of network lag and probably 250ms of rendering lag.

      But, if you run a machine who is doing realtime data sampling and you need to run various transforms on the data, you might want to keep some of the essential tools in ram. (Just a contrived example...)

      The best way to do this though would be to ask the caching subsystem to keep some, higher priority (specified by you, and by overall usage patterns) in ram even when they might have been dumped, because they're either timing critical, or likely to be used a lot in the future. (The way an ASM programmer could hint to the CPU which branch will be taken by making a seldom taken loop fall-through when skipped and a often-taken loop fall-into when taken.)

    7. Re:ramdisk vs. hard disk by Nathaniel · · Score: 3
      "There's one time ramdisks are good... If you have a small set of files (relative to your total ram) that you don't use very often, but when you do, you want them to load with as little delay as possible... "

      That's what I wanted when I was playing Civ:CTP last year. I made a 300M swap file and copied parts of the graphics directory structure to the ramdisk, then pointed at it with symlinks.

      This greatly improved game play. Of course, it was at the expense of slower access to other files, and caused the system to swap out some programs, but I didn't care, because I was planning to play the game for a while and didn't need the other programs in memory.

      Of course, I turned the ramdisk off while I wasn't playing, and had to pay the start up cost of loading the ramdisk each time I turned it back on.

      I don't see how a ramdisk would be a useful thing for a web server unless you could be sure you didn't cause anything you care about to be swapped out. That would require adding more memory, but adding more memory would give you more buffer cache, which would have the same (argueable better) effect as the ram disk in the first place.

      It's a specialized tool, useful in some specific cases. A web server doesn't seem to be such a case.

    8. Re:ramdisk vs. hard disk by SteveSmith · · Score: 1

      As far as I am aware, stock ramfs cannot be swapped. I am not a kernel hacker, but that is what it looks like from the code. Also, if the ramfs expands to far you get a panic that looks very much like you've run out of kernel memory.
      If you use ramfs for anything important, make sure resource limits are set up (I forget where the patch is. Perhaps it is in the newest kernels?), or you risk panics.

    9. Re:ramdisk vs. hard disk by Anonymous Coward · · Score: 1

      you can do this without any ramdisks. just write a very simple program that calls mlockall(MCL_FUTURE), and then mmaps all the "utilities" you need to be cached, finally, this program sleeps forever. It will insure that the utilties stay in the buffer cache.

      The only really good reasons I can come out with to use a ramdisk is if you want your hard drive to spin down, but you still need file based locking or something similar.

    10. Re:ramdisk vs. hard disk by jmason · · Score: 1

      Agreed here too.

      There's another time ramdisks are good BTW -- when you're running from flash memory or a read-only HD or CD-ROM. In that situation, ramdisks have to be used for /tmp, and anywhere else you'll be storing data.

      Sure, you can save data to flash filesystems, but flash memory has a limited number of writes -- so you cache as much as possible to /tmp or RAM, and only write to the flash when you're really really sure you want to do that.

  17. I've done this on slower Macs by HRH+King+Lerxst · · Score: 1

    It's pretty easy to set up a ram disk on a mac. So, in the past, to speed up browsing, I created a ram disk on the mac and moved netscrape's cache folder to this ram disk. This sped up browsing quite a bit since the cache files weren't physically written to disk. IIRC you could even save the contents of your ram disk upon shutdown.

    If you have a slower machine, particularly one where the disk is the bottle neck, and also have ram to spare, this can be an effective tecnique.

    Of course, disks are pretty cheap now...

    --
    No one got beat up more often than the mimes of the old west!
  18. The OS in ROM by Consul · · Score: 4
    There's one other option, as well. Why not place the entire operating system on an EEPROM? Large-sized EEPROMs are getting pretty cheap these days.

    Using an EEPROM would allow you to upgrade/patch the OS as necessary. Also, some clever engineering would make it all but immune to viruses (putting the OS in a true ROM would do wonders for virus protection, but make it difficult to upgrade you system software).

    Hell, you could put Linux and X-Windows with the Window manager of your choice all on an EEPROM and have a superfast, instant booting machine.

    I'm sure this is being done somewhere. Any ideas or links anyone cares to share?

    --

    -----

    "You spilled my egg... I needed that egg."

    1. Re:The OS in ROM by linmanux · · Score: 1

      Macintoshes don't have the huge rom they used to have. Newer macs load the rom from a file on the hard drive into ram on boot. Having a rom on macintoshes was useful when hard drive sizes were in the 20megs and your memory was 128k. These days the need for that speed is given up for the convenience of 60gig hard drives.

    2. Re:The OS in ROM by RobTaylor · · Score: 1

      have a look at the work on using linux in embedded systems and linux CE. lot's of systems already do this. downsides include: FLASH is expensive; the OS usually needs to be loaded into ram to run.

      Rob

    3. Re:The OS in ROM by Dave+Zarzycki · · Score: 3

      ROMs are slow. Ask any true Mac geek about ROM-in-RAM accelerators for traditional Mac OS (version 9 and below). Why? Modern SDRAM latency is less than 10ns. ROM latency is about 150ns. Need I say more?

    4. Re:The OS in ROM by Azog · · Score: 3

      I don't think this would gain you much. When Linux loads, the kernel gets stuffed into memory, and as as far as I know, pretty much stays there until the machine powers down. Maybe parts of it swap out (not sure) but it doesn't get loaded again from the image again. After all, that's why kernels are usually compressed - make bzImage gives you a mostly zipped kernel which uncompresses as it loads.

      So, loading from EEPROM would perhaps get you a faster bootup, but not much more than that.

      There is a project I read about somewhere where people are actually putting a modified Linux kernel directly into the Flash to replace the system BIOS. This is neat because they boot in less than a second - so fast they have to explicitly wait for the hard drives to spin up before looking for them!

      Other embedded systems use Linux on "Disc On Chip" hardware. Have a look at the September Linux Journal, which has a lot on the use of Linux in embedded applications.


      Torrey Hoffman (Azog)

      --
      Torrey Hoffman (Azog)
      "HTML needs a rant tag" - Alan Cox
    5. Re:The OS in ROM by Laser_47 · · Score: 1

      A flash ROM has a limited number of write-cycles before it begins to flip out. You obviously won't be able to use it for anything like swap or /tmp, but shouldn't even use it for medium-term things like email. Also, the initialization routine of several devices takes a piece of the boot time, so you might not notice a big boot increase, but maybe once the system is running, X should load faster.

    6. Re:The OS in ROM by number6 · · Score: 1

      RISC OS does precisely this. Earlier versions were entirely in ROM, newer versions are mostly in ROM. The OS is split into various modules (dozens of them), and if you need to upgrade (e.g. to fix a bug), it can dynamically load a newer version off disc into RAM.

      Means boot-up is damn quick (very little is normally loaded off disc), and if you break your installation, you can still boot up and fix it, because there's a perfectly adequate OS (including GUI, text editor, drawing packages) in ROM.

      Complete GUI based OS in 4MB of ROM, and perfectly happy to run heavy duty apps (web browsers, DTP) in less than 8MB of RAM.

      Look at http://www.riscos.com/ - though the site seems to be down at the moment.

      Alternatively:
      http://www.bifrost.demon.co.uk/comp/riscos/whati s.html

      --
      I'm a number, not a free man!
    7. Re:The OS in ROM by ansible · · Score: 2

      Ummm... The iOpener?

      It has a 16MB flash disk, and it runs QNX. There have been various hacks reported on Slashdot about installing Linux, as well as attaching IDE drives, etc.

      Sure, it boots fast, and for mobile or embedded applications the hardware can be more reliable. But flash is still way more expensive than magnetic storage. Eventually the speed and cost of solid state storage will fall below magnetic and optical, but that won't be for at least a decade.

    8. Re:The OS in ROM by Angst+Badger · · Score: 2
      I think there is work being done on this, and I seem to recall it was mentioned in a previous story, but I don't recall where.

      What I'm curious about is why, once you have a good, stable boot configuration, you can't store an image of memory at the moment the first login screen comes up, and have a boot loader that just loads that image at startup. I realize that this would be undesirable on a lot of systems, but I sure would appreciate this near-instant-on with the ancient IBM Thinkpad I carry around for lightweight tasks -- mostly text editing and my private development projects.

      --

      --
      Proud member of the Weirdo-American community.
    9. Re:The OS in ROM by CromeDome · · Score: 2

      You might wish to check out the Linux BIOS project at http://www.acl.lanl.gov/linuxbios/. It's not exactly the same, but remarkably similar.

    10. Re:The OS in ROM by Jenova · · Score: 1

      I've got a evaul DiskOnChip PC lying on my desk. It doesn't play nice with LILO btw.

    11. Re:The OS in ROM by bbillian · · Score: 1

      There is a company called Neoware that is already doing something exactly like this. They make linux based windows based terminals and need a small lite system. They have a subset of redhat linux on their flash chip. Their mini distribution is called NeoLinux. I think they might even have a distro that fits on an 8MB chip and has X windows, a citrix ICA client (used to connect to windows terminal servers with citrix software) and as I recall even netscape 4.7?!?

    12. Re:The OS in ROM by hey! · · Score: 4

      I'm not sure that your boot up time would be all that much faster. After all, most things that boot from ROM boot fast because they are pretty simple and small. Perhaps better to put /etc/rc.d on diet.

      Read only media are a good idea though.

      For security, if super fast boot time is not an issue, then you might consider booting from CD-ROM or othe read only medium on some machines. If your home page and apache configuration files are on CD-ROM, then your home page cannot be defaced no matter how clever the cracker. Likewise even if somebody does manage to use a root kit on your box they can't replace one of the regular utilities with a trojan if the directory it's in resides on a CD-ROM.

      Anybody know a Linux how-to doing this? I've seen it done with the BSDs.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    13. Re:The OS in ROM by CyberKnet · · Score: 1

      Most common machine emulators (Arcade/whatever) are able to do this... I'm thinking it must be possible for real machines to do it as well somehow, but it would require a boot program something the likes of lilo to achieve... not being a hardcore coder though, I dont know of the hurdles involved in such an effort; might there also be some downsides we havent thought about?

      ---

      --
      Video meliora proboque deteriora sequor - Ovidius
    14. Re:The OS in ROM by Fweeky · · Score: 1

      Win2k does something like this, in the form of Hibernate; it saves RAM to disk, shuts down and when you next power on it loads the RAM image.

      This, however, needs the drivers to support it - I'm one of the lucky ones, I've, in fact, yet to find anyone else who finds it's stable (where as I've found I can even do it in the middle of Q3a... just). Hibernate cuts my boot time from ~45s to ~25s here, which isn't bad, although hardly mindboggling.

      I remember something on the Amiga called FastBoot which took a memory image and let you boot from that; rather more hacky, but cut boot time for my 45s Workbench down to less than 5s.

    15. Re:The OS in ROM by kurokaze · · Score: 2

      Yeah but compare that with the avg 9 to 9.5ms
      access time of a HD and there is a nice
      performance gain (theoretically).

    16. Re:The OS in ROM by Chalst · · Score: 2

      Check out the Diskless nodes Linux HOWTO. It describes the hows and whys of exactly this.

    17. Re:The OS in ROM by Chalst · · Score: 2

      Not necessarly a huge problem: you can simply copy code from ROM to RAM when you boot the machine. Or more economically, you can have a minimal OS on the machine that downloads and unpacks the regular installation from the network.

    18. Re:The OS in ROM by Eil · · Score: 2


      My ProGen laptop did this. If you hit a certain key combination at any time, the BIOS would come to the forefront and copy the entire RAM contents to a 70-something Meg partition at the end of the drive. This did take awhile, though... waking the system up was a small bit faster than booting, but shutting down the system took a LOT longer.

      All of that worked fine for windows, but last I tried it, Linux would begin acting very strangely shortly after waking up. I keep my laptop on all the time (it's only portable when I need it to be. :P), and I blasted the Save-To-RAM partition a long time ago, so I couldn't check to see if newer kernels don't mind it.

    19. Re:The OS in ROM by nstenz · · Score: 1

      The Tandy 1000 has MS-DOS 5.0 burned into ROM. You could either boot from the hard drive or the ROM. It was an interesting idea, but I never really found it all that useful.

      However, there are a few crazy guys out there toying with Linux to create an free, open BIOS... that one should be quite interesting...

    20. Re:The OS in ROM by Teferi · · Score: 2

      I have one too...it makes a great serial terminal to my SPARCstation 5 home server. :P
      I can't find the damn manuals, though...could you point me to somewhere on the net where they can be found?
      "If ignorance is bliss, may I never be happy.

      --
      -- Veni, vidi, dormivi
    21. Re:The OS in ROM by GossG · · Score: 2
      Eproms are slow and not particularly easy to update. If the OS has a good caching algorithm, why not let *IT* decide how to best use the RAM?

      The HD-less network workstation (Internet and Citrix) that Larry Ellison (sp?) is pushing uses a CD-ROM to hold its Linux OS. Presumably the boot-up takes some time, but a good cache algorithm will handle things from there.

      Do we need to push boot times? How often do you need to boot Linux?

    22. Re:The OS in ROM by commanderfoxtrot · · Score: 1

      On the Acorn machines running RISC OS, the
      operating system was in ROM, and it booted up
      extremely quickly compared to Win/Mac machines
      of the time. The roms were slow however, compared
      to RAM, so a neat trick to speed up interpreted
      BASIC (BBC BASIC - original and best!) programs
      was to copy the BASIC module into RAM - I think
      with the "*RMFaster BASIC" command!

      GRCM.

      --
      http://blog.grcm.net/
    23. Re:The OS in ROM by mADASS · · Score: 2

      (LINK)

      sig you!!

    24. Re:The OS in ROM by spudnic · · Score: 1

      I remember back on my old commodore 64 I had a nifty device. It plugged in like a game cartridge, but it mirrored the system RAM (all 64k!). You got the system to the state where you wanted it and flipped a switch on the cartridge. It then dumped the contents of memory to a fast loading file on disk.

      Great for bypassing copy protection checks when a program loaded! ;)

      --
      load "linux",8,1
    25. Re:The OS in ROM by Tralfamadorian · · Score: 1

      I have a macintosh classic that has a version of the operating system in the ROM. Just hold down a certain combination of keys on startup, and it would boot the ROM OS.
      This was useful for when I had to install OS 7.5 on it, but the current OS (7.0) was eating too much memory to run the extract program for the new version.


      He who knows not, and knows he knows not is a wise man

    26. Re:The OS in ROM by pjrc · · Score: 1
      Modern SDRAM latency is less than 10ns. ROM latency is about 150ns.

      Back in the old days before SDRAM, DRAM memory speed was usually discussed in terms of the access time, which improved from about 150 ns in the Apple2 days to about 60 or even 50 ns when EDO DRAM was the most commonly sold. Even this access time spec was a bit misleading. Access time is the time from the beginning of any access (assering the RAS signal) until the data pins have valid data on them, and it doesn't tell the whole story about how rapidly you can really go about getting what you need.

      Nowadays, SDRAM is the standard memory type, and all of a sudden, out of nowhere, the spec went from 60 ns to 10 ns! What did not happen is a six fold increase. The SDRAM "ns" spec is the period of the clock, to which all the other waveforms are sync'd. To access a SDRAM, you need to spend at least one clock giving it the row address (just like the RAS and row row addr for async DRAMs). Then you need to wait either 2 or 3 clocks (it's always 3 when used at the maximum clock) to get the data. This 2 or 3 delay is what's called the CAS latency, and many PC BIOS config let you change it.

      SDRAM certainly is fast, but to say that the latency is 10ns is absolutely false. What is so good about SDRAMs is that the signals are sync'd to the master clock, and that the chips have interleaved banks that work together with the page mode accesses. I'll ramble on about that in a moment, but first a tiny bit of background...

      All DRAM is arranged with the memory cells in rows and columns. An 8Mbit chip may have 1024 rows, 1024 columns, where each cell is 8 bits. To read or write any part of the chip, you first select the row, then select the column, and then go about your business. DRAM cells store information as charge on tiny capacitors. These capacitors slowly lose their charge, so they have to be recharged regularily, or the information will be lost. This process is knows as DRAM refresh.

      DRAM memory reads are always destructive. When a row is selected, all the data from that row is transfered to a buffer. The tiny capacitors and the single transistor that's built with each one drive a fairly long column wire, which ultimately connects to a sense amplifier, and those amplifiers load the data into the buffer. At this point, all the memory cells in that row have lost their data, but that data is located in the buffer.

      The second step to access DRAM is to select the column. With async dram, the CAS signal strobes the address pins (which had better have the desired column address). With SDRAM, the address pins are expected to have a valid column address before the next clock (setup time). For reading, the chip connects to portion of the row buffer to the data bus, and for writing whatever's on the bus is written into the portion of the row buffer that corresponds to whatever column address is selected. After you've made all your column accesses (all within the row you originally selected), you deassert the control signals, and the chip stores the buffer back into the correct row. This is known as the "precharge time", and it takes almost as long as the access time. For a 60 ns EDO DRAM, this would be about 45 ns... so for random reads (not the same row), you'd only be able to do one every 105 ns!

      Fast page mode DRAM (were there ever any DRAMs that didn't do this?) allows you to perform multiple operations on the same row, by deasserting the CAS signal to end the current operation and then reasserting it again for the next. EDO DRAM is basically the same thing as FPM, but they made a minor change so that when reading, the bus would remain driven even after CAS was deasserted. This allowed DRAM controllers to deassert the signal (necessary before reasserting it) before getting the data from the DRAM. There was a lot of hype about EDO, and it did indeed have higher system bandwidth, but in truth it's just a very minor change in the design.

      SDRAM works more or less the same way, but with a clocked interface. Like a lot of technologies, there's been a lot of misleading marketing hype about how great SDRAM is, but it really is just a new front end (with some advantages) on top of the same old DRAM technology. Not having designed a working SDRAM controller (yet), I'm speaking from less experience... mostly just reading data sheet and app notes. To access the memory, you assert RAS and deliver the row address on the first clock (everything is setup and hold relative to the master clock). You deliver the CAS and column in the next clock, and then wait either 2 or 3 cycles for the data. Just like all other DRAMs, you can access mulitple columns in within the same row. This page mode access is what's really fast about SDRAM.

      SDRAM chips have either 2 or 4 banks of memory, and they support an interleaved access mode, where you can read from alternating banks on each clock cycle. This is what allows a SDRAM to actually deliver data every 10ns. A 4 bank SDRAM is actually 4 banks, each allowed to take 40 ns for each column, but the system can read a new column every 10 ns! DIMMs are 64 bits wide (usually 8 chips each 8 bits wide), so you're getting a lot of data very rapidly... but only from within a small block (one row), and only after you spent some time selecting the row, and don't forget that when you're done within that row, you'll have to wait through the precharge time before you can select another row.

      The interleaving trick was possible with older FPM DRAM chips, where you'd select a row from two SIMMs, and then read columns alternately from each one. I recall the Apple did this in some of their (then) high-end Macs. EDO doesn't allow this, unless you have two separate data busses, because the EDO "tweak" is to keep the output drivers turned on after CAS is deasserted, until the entire row access is over (RS deasserted).

      So, dear reader, if you've read through all this long winded posting (which is actually a rough draft for a part of a web page about the DRAM controller in my little mp3 player project), the main point is that DRAM is arranged in rows and columns, and to access the DRAM, the DRAM controller has to go though a few steps. The really fast data rates one typically hears about are only the special case where you're accessing multiple columns within a single row, and that row selection and precharge time are important, even if they're not the specs commonly mentioned.

      The really fast page modes (all DRAM types, particularily SDRAM) are really quite useful for modern computers, because the CPU never really accesses the DRAM... it always communicates with a fast cache memory, and the DRAM controller's job is to fill and flush cache lines (groups of bytes) from/to the DRAM, which always results in accessing consecutive columns within a row.

      So to finish up and bring it around full-circle, Dave Zarzycki's comment not only mistakes the SDRAM clock period for latency, but also ignores the fact that the SDRAM or ROM will only be accessed for cache misses. For a large ROM (like the linux kernel being discussed in this thread), cache misses will be an important factor. Nonetheless, it's not valid to simply compare the single marketing-published (unrelated) numbers for chips and not consider their interactions with the system and its cache.

    27. Re:The OS in ROM by Cato · · Score: 2

      This is common in most decent laptops, and is sometimes called Hibernate - it requires extra code to reset devices to the state they were in at hibernate time, but it always worked very well on my IBM Thinkpad under Windows.

    28. Re:The OS in ROM by tentbob · · Score: 1

      I recently got a Sony Vaio Picturebook, and it has this feature. You can either explicitly put it into hibernate mode, or you can set it so it hibernates when you hit the power button.

      Takes about 30 seconds to do, but it boots in about 5 seconds, which is pretty nice. Eats up an amount of hard disc space = to your memory + overheads of about 20% (on mine anyway).

    29. Re:The OS in ROM by trinitor · · Score: 1

      1st: cdroms do not have special permissions, ok apache sould see everything, but do you want anybody else to see your php script? 2nd: what if you want to change a name or a telephone number in your HTML document? Do you really want to rewrite the cdrom every time you want to make a change?

    30. Re:The OS in ROM by trinitor · · Score: 1

      me too

  19. Why spend ram uselessly? by abe_kabakoff · · Score: 1
    Personally, I have my computer render a new xplanet image every 10 minutes, and that takes enough ram for me. I have a HUGE picture of the earth, though.

    It's better to use ram to do BFS to figure out how to beat your friends when playing connect four or the like:)

  20. Netscape cache by Chris+Pimlott · · Score: 2

    There's no reason to put the netscape cache in swap. There's already a setting for memory cache as well as disk cache. Personally, Netscape takes up enough memory already. Besides, do you really want 20-30M of RAM wasted when Netscape isn't even running?

  21. But eterm is "pretty" by sips · · Score: 1

    That's why people always use it. Supposedly you can use it to make the window transparent. I wish the tend would go away from massive programs that are memory hogs into creating smaller programs that have optional smaller components that can be tacked on at will.

    --
    Respond to s
    1. Re:But eterm is "pretty" by GypC · · Score: 2

      The last few versions of rxvt have "transparency" support. You may have to compile your own version if your distro doesn't compile it with that option...

      "Free your mind and your ass will follow"

    2. Re:But eterm is "pretty" by Enahs · · Score: 1

      You can thank the same guy who brought you Eterm for rxvt having cool features (tho I don't think he did the "transparency" crap.) Rasterman gave rxvt pixmap support. (He did that around the time E was still known as FVWM-XPM or something like that.)

      --
      Stating on Slashdot that I like cheese since 1997.
    3. Re:But eterm is "pretty" by QuoteMstr · · Score: 2

      E is derived from FVWM?

    4. Re:But eterm is "pretty" by GypC · · Score: 2

      Well, yes but all the fvwm code is long gone...

      "Free your mind and your ass will follow"

    5. Re:But eterm is "pretty" by GypC · · Score: 2

      I agree. fvwm2 is my wm of choice. I was just stating a fact.

      BTW I AM Ed Gein, muahahaha.

      "Free your mind and your ass will follow"

  22. A secret fantasy of mine... by LSD-OBS · · Score: 1
    Has always been to make a sizeable RAMdisk, copy the kernel source and vital libraries to it, and then see how fast it compiles...

    Seeing as RAM these days is getting, like, 2Gb throughput (in my benchmark program anyway), that's 100x faster than a really speedy hard drive...

    --
    Today's weirdness is tomorrow's reason why. -- Hunter S. Thompson
    1. Re:A secret fantasy of mine... by technos · · Score: 2

      No faster, I've tried it.. Compiling is processor-bound, even on a quad Xeon 450. Shaved less than a minute off of 'make World, which normally takes just over 48 minutes. I think the Linux ramdisk has processor usage issues, because a ramdisk should in theory be faster than the UW/2 SCSI drive I normally compile on..

      --
      .sig: Now legally binding!
    2. Re:A secret fantasy of mine... by DrQu+xum · · Score: 1

      True that the compilation is processor-bound, but the install-world primarily is disk-bound. If /usr/obj is MFS, the writes are all memory->disk, rather than disk->memory->disk.

      Even better idea - NFS-export the /usr/obj and mount it as / on a diskless workstation. Or even better, make an ISO9660 image from it, add a boot sector, burn it on a CD, and use it as a backup filesystem!

      Which brings us to another great use of an MFS - CD burning. Everything you want to burn in memory -- guaranteed to prevent buffer underruns!

      <voice accent=uk occupation=cable_salesman> The possibilies are endless, mates!</voice>

      --
      DrQu+xum: Proof that the lameness filter doesn't work.
  23. how about /dev by Tharsis · · Score: 1

    a friend of mine tried it out, and it worked, but do you really gain anything from things like this?

    1. Re:how about /dev by SEWilco · · Score: 2
      Putting /dev in a ramdisk is a recommended way to reduce disk activity. The various open devices have their last access time updated often, and those file access times are written to the disk every 30 seconds or so. If /dev is in a ramdisk, those updates are not written to the hard drive.

      The purpose of this is to let the hard drive in a laptop spin down. It is one of several suggestions in an old Linux laptop power reduction list...which I can't find at the moment.

  24. LTSP uses RAM disks by jachim69 · · Score: 1
    The Linux Terminal Server Project (http://www.ltsp.org) creates a 4 MB RAM disk at boot time.
    It gets mounted on /tmp rather than putting the client's /tmp on an NFS mounted drive.

  25. ShareTheNet, LRP by graveyhead · · Score: 1

    Both ShareTheNet and Linux Router Project load the OS into a RAM disk. They do this for the sake of security (just reboot, and voila: new OS installation) and speed. I use a ShareTheNet router on a 386/33 and I regularly see D/L speeds in excess of 100KB/second.

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
    1. Re:ShareTheNet, LRP by Fishstick · · Score: 1

      I've wanted to do something like this for a while. I have a Pentium 150 as my masq box at home tying up a 2.5 gig drive and 48Mb of ram. I'd like to replace this machine with a 486 I have to be able to use the P150 for something else.

      How much ram do you figure you need for a diskless box that needs only the basics to masq to a cable modem? There is 16 mb in this machine and I have a 200 Mb drive that I had considered using at one point. Early on, I only knew RedHat and I didn't have any luck getting a working system to fit on the drive and I have no CD in the machine.

      Now I'm using Debian and I've thought about trying to install Slink on that 200 drive (hook the drive up temporarily to the P150 with a CD and then transfer it to the 486).

      If I could have a system that boots off floppy and runs from a ramdisk, that would save the headache of using that 200 Mb drive (plus, the drive is _really_ old and probably won't work for long anyway).

      Any suggestions?

      --

      There is much cruelty in the universe, John.
      Yeah, we seem to have the tour map.

    2. Re:ShareTheNet, LRP by graveyhead · · Score: 1

      Well, ShareTheNet is the easiest to configure with a Windoze user interface for configuration, but costs around US $70 the last time I checked. LRP is free, but much harder to configure, requiring some experience in GW/FW configuration. Both products should do what you need on a 486/8mb RAM with no hard-disk.

      --
      std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
    3. Re:ShareTheNet, LRP by miks2u · · Score: 1

      LRP is excellent if you are willing to invest a little time in learning about routing. I have been running an LRP router for several months now and I am very happy with it. BTW plan on 16 MB ram if possible, much nicer that way. For current info see http://lrp.c0wz.com

    4. Re:ShareTheNet, LRP by Fishstick · · Score: 1

      Hey, thanks for that! Looks like that is exactly what I wanted and they say a 486 with 16meg should work fine. Gonna try it this weekend.

      BTW, if anyone else looks into this, the LRP documentation is pretty hard to follow, but there is an excellent page on how to get started at:

      http://www.sepa.tudelft.nl/webstaf/hanss/indexlp r.html

      --

      There is much cruelty in the universe, John.
      Yeah, we seem to have the tour map.

  26. Re:Ram is usually needed elsewhere and is expensiv by IcePic · · Score: 2

    You might have an otherwise busy computer
    that is serving thousands of httpd requests
    from harddisk and your filesystem cache is
    flushing itself over and over again, and you
    still want netscapes cachefiles to be in a
    speedy environment?

    Of course, having more RAM than disk is a fine
    solution when the OS buffers with your free mem,
    but obviously everyone can't have that.

    Having a dynamic ramdisk (like /tmp on solaris
    and the aforementioned amiga-ramdisks) is quite
    a big win speedwise for many kinds of situations.

    As long as you have free mem, tempfilecreation
    will go nearly as fast as ram allows, and whenever
    it gets full, you get swapspeed, which is more or
    less what you would have gotten in the first place
    with the cache on local disk anyhow.

    --
    -- I'm as unique as everyone else.
  27. What about vmware images? by socratic+method · · Score: 1

    Better yet, would it be possible to load a 200-400 meg vmware disk image onto a ramdisk and then fire it up? I wouldn't expect any major problems, 'cept having 200mb of free ram to load a Win95 image to. soc

  28. Reductio ad absurdum .... by Alien54 · · Score: 2
    [joke]Well, I suppose you could always put your ram disk in your virtual memory. or your virtual memory in your ram disk [/joke] as one psuedo geek tried to get me to do .....

    :P

    - - - - - - - -
    "Never apply a Star Trek solution to a Babylon 5 problem."

    --
    "It is a greater offense to steal men's labor, than their clothes"
  29. I am just waiting for... by Anonymous Coward · · Score: 4

    ...I am just waiting for the inevitable suggestion that the ramdisk be used for "swap" :)

    1. Re:I am just waiting for... by ruud · · Score: 2
      ...I am just waiting for the inevitable suggestion that the ramdisk be used for "swap" :)

      which isn't such a bad idea if you use the slram patch on a computer where not all RAM is cached (e.g., some Pentium boards with more than 64M)


      --
      --
      bgphints - internet routing news, hints and ti
    2. Re:I am just waiting for... by mikeee · · Score: 1

      No, no:

      You put your swap on a *compressed filesystem* on ramdisk!

      Don't laugh; there used to be products that did this for MS-Windows...

    3. Re:I am just waiting for... by Danny+Rathjens · · Score: 1

      This was actually done at one point by one of the VM guys. I was trying to figure out how to do it so that I could set up my old crappy RAM as a ramdisk and set it to be the swap. That way the faster RAM is used first.
      --

    4. Re:I am just waiting for... by hugg · · Score: 1

      Way back when, I had an Intel AboveBoard with 3 1/2 MB of very very slow RAM (it mounted in a 8-bit slot, if that's any indication). I had 1 MB ram in my 486, so I hacked a Linux kernel to map the memory above 1 MB as a ramdisk. It was fun, but not really worth the effort :)

  30. initrd by baywulf · · Score: 1

    I think most distributions do make use of ramdisks during install. In particular, it is called 'initrd' or initial rootdisk, to hold all the kernel modules until it can determine which ones are needed.

  31. no benefits by austad · · Score: 4

    Just because it's in Ram doesn't mean it's faster. You're still putting a filesystem on it and you have the overhead of the filesystem, it still uses flock(), and if your box dies you lose your data on it.

    I looked into this awhile back. Go ahead and make a 200MB ramdisk on a machine with lots of ram. Make an ext2 fs on it and run some benchmarks on it. Then run the benchmarks on your disk. In most tests, my crappy IDE disk outperformed the ramdisk (1GB of mem in the box, so I wasn't swapping). CPU was much higher when testing the ramdisk, at 100%. I think it's because there was no DMA controller being used when using the ramdisk.

    --
    Need Free Juniper/NetScreen Support? JuniperForum
    1. Re:no benefits by Eunuchswear · · Score: 2
      CPU was much higher when testing the ramdisk, at 100%

      Oh good grief. Of course the CPU usage was higher.

      Hint: with a RAMdisk you don't have to wait for the disk.

      --
      Watch this Heartland Institute video
    2. Re:no benefits by Enahs · · Score: 1

      Yeah, I'd love to know WTF some idiot was thinking when this was moderated as a troll. It's a valid point. God, I hate it when some moron gets moderator status. (this from the guy with permanently-stuck 5 karma...which is why I tear new holes all the time...cause it has no effect...)

      My suspicion is that an examination of the disk cache code might be beneficial for the RAM disk cache. Although I don't know for sure, I'd bet that there's some RAM disk "thrashing" and there's no benefit from having RAM cache. I'd bet that the code for ramfs is totally FUBAR. Someone else here claimed that ramfs allows dynamic resizing; this could be a slowdown factor too, perhaps. I'm just guessing here, brainstorming. But I haven't looked at it (the code) and don't intend to until at least later today...if ever.

      Why not? I really don't have any interest in doing this. I used to do this sort of thing on my old Tandy 1000; copy over a few oft-used DOS utils at boot time into memory. It was only useful if I didn't need to do any work with any apps (the machine only had 640k) and because the thing only had a 5 1/4" 360k disk. The RAM disk wasn't resizable except to edit CONFIG.SYS and change the parameters for VDISK, then reboot (funny how some things don't change :^). Worked like a dream if you needed it.

      --
      Stating on Slashdot that I like cheese since 1997.
    3. Re:no benefits by PD · · Score: 1

      Why is your karma stuck at 5? I thought 50 was the cap, so you should be able to get more karma. Is there a bug or something that's affecting your account?

    4. Re:no benefits by austad · · Score: 2

      Yeah, but the throughput and seek times were slower on the ramdisk than on regular disk. If throughput and seeks were higher, I could see why the cpu would be higher.

      --
      Need Free Juniper/NetScreen Support? JuniperForum
    5. Re:no benefits by Dwonis · · Score: 1

      Throughput and seek times? The original poster was actually referring to a RAM *filesystem* -- it does not emulate a disk.

      The Amiga RAM disk is basically a filesystem that uses AllocMem (malloc) to allocate blocks memory for each file in the filesystem. When files are deleted or truncated, FreeMem (free) is called. This not the same as /dev/ram*.
      --------
      "I already have all the latest software."

    6. Re:no benefits by Dwonis · · Score: 1
      Ramdisks really do suck for most things.

      True, but RAM filesystems don't. There's a big difference (mainly not having to emulate a block device).
      --------
      "I already have all the latest software."

    7. Re:no benefits by rtscts · · Score: 1

      and mine's been going down for no reason at all. i haven't been modded down on any comments, and i haven't moderated recently either...

    8. Re:no benefits by Enahs · · Score: 1

      Ah, I think it's because I like to flame, flame, flame and don't like to meta-moderate, and even when I do, I'm honest. :^) (NOTE: meta-moderating anything as "unfair" knocks your karma down.)

      --
      Stating on Slashdot that I like cheese since 1997.
  32. Not as fast as you would think by rangek · · Score: 2

    I an effort to speed up some calculations I was doing I directed the I/O to/from a ramdisk, rather than the usual HDD. I figured, RAM is much faster than HDD, so I will remove any I/O blocking time. (This particular application was very I/O intensive. Basically, two programs communicating via files. I.e., program A runs a calculation, program B reads the output, generates new input for A, and so on. Very messy...)

    Anyway... I found that there was NO speed up. None. My conclusion, the Linux file system caching whatever (I am a chemist, not a kernel hacker), was extremely good. I imagine that these smallish files were rarely ever actually written and/or read to disk. They were just stored in some cache. Essentially the normal use case and the ramdisk case were basically identical in that all of the I/O was in RAM anyway.

    Now, these files were small, and updated frequently, and I have tonnes of RAM (0.5 GB), and what not (2xPIII450, SCSI disk,...) so YMMV... just my experience with ramdisks, for what it is worth.

    1. Re:Not as fast as you would think by def · · Score: 1
      This particular application was very I/O intensive. Basically, twoprograms communicating via files. I.e., program A runs a calculation, program B reads the output, generates new input for A, and so on. Very messy...)

      Why not just use the system V IPC (ie: unnamed pipes between the processes) and thus let the OS decide the fastest way to handle it? Or do you need the intermediate data to be persistant for some reason?

      --
      WRCT Pittsburgh, 88.3FM
  33. dynamically resizing ramdisk by Andrew+Cady · · Score: 2

    linux 2.4's ramfs dynamically resizes. The traditional method of creating an ext2fs on a ramdisk does not.

    __

  34. Mac RAM Disk... and Netscape by doorbot.com · · Score: 1

    I've used 5 megs of RAM as a RAM disk for Netscape's cache for a long long time. Since MacOS 8 first came out, IIRC. I also turn off Virtual Memory and turn the disk cache down. Netscape is very fast loading pages from the RAM disk... I recommend it to everyone. Although for some reason, no matter what I set the actual cache size to, Netscape refuses to fill the RAM disk. That's nice, but that means that I have 2 megs or so sitting there empty. Go figure.

  35. Ah, the Amiga... by Volatile_Memory · · Score: 1
    With my whopping 2.5 megs of ram I used to run a "sticky disk" in RAM of 880k. The disk stored system files in non-volatile memory.

    The only reason I bring this up is that, if nothing else, the Amiga is a great source of inside jokes, like "Guru Meditation Errors" and "volatile memory"...

    /**
    I have a "Zero Policy" tolerance.

    --

    /**
    I have a "Zero Policy" tolerance.
    */

  36. It's already in ram. by amendol · · Score: 1

    The file system takes care of caching disk access in ram, so if you write to a tmp file, the file system will write to memory (ram), and eventualy write it to disk when it get around to it, or if you do a "sync" at the prompt. If the tmp file is read soon after it was written, then deleted, it will never even get written to disk.

  37. Pointless for the desktop, but good for embedded? by Komodo · · Score: 1

    There's no real need for a desktop RAM disk because the Linux kernel is very good about caching pages from filesystems in memory, and adjusting between processes and disk cache. As long as you don't go overboard on processes, your most-commonly-accessed files will remain in memory anyway.

    I could see doing this on an embedded application where all you want is the critical files and (with the exception of /var and /tmp) everything is read-only, so that you don't need a hard disk, just a floppy or boot ROM.

    I'm not sure if Linux is smart enough to NOT cache pages from a read-only RAMdisk, because that would be silly... the same data could end up stored identically in memory twice! But that's for kernel-hacking types to deal with.

  38. A simular Windows Hack by Ozwald · · Score: 1

    Pre-note: I hate Windows.

    A teacher I had in college did something pretty wacked. He had 16MB RAM on his Windows 3.1 box. He made a 8MB RamDisk, ran Stacker on it to increase it's size to about 16MB, and put the swap file on it.

    The speed increase was huge since Stacker is faster than a hard drive. I'm not sure if this is possible or useful in Linux however. It was more important in those days because MS-DOS could only use a total of 16 MB.

    Ozwald

    1. Re:A simular Windows Hack by QillerPenguin · · Score: 1

      Actually, that's a trick that Microsoft themselves often suggested. Windows 3.1 could only address up to 16 megs, so any ram above that was being wasted. Therefore, the idea arose to use those wasted ram megs by making them ram disks, both to load the temp directories (\temp and \tmp), and even the temp swap file, if possible. It sped up Win3.1 enormously, and even made it a bit more stable. Ram disks certainly made MSWord 6 run a shitload faster...

      --
      -> I hate sigs...
  39. Browser Cache in RAM Disk by lizrd · · Score: 1
    Putting the browser cache in ram is something that is often done by the more paranoid types. This helps to keep any records of what [possibly evil, but more likely boring] websites you have been browsing from being written to disk. This way when the jack booted thugs to break down your door all evidence can be destroyed by just pulling the plug.

    In terms of more practical benefits of this practice, it can be useful for preventing the size of your disk cache from getting too large and taking up space that you *really need* for those N. Portman .jpg's and Metallica MP3s and can help to reduce file system fragmentation.
    ________________
    They're - They are
    Their - Belonging to them

    --
    I don't want free as in beer. I just want free beer.
  40. RAM disks would actually slow it down. by colonel · · Score: 2

    In all honesty, the kernel knows much better than you do which files it's always accessing, so it can optimize itself better than you.

    Type in "free" and you'll see that almost all your RAM is in use -- that's because it's got a RAM buffer of most recently accessed files so they can be accessed again faster. In fact, if you create a temporary file and then delete it, often that file will never touch the disk.

    This, of course, is why you have to unmount disks - the unmounting writes the buffers to the disk so that the changes won't be lost.

    So, it's already done for you, assuming you want a RAMdisk of your most frequently accessed files.

    Sometimes, people want a rarely used file to be easily accessed to reduce load times, which is something that buffering won't help with. So, you just flip the sticky bit on the file, and it's done for you.

    By making a RAMdisk, you're taking away from the available RAM that the kernel could be using for intelligent buffering, and actually slowing down the machine.

  41. What about the RAD disk? by powelly · · Score: 1

    What was even more impressive about the Amiga RAM Disk, was the variation 'Recovable' RAM Disk ( RAD: ).
    (Also know as 'RAM_B0' on OS1.3 and below)
    This kind of RAM disk did not dynamically re-size like a normal RAM disk, but did survive a re-boot.
    Therefore, when your machine crashed, it would boot off the RAD disk in no more than a few seconds. Very useful when developing. :-)

    I suspect that that kind of thing wouldn't be possible on 'standard' PC hardware. Does anybody know of anything like that for the PC?

    --
    --- I'm sure using a computer was fun back in the 80's. *sigh*
  42. security issues by kampi · · Score: 1

    when you're working in a company taking a close look at security issues it comes to mind that one could encrypt the binaries and sources and start s program that needs to run in ramdisk. Thus it will be destroyed whenever someone tries to lay hand on the computer...

    --
    -- a blessed +42 regexp of confusion (weapon in hand) You hit. The format string crumbles and turns to dust
  43. other RAM disk uses by pngwen · · Score: 1

    The uses of RAM disks abound!

    For instance, I've just finished a multi thread system where I used a ramdisk to do message communications. It was very simple to program and wasn't as demanding on the kernel for interprocess/thread communications. The ramdisk is also a great way for a program to store data in case of a crash. Since there's very little overhead for transferring data into and out of the RAM disk it was a wonderful solution for this.

    I hope to write more software utilizing the ram disk in the future because it was so easy to achieve advanced communications between processes. I wasn't confined to signals or using someone's clunky library. (I write high performance programs so anything out of the libc I typically try to avoid because I can make a library tailored to my needs that is much faster than the general case libraries are, but I digress)

    As for the scailability of the things, yes RAM disks can scale as long as you have the RAM for it. That is, in kernels 2.2 and up I believe. Anyways you have to use a scailable filesystem like riser to make it go.

    --
    I am the penguin that codes in the night.
  44. KDE eats it away by Fervent · · Score: 1

    With KDE eating as much as 190 MB on my machine (including cache files for normal system processes), there's no room left for a sizable RAM disk. And I feel blessed that I have 256 MB at my disposal.

    --

    - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

  45. Sysadmin exercise by bee · · Score: 2

    It's a fairly simple and straightforward sysadmin exercise to make a script (well, one line, really) to delete all files in /tmp that haven't been accessed in say 3 days or so. (It involves reading the manpage on 'find'.)

    Heck, at cc.purdue.edu they put quotas on /tmp at one point, just to ensure that students wouldn't fill up /tmp and bring down the machine.

    ---

    --
    At least mafia-owned pizzarias make excellent pizza. Compare to Bill Gates.
    1. Re:Sysadmin exercise by Alan+Shutko · · Score: 2

      But it _isn't_ simple to make a safe way to delete files in /tmp which haven't been accessed in a while. If there were, all Unices would do it. About the only safe time to remove temp files is at boot, because you can't have malicious attackers manipulating /tmp.

    2. Re:Sysadmin exercise by jafac · · Score: 1

      Well, a user ought to do that himself. that way he's well aware that those files he stored in /tmp are gonna disappear on their own sooner or later, and that /tmp is not a good place to store things long-term.

      On my NT box, I run a nightly script that DELTREE's \TEMP, and recreates it. DELTREE seems to give me more leeway against files that are left opened by (errant) processes.

      On the Skywalker Ranch where the Storm Trooper Posse says:

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
  46. Not good. by tietokone-olmi · · Score: 1

    Everything that you could speed up with this sort of a contraption you can do with the linux buffers, only the linux buffers are better because they're implicit. QED.

    (apologies for the lack of verbosity, but I'm not in the mood to go a'whoring after karma today.)

    1. Re:Not good. by PiMan · · Score: 1

      Sorry, can't resist.... It's spelt spelt.

      --
      Windows 2000: Designed for the Internet. The Internet: Designed for UNIX.
  47. The point of diminishing returns by isfry · · Score: 1

    The problem with using an expanding ram disk is the amounts of money you are going to sink into it for more ram to make this useful. You could spend your money on things that will improve system performance better then this. Like an ultra 66/100 drives and controller Scsi drives or Raid controllers with built on cache. You could also spend you money on a faster CPU. A ram disk in the amiga era worked great for a OS that was under 880K but a full blown Linux OS would cost to much and have very little to gain. Also what happens when a log files balloons up and uses your entire ram disk?

  48. The OS in an EEPROM by pcmacman · · Score: 1

    Sounds like a plausible idea, i'm sure that someone will probably come up with some idea that will make it seem entierly unplausible though.

  49. This is already done for you. by Anonymous Coward · · Score: 1

    In a modern virtual memory operating system, like Linux, the difference between memory and RAM is very subtle. Disk files are kept in RAM as memory allows, and traded with memory pages from swap on something approximating a "most recently used" algorithm.

    If you go and start putting your temp files on a ramdisk, you're subverting this efficient process. Should there be a RAM crunch, the OS will be prohibited from swapping out your temp file, even if there is a much more frequently referenced page of RAM in use.

    So don't do it. The kernel is already looking out for you, and it's already taking care of this. A demand paging VM OS is not like AmigaOS, or DOS for that matter.

  50. Fun things to do with RAM disks by Greyfox · · Score: 2
    Copy /usr/X11R6 to a ram disk on boot and then mount the RAMdisk there?

    Maybe someone should do a dist that's optimized to use a 100 megabyte (or so) RAMdisk to speed up the loading of the most used and slowest loading apps. Netscape would probably qualify. All the gnome stuff... star office... The field's wide open.

    Of course, that space might be better used as disk buffers...

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:Fun things to do with RAM disks by henley · · Score: 2

      The problem with this approach is that on *every* boot you have to pre-stuff the ramdisk with files, regardless of whether you're about to use them or not.

      And of course, the memory so allocated is tied up whether or not those programs are in use.

      The tip-top way of achieving this effect is some uber-control over the disk caching mechanisms to allow pre-stuffing of the cache with known files at bootup / login.

      Now's the time for someone to point me at a FAQ telling me how to do this....

      --

      --
      I'd rather have a bottle in front of me than a frontal lobotomy
    2. Re:Fun things to do with RAM disks by elwarren · · Score: 1

      Micro$oft already does this with with M$ 0ffice and some of it's other tools. It gives them an edge, their apps startup faster than competitors, so the user feels like they're not waiting as long.

    3. Re:Fun things to do with RAM disks by Anders · · Score: 1
      The tip-top way of achieving this effect is some uber-control over the disk caching mechanisms to allow pre-stuffing of the cache with known files at bootup / login.

      I suppose cating the stuff to /dev/null should take care of that matter.

      An interesting side effect of filling the cache this way is that it is much faster to copy a file linearly than semi-randomly like the normal "demand loading" does.
      --

    4. Re:Fun things to do with RAM disks by Lips · · Score: 1

      I used to double space my ramdisk under MSDOS so I could squeeze more into it.

      Why can't we do the same to programs in memory? Instead of paging them to disk, compress them. Is this viable?

  51. RAM disks are not useful for "acceleration" by pslam · · Score: 1

    Thankfully caching is an integral part of most operating systems these days, so RAM disks are pretty much useless as "accelerators". At least in the case of Linux, multiple instances of the same memory or executable all point to the same physical memory, with some nifty copy-on-write (COW) tricks. This actually works faster than traditional caching in some (most) cases.

    All a RAM disk does these days is deny any unused RAM disk space for usage by the system. The only possible reasons anyone would possibly want a RAM disk these days are:

    - When your backing medium is removable/doesn't exist (e.g floppy root disks or diskless machines).

    - When you absolutely must have a file's contents in memory for latency reasons, but there are others ways to guarentee this (use mlock() for instance).

    In the example case of the 'trans-warp' Amiga, if the OS performed page caching and had enough RAM, it would never touch the hard drive after all pages were touched. The fact is the traditional use of RAM disks for acceleration is obsolete - page caching in the OS has replaced that.

    The Solaris /tmp in RAM is a nice idea but it's questionable what the advantage is, seeing as it can get swapped to disk.

  52. Re:Ah but we are talking about linux here by BasharTeg · · Score: 1

    Yes, but the question is, WHY are we talking about Linux here. Another problem where FreeBSD has already solved the problem, but now that the Linux community has discovered the problem, they'll throw in a hack job and say it's better than the BSD implementation as usual.

  53. Network block device by mrogers · · Score: 2

    For remote-booting thin clients I would recommend the network block device. It allows you to mount any filesystem on a TCP connection, although you can't use it for swap space (at least not in 2.2-series kernels).

    1. Re:Network block device by TheTomcat · · Score: 2

      That looked interesting, so I looked it up (I'm on a windows machine at work right now, so I have no /usr/src/*) on Google.

      Current state: It currently works. Network block device looks like being pretty stable. I originally thought that it is impossible to swap over TCP. It turned out not to be true - swapping over TCP now works and seems to be deadlock-free, but it requires heavy patches into Linux's network layer.

      Looks like it can swap now. Pretty cool stuff.

  54. Outboard RAM disk is much better by John+Paul+Jones · · Score: 1

    I've been working on a Linux install on a dedicated RAM drive for awhile...
    I have a prototype Platypus Qikdrive8 that has 2GB of RAM, and is addressed as a mass storage controller. Installing on the device is a little tricky, but wow. Fast, mang. Bummer if you lose power, but there are ways around that. (Check the URL). It's cool for non-production use, but if you have the entire system running in RAM, well, it doesn't give me a warm fuzzy. Platypus for one is coming out with a HD-based backup system (data dump from the device to the battery-powered HD if power is lost) for their large RAM drives. That could be the answer. -JPJ

    --
    Feh.
  55. Using a Ram Disk to pre-load files by Happosai · · Score: 1

    I remember when I used to have an Atari ST, and everything was loaded off floppies (sloooooow!).

    I used to regularly put multi-file games (one file per level/map, etc.) into a single executable file that loaded them into a ram disk upon running (and packed (compressed) the executable) - I prefered the slightly longer wait to initially load the game, rather than having to wait between levels whilst files were read off the floppy.

    Disk caching only keeps files in memory that have been accessed previously - the above technique acts as a pre-load for files that will be needed later.

    [Happosai]

  56. Unix/Linux does this for you automatically by IGnatius+T+Foobar · · Score: 5

    Unix/Linux does this for you automatically. The disk caching functionality will keep the disk blocks belonging to recently used programs in memory -- so if you have a lot of memory, you'll simply find that once you've typed a few commands, the machine doesn't have to go to disk to fetch them on subsequent runs.

    This actually reflects the perfect way of doing this: add optimization, but don't bug the users about it -- it's not their problem.
    --

    --
    Tired of FB/Google censorship? Visit UNCENSORED!
    1. Re:Unix/Linux does this for you automatically by Fervent · · Score: 1
      Too bad setting up OSS for my Aureal Vortex 8030 sound card was such a pain in the ass in Linux. *sigh*

      It should be "This actually reflects the perfect way of doing this that Linux does for only a very limited number of things: add optimization, then bug the hell out of users for it -- it's they're problem if they can't figure it out. We're 733t here..."

      --

      - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

    2. Re:Unix/Linux does this for you automatically by joechiu · · Score: 1

      Unix/Linux does this for you automatically. The disk caching functionality will keep the disk blocks belonging to recently used programs in memory

      You can additionally turn on the "sticky bit" to improve program loading performance using "chmod +t filename".

      From the info page for chmod:

      3. save the program's text image on the swap device so it will load more quickly when run (called the "sticky bit"). For directories on some systems, prevent users from removing files that they do not own in the directory; this is called making the directory "append-only".

      That is, when the program terminates, reclaim the memory, but keep the program "text" in swap. For small programs, this cuts down on the text-load overhead. Let's say you had a script that calls grep and sed a gazillion times (instead of writing it all in perl) -- with the sticky bit, grep and sed would load-and-fixup only once for each program.

      Hmmm... from looking around the archives, it looks like Linux might (or might not) ignore the sticky bit... It looks like some research is in order here...

    3. Re:Unix/Linux does this for you automatically by geekd · · Score: 1

      I am so sick and tired of people bitching about "Linux doesn't support my xxxx new hardware".

      There are many many places where you can find lists of supported hardware. If your card is not on the list, either get a new card, don't use linux, or use linux and keep you mouth shut about it.

      I used to complain about no open GL support for my video card. Then I bit the bullet and bought a Voodoo 3 (this was when only voodoo cards had openGL for Linux).

      The only operating system that supports just about any hardware right now is Windows 98/95. I'd say Linux hardware support is way better than NT or Windows 2000 (or Mac :-)

      What the heck are you doing bitching about sound card support in this forum anyway? I thought we were talking about RAM discs.

      What the heck am I doing bitching about people bitching in this forum. I thought we were talking about RAM discs.

      -geekd

    4. Re:Unix/Linux does this for you automatically by Fervent · · Score: 1
      *buzzing noise* Support for things like graphic cards and sound cards are far more robust in Windows 2000 (all of my hardware worked right out of the box). I can't say the same thing for Linux.

      And the card was proported to work on the compatibility lists. They didn't mention you had to download OSS and configure it first.

      In addition, the Aureal card I had was far from new. I bought it over 2.5 years ago. Considering the support Linux now has for Microsoft's newest optical mice (that came out less than 6 months ago), you'd think a 2.5 year-old card from an established company (Diamond MM, now owned by S3) would be supported.

      --

      - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

    5. Re:Unix/Linux does this for you automatically by Fluffy+the+Cat · · Score: 1

      If Aureal had supplied programming details for their cards rather than providing a bunch of closed source drivers that don't work properly with newer kernels, then support for their cards would be included with the standard kernel and installation would be significantly easier. Blame your hardware vendor for being stupid.

    6. Re:Unix/Linux does this for you automatically by BJH · · Score: 1

      Well, I'd say decent caching optimization is a little more important than sound for most serious Linux shops. Just because it's high priority for you doesn't make it a big deal for everyone... and if it's annoying you so much, fix it yourself.

    7. Re:Unix/Linux does this for you automatically by Fervent · · Score: 1
      linux.aureal.com

      You were saying?

      --

      - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

    8. Re:Unix/Linux does this for you automatically by IGnatius+T+Foobar · · Score: 2

      The sticky bit keeps a program on swap, but swap is probably still a disk. This was useful in the days when you might have had a swap device that was faster than your primary storage system. Since most installations are either using a single disk, or have disks that all run at the same speed, this doesn't gain much. I'd like to be able to redefine the sticky-bit to tell the kernel "Keep this program resident in memory" -- but I wonder whether that would break anything?
      --

      --
      Tired of FB/Google censorship? Visit UNCENSORED!
    9. Re:Unix/Linux does this for you automatically by Fluffy+the+Cat · · Score: 1

      linux.aureal.com contains a bunch of closed source drivers (the source supplied is for a wrapper that interfaces between their closed source drivers and the kernel interface so that it's not restricted to a single compiled kernel) which don't work properly on recent kernels (2.4). There is insufficient information availabile there for a free driver to be developed. Given that that's what I said originally, what's your point?

    10. Re:Unix/Linux does this for you automatically by Fervent · · Score: 2

      I have a 2.4 kernel and it works fine.

      --

      - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

    11. Re:Unix/Linux does this for you automatically by Fluffy+the+Cat · · Score: 1

      The drivers available at linux.aureal.com do not even come close to compiling against 2.4. I just tried, and ended up with several pages of errors for my troubles.

    12. Re:Unix/Linux does this for you automatically by Nathaniel · · Score: 2
      "Unix/Linux does this for you automatically."

      True, to a point. Linux will use available ram as a disk cache. It won't choose to swap programs out in order to provide more space for the disk cache, even if you have programs you haven't used in a long time, and a little more disk cache would mean you could get everything you are using into the disk cache, instead of rotating a bunch of stuff through the cache.

      This is because Linux gives higher priority to programs (even seldom used programs) than disk blocks (even frequently used disk blocks).

      Using a RAM disk can give you a way around that by letting you dictate that the disk cache is more important than keeping other programs in memory, and allowing you to specify which programs should be cached.

      This isn't a really common problem, which explains the fact that RAM disks aren't used all that often.

    13. Re:Unix/Linux does this for you automatically by jbrauer · · Score: 1

      To some degree this is correct, but for many applications this is not. As some people have mentioned, applications which are write intensive will be bandwidth limited by the syncronizations to the physical media, creation of temp files and the like. Another problem with disk cache is that it is much less deterministic for real time considerations. Systems with heavy load also have a tendancy to thrash disk cache and migrating critical files to a disk cache might be a better idea. Of course, there is always the option of solid state disks, which provide many of the benefits of ramdisk and few of the disadvantages in hard disks.

  57. You forgot one, people by Captain+Pillbug · · Score: 1

    Ramdisks are ideal for laptops, where accessing data in memory doesn't eat battery life as fast as moving around all those mechanical parts in order to do a disk seek. At least in the old days, when you copied all your system software + a couple important applications to a ramdisk, it'd boost battery life considerably.

    1. Re:You forgot one, people by Captain+Pillbug · · Score: 1

      No one said it'd be cheap. But some people will buy battery life at any price.

  58. Re:FreeBSD dosn't have the portability of other OS by Enahs · · Score: 1

    I'm not sure what SMP capability has to do with portability or RAM disks, but I'd have to agree. Linux machines seem to be built to work with tools like the GNU tools; FreeBSD is BSD (as close as a *BSD can come to being exactly like another) and therefore works with FreeBSD and...well...FreeBSD.

    Try to compile FreeBSD's "chmod" on a Linux box sometime. Ugh. (Yeah, I know; that's irrelevant too. :^)

    --
    Stating on Slashdot that I like cheese since 1997.
  59. Your answer. by Enahs · · Score: 1

    >Yes, but the question is, WHY are we talking
    >about Linux here.

    The answer, from the original post.

    >Does Linux support dynamically reseizing Ram
    >Disks? Surely they would be vital in remote >booting, diskless thin clients."

    If you think that it's a viable option, why not help draw up some sort of plan for porting the solution? Or did you *really* think that you could persuade someone to use FreeBSD? If your plan was the latter, you're just another troll.

    --
    Stating on Slashdot that I like cheese since 1997.
    1. Re:Your answer. by Enahs · · Score: 1

      Ah, but I have been exposed to alternatives. Back in the ol' CS college days, I had to write stuff for Suns and SysV machines--and I learned pretty quickly that I could do the SysV stuff at home on my own machine if I had a Linux box.

      Mind you, I didn't jump in feet first half-cocked. I asked around. I debated with myself. Ultimately, I talked to a genius of a man who had used both FreeBSD and a Linux box, and he described some of the differences, and why he couldn't use FreeBSD in the class.

      After that, I haven't looked back since.

      Really, your comment doesn't make sense. I understand that one might want to consider FreeBSD (it has it's cool points--hell, I'd cream my jeans if I could "make world" my Linux box :^) but, quite frankly, the question pertained to Linux. I seriously doubt you'll win any *BSD users just due to the fact that it has dynamically-resizable ramdisks.

      What the original poster wanted is kinda irrelevant, anyway. There are far better ways of speeding up a Linux box than this, and I'm sure the tricks are identical or at least similar to the FreeBSD comment. So the original post was trolling.

      PS FreeBSD isn't UNIX for the same reason Linux isn't UNIX. UNIX is a brand. Neither are branded UNIX. I remember at one point Caldera was working on getting their distro branded as a SysV UNIX, but I don't know what's happened since.

      --
      Stating on Slashdot that I like cheese since 1997.
  60. [OT] Aterm? by Mr+Z · · Score: 1

    Where can I find it? And how fast is it compared to a plain xterm? One of the reasons I hate ETerm is that screen refreshes are SO FLICKERY SLOW, even if I shut off the background pixmap. xterms are pretty snappy by comparison.

    --Joe
    --
    1. Re:[OT] Aterm? by osu-neko · · Score: 1
      Where can I find it?

      apt-get install aterm

      I don't know the rpm equivalent, sorry...

      --

      --
      "Convictions are more dangerous enemies of truth than lies."
  61. *everything* there! :) by hawk · · Score: 2

    When the third drive died on my powerbook 180, I created a seven floppy boot-set. I had the thing maxed out at 14mb, so I could install system 7.1, word 4 (I'd been using 5, but backtracked), and excel 3, along with my usual utilities, and still have enough room left to work . . .

    Of course, given that batteries were only good for 1:40, and that some genious diddn't include a capacitor to back up ram while changing . . .

    hawk, who still has the pieces of that machine

  62. The "Traditional" Use Of Linux RAM Disks by jd · · Score: 2
    Way back when, in the Oooold Days, Linux had problems with large memory machines. RAM disks were the only way to effectively utilise memory in excess of 64 megs.

    The same is probably true, today. Simply because few people will be able to test and refine the code on extreme memory machines, RAM Disks will probably still be the way to go.

    There is -one- other case for RAM Disks that I can think of. =VERY= Extreme RAM cases. Where the size of RAM is comparable to, or exceeds, the size of the HD(s), it is not efficient to keep swapping to and from drives. They're slow. It's much faster to simply dump the drive(s) to RAM and write-through to disk a you go. All actual read operations, after boot, would be to RAM.

    Beyond that, fast IDE's or SCSI's, with decent on-board cache, are all-round a better idea than RAM disks.

    Going back to the extreme memory case for a moment, this would be ideal for a laptop. Non-volatile RAM is going to eat batteries far less than a mechanical drive. (Especially on power-up, or where there is extensive disk activity.)

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  63. Virtual Memory by klund · · Score: 2

    Oh boy! Virtual Memory! I'm going to make a HUGE ramdisk!
    --

    --
    My word processor was written by Stanford Professor Donald Knuth. Who wrote yours?
  64. /tmp is there an easy way? by josepha48 · · Score: 2
    I have been wondering the same thing as the asker of the question. I am planning on buying a new machine and thinking that if it is possible to load some parts of the sytem into memory rather than disk this may make it faster. On thing I'd like to have in memory is my /tmp space. I'd also like to have /swap mounted as a RAM disk too. I read a ramsidk howto and it did not seem like an easy task. Is there an easy way to make this happen?

    A machine with 512k that is a personal work station coul dhave 256k for memory, 128 for /tmp and 128 for swap. This could add in that necessary performance increas I need for video.

    I don't want a lot, I just want it all!
    Flame away, I have a hose!

    --

    Only 'flamers' flame!

  65. RAM can speed tasks by sjeffers · · Score: 1

    I been using the BSD equivalent, mfs, for my /tmp directory for a few days and have noticed a suddle improvement in X performance. All the documentation i've read about mfs has given increasing performance of /tmp as an example. I believe mfs is also resizable. I'm not sure but it would be logical if mfs didn't use file system caching. If this is true then mfs is a way to give one application which uses a directory priority for having it's files stored in RAM to boost it's performance above others.

    As far as increasing web caching performance, a better approach is to use squid, which has the option of storing things in RAM without the need for creating a file system. Also having a huge disk cache speeds things up since disk speed is faster then network speed.

  66. Quake by ram. by aminal · · Score: 1
    Okay so its off topic

    Create a ram disk on a win32 machine and install quake to it - the dir only has to be like 70Mb so something - so if your running round with like 256 its no problem, then play quake.

    It flies :)

    --
    Aminal - DRUMMS!!
  67. Using slow ram as a swap disk by Dr.+Manhattan · · Score: 1
    ...but it can be. Honest. Do a search on "slow RAM". Or take a look at this link.

    Many many motherboards allow you to install more RAM than their L2 cache can handle. My Asus P5A can only handle 128MB, for example. Add more RAM and it's acessible, but not cached. So things get dramatically slower.

    The slow ram can, however, be used as swap. Much faster than a swap partition on a hard disk, though obviously not as good as real cached RAM.

    I've got an old VLB 486 motherboard. And I've got a cacheing VLB IDE controller which takes 30-pin SIMMS. I figure I'll keep the OS on a SCSI drive, and put in an old 40MB IDE disk with a 16MB swap partition and 16MB of cache RAM. Should be a pretty fast swap disk. I just need to find the time to set it up. :-)

    --
    PHEM - party like it's 1997-2003!
  68. Re:Why not just 1 Netscape? by Hanzie · · Score: 1

    I think you just earned the "top suggestion of the quarter" award.

    --
    ********* sig: If you don't like the law, get filthy stinking rich, and buy a better one.
  69. Paging should do this job by rob_from_ca · · Score: 2
    In most modern operating systems, using a ram based filesystem will only confuse things. The entire operating system was designed with the thought in mind that disk access was slow; hence the paging, virtual memory, and caching subsystems. Essentially what all of these things do is work together to assume that the right peices of code/data are in memory more often then not. As something is loaded, the OS will defer loading it into memory until it is actually called upon, where it will read it off the disk (generally asynchronously, assuming that it will take a long time). It should remain in memory until physical memory gets tight, and/or that peice of code/data hasn't been used in a while. All of these subsystems working together are generally much better at guessing dynamically what needs to be in RAM, rather then the user taking away 100mb of RAM and forcing all of that into memory. Theoretically, if you had enough RAM, the OS would pretty much load everything it needed into memory and be done with it. So if you want more benfifits of a "ramdrive", then add physical memory to your system.

    The only real place I can imagine where this might help is one where there is a lot of disk writing going on on a particular filesystem, and the system is so busy it never has a chance to flush it's cache without causing incoming requests to wait, such as a way overloaded mail server (I've seen this). Of course, the problem there is that it's not a night and day performance difference anyway when you're talking about modern disks with built in caches and OS's with decent lazy write techniques. And of course the little tiny issue that you're completely compromising your data integrity since if the system dies, everything in that file system goes with it. A far better solution, if you feel you must second guess the OS's caching/paging/vm system, is a controller card with on board cache and a battery backup. This maintains your data integrity, and will give you a little performance boost for busy disks with lots of writing. Of course, you'd still probably see just as much performance improvement by adding memory...

  70. crack proofing by smillie · · Score: 1

    For a web server, I thought it would be interesting if the OS were run on a ram disk. chroot to the ram and if a cracker got it and modified files, it wouldn't be difficult at all to fix.

    Could even have lids just reboot the box on signs of trouble

    --

    Dyslexics Untie!

    1. Re:crack proofing by Sunlighter · · Score: 1

      Yeah, but if you don't fix the problem that let them in, they can just get in again.

      -- Sunlighter

      --
      Sunlit World Scheme. Weird and different.
  71. How about this then by cyber-vandal · · Score: 1

    Using this with the Livid project. Surely a RAM-based FIFO would be quicker than a disk-based one?

  72. Re:Ram disks are stupid. by Enahs · · Score: 1

    Valid point, even though you only have the 0. This may explain, also, why RAM disks aren't really any faster on a Linux box than just reading from disk.

    --
    Stating on Slashdot that I like cheese since 1997.
  73. Look elsewhere... by mr.ska · · Score: 2
    Does Linux support dynamically reseizing Ram Disks?

    Sorry, no. You'll have to run Windows 98SE for that pleasure. Linux is unnecessarily stable for such a task.

    --

    Mr. Ska

  74. If you have that much RAM... by defile · · Score: 2
    Just increase the size of your buffer cache.

    All of the data stored on your disk is already proactively cached, most recently used is much more likely to be in cache longer.

    Full blown RAM disks have limited applications, especially when the buffer cache can almost always do a better job. If you have gobs of RAM you're not using, increase the size!

  75. Apple IIgs by paulywog · · Score: 1

    That's exactly what I used to do with my Apple IIgs with a utility called FlashBoot. I could create a disk image with the software I needed (the OS and AppleWorksGS) and load it into a RAM disk. I think the RAM disk took up about 3M of my total 5M (which cost me about $300 by the way!). As long as the computer stayed on, things ran pretty fast! (at least for a 4MHz processor)

  76. To summarise what I've read here by henley · · Score: 1

    hope no-one minds a swift summary of the responses to the question: why not use ramdisk more?

    Case FOR the motion:

    1. Faster /tmp
    2. Controllable program pre-load
    3. wipeable cache
    4. better network boot/operation utilisation

    Case AGAINST the motion:

    1. /tmp already IS ramdisk on some OSes; doesn't fix disk space util problems but can increase access patterns if whole OS's applications co-operate with good housekeeping practices. These benefits can be obtained with a good caching algorithm anyway.
    2. Effective Disk caching algorithms implement all of the benefits of ramdisk program "caching" with fewer drawbacks AND make better use of memory space and time (i.e. only caching what's used rather than (statically?) pre-determining cacheable programs and then living with that)
    3. Programs that need dynamic temporary / semi-persistant storage can do it a lot quicker in memory without filesystem overhead, and anyway gain their long-term benefits from a persistent sotre rather than semi-persistent RAM disk
    4. The special case of network boot/operation is better handled with dedicated thin/optimised protocols (network block devices et al) rather than a general purpose solution with a lot of overhead (i.e. that filesystem rubbish)

    My conclusions? Ramdisks are mainly an anachronism from an earlier time before better solutions to the problems became available, and are better left alone. Performance and/or resource utilisation efficiency is better served by more specialist tools such as caching, sensible application design, network block devices etc etc.

    --

    --
    I'd rather have a bottle in front of me than a frontal lobotomy
  77. What about hardware RAM disks? by swb · · Score: 2

    What about hardware RAM disks?

    I've seen some (don't remember where) that were designed to be used like a normal disk but on the insides they were a bunch of battery-backed RAM. I believe the high-end models even had the ability to automagically sync to a physical disk in the enclosure on power loss/off/shutdown and restore to RAM.

    I think the advantage of these solutions over a conventional host-based RAM disk was that by treating the RAM disk as a SCSI device you could make it much faster than conventional host RAM (special controllers, interleaving, etc).

    I don't remember the name of the company that was selling this and they don't appear to be around anymore. Maybe the cost of RAM relative to the sizes people needed just made it commercially impractical.

  78. What's the point? by shippo · · Score: 2
    Due to buffer cache, the only read need for RAMdisks is during installation, bootup (initrd, as per RedHat), or in embedded systems.

    Linux installation from floppy uses the RAMdisk to store the installation filesystem. This is not only quicker than running from a floppy, but allows the RAMdisk image to be compressed. Debian and Slackware do this, and I presume other do as well.

    When I've used RAMdisks in the past on other systens, it has always been when other media was slow. A common one was under DOS on a floppy only 8086, copying COMMAND.COM and to a small (30K) RAM disk (stored in spare RAM on the non-standard video adaptor IIRC), and setting COMSPEC accordingly. Saved me having to swapp floppies just to load COMMAND.COM on program exit.

    The only advantage I can see on a non-embedded Linux is if you have a some data or executable that you need to guarantee is in cache, and pre-load this into RAM disk before-hand. Faking benchmarks springs to mind here.

  79. I can't believe this was posted! by evilviper · · Score: 1

    If anyone wants to argue that /. is going downhill, this is prrof enough. Just because one person doesn't know that ramdisks are very often used, is it really worthy of posting? Last time I checked this wasn't a technical support forum! Do you think my question would be posted if I asked what license Linux is released under? No? Than why this, asking what uses ramdisks are.

    --
    Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    1. Re:I can't believe this was posted! by evilviper · · Score: 1

      Oh, such a crippiling shot!!!!! heh heh. #1, what the hell does my sig have to do with anything? #2, Prove it! Should I believe it's wrong just because you say so? Give me proof, then I'll listen to an anonymous coward's baseless rants.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  80. RAM Disks can rock by Strog · · Score: 1
    I used to have my Apple IIgs setup with a ram disk. The standard back in '87 was to have 256k and a lot of people upgraded to 512k. I bought an Applied Engineering RAM disk board. You plug the AE board into the memory slot and plug you memory board into the slot on the AE board. Theere was also a connection to piggyback another memory board. I had a 1.5mb plus the 256k on the MB(which was later upgraded to a 512k MB). The RAM disk also had a power connector to plug into the wall and a sealed battery about the size of a motorcycle battery. You could go into the bios and boot to it if you wanted to. I used to load my most used programs into the RAM disk and boot off it. It used to come up nearly instantly. The only time I ever had to wait on my computer is I decided to play some games or save to the floppy drive. I later got into Paintworks Gold and it needed 1.25Mb to run it so I gradually stopped using the RAM disk.

  81. Reality check here by Anonymous Coward · · Score: 1

    It seems that a lot of people here don't really understand how the bowels of a modern OS work. Now, I'm not claiming that I'm an expert at this. But I have read some OS books, and they do point out why it's no use.
    Basically, your memory is divided in pages, which are kept all on disk. The pages that are needed are brought into physical memory, the other ones stay on disk. Very finely tuned algorithms make sure that what's in memory really needs to be there, to optimize efficiency.
    Now, if you force an entire file, or even partition, into ram, you're inevitably putting a lot of data in your memory that doesn't get accessed. If you put your NS cache in there for example, then you have extra space for growth that's being wasted, plus all the space taken by cached pages you're not revisiting, and are thus wasted.
    So, basically, your app may go faster, but your system will go slower, because it has less physical ram to hand out to everything, so it can keep less in physical memory. So, the best choice still remains to let the OS decide what belongs in physical ram, because it knows best what should be there.

    So. Why did it work years ago on the old systems? Because they had no harddrive. Paging to disk was too slow due to the extreme slowness of floppy drives. As soon as harddrives became a commodity however, paging to disk became so fast that it ruled out ramdisk as a speed option.
    The reason the install floppies use a ramdisk is because they have so little to load during the entire install that it can all be held in ram, so they run out of ram because it's faster (and they can't page to disk anyway, since you need to be able to wipe that clean during the install).

    And then finally we come to the point mentioned that the swap should be in memory. Think people! The swap is the spillover for everything that doesn't fit in memory. If you put it in memory you'll be able to fit just as much (or most likely even less) stuff in memory, leaving you in a situation where you're not going to be able to load as much apps. In regular (light load) use the swap isn't even used all that much. Only stuff that's just hanging around doing nothing (like that sshd you rarely use to log in with) will get swapped out (negating the point of not running a rarely used daemon because it "takes up memory", which it doesn't).

  82. It already works for Solaris by X-Nc · · Score: 1

    Solaris uses RAM plus disk for /tmp. It'll put everything in RAM till the ramdisk is full then start using the allocated disk space. It works very nicely, too.

    ---

    --
    --
    If I actually could spell I'd have spelled it right in the first place.
  83. I Do This On the MacOS by namespan · · Score: 2

    My parents have a Performa 6116; it has a PPC 601 @66 mhz and a 33 Mhz bus. Running Netscape 3 is quite a task for the poor machine (Netscape 4 is right out :).

    It was even more of a task before I did just what you described and made a RAM Disk and told Netscape to use it. Sped it up by about 3 times.

    --
    Libertarianism is rich wolves and poor sheep playing gambler's ruin for dinner.
    1. Re:I Do This On the MacOS by MsGeek · · Score: 1
      My parents have a Performa 6116; it has a PPC 601 @66 mhz and a 33 Mhz bus. Running Netscape 3 is quite a task for the poor machine (Netscape 4 is right out :).

      I run NS4.05 Standalone on a Performa 460, aka LCIII+. 68030/33MHz. It is slow, (particularly when rendering tables) but it works.

      However, my P460 has the max of 36MB RAM...how much RAM does the P6116 have? RAM might make a difference. Both my P460 and that P6116 have FPUs...probably NS4 wouldn't work at all if I hadn't installed a 68882. NS uses FPU math to display graphics, oddly enough.

      Of course, I'm one of those insane people who love to show off what old Macs can do, or what old PCs can do with Linux rather than Windoze installed. I don't believe in disposable computers. If you can make a machine usable again, do it and don't throw the thing in a dumpster. Then if you don't personally need the computer, give it to someone who does. Bridge the "digital divide" one person at a time.

      --
      Knowledge is power. Knowledge shared is power multiplied.
  84. Amiga Memories by BigBlockMopar · · Score: 2
    With my whopping 2.5 megs of ram I used to run a "sticky disk" in RAM of 880k. The disk stored system files in non-volatile memory.

    Yup. I did that too. A500, Workbench 2.1, 20 meg SCSI hard disk.

    Even though the 880k of RAM could have been better used for program space, I found that the performance penalty of having the system files on a slow band-stepper hard drive was such that the memory hit was less obtrusive.

    And, I had a later-revision A500, into which I'd plopped a Fat Agnes chip. With a little hacking, of course, it was possible to set up the memory expansion on the bottom of the A500 to become an extra 512k of Chip RAM; the 2 megs in my hard disk controller setup was the Fast RAM.

    The only reason I bring this up is that, if nothing else, the Amiga is a great source of inside jokes, like "Guru Meditation Errors" and "volatile memory"...

    Or, if you've been downloading too much off the local high-speed (2400 baud!) Warez BBS, "Your Amiga is alive..."

    Ya know, a Mac says, "Sorry, a System Error has occurred"; Windows tells you that "This program has performed an illegal operation" or any number of other nasty things.

    But, besides Eudora 3.x ("Eudora is tired of waiting for the system to respond."), can anyone else think of any really nasty or sarcastic error messages like the Guru Meditation Error?

    --
    Fire and Meat. Yummy.
    1. Re:Amiga Memories by Volatile_Memory · · Score: 1
      Or, if you've been downloading too much off the local high-speed (2400 baud!) Warez BBS, "Your Amiga is alive..."

      The "Amiga is alive" virus is my favorite destructive bug ever.

      For the uninitiated (or those that just never owned an Amiga), a black screen would appear with green text fading in and out:
      "Something wonderful has happened...
      "Your Amiga is alive...
      "And better yet...
      "It has a virus..."
      Then the ugliness occurs. The particular strain I had would (in addition to replicating itself) eat floppies and crash your system. Not that bad floppies were uncommon on the Amiga...

      volatile_memory

      /**
      I have a "Zero Policy" tolerance.

      --

      /**
      I have a "Zero Policy" tolerance.
      */

    2. Re:Amiga Memories by dnxthx · · Score: 1

      But, besides Eudora 3.x ("Eudora is tired of waiting for the system to respond."), can anyone else think of any really nasty or sarcastic error messages like the Guru Meditation Error?

      At the threat of being off topic, my personal favority "nasty" error message of all time is the message "Fucking sun blows me" when I used to try to mount FreeBSD partitions under Linux. I don't know if it's still there or not, but I got some good miliage out of that one.

    3. Re:Amiga Memories by humanerror · · Score: 1

      MPW (Mac OS) C compiler errors: http://www.pbbt.com/Directory/Jokes/58 7.html

      My favourite was always "Too many errors on one line (make fewer)"

      "You can't modify a constant, float upstream, win an argument with the IRS, or satisfy this compiler" is another classic.


      --
      --
      "We're an apex predator with the fecundity of a base level herbivore... We're a virus with shoes..." RazorJAK
    4. Re:Amiga Memories by esonik · · Score: 1

      I remember that Harddisks occasionally got renamed to "Lazarus" when they had many filesystem errors and you ran the filesystem check.

    5. Re:Amiga Memories by Karajorma · · Score: 1

      That was cause diskdoctor thought it had done a good job of getting back the data on the disk. More usually it meant that you needed Jesus to get your data back.

    6. Re:Amiga Memories by BigBlockMopar · · Score: 2
      The particular strain I had would (in addition to replicating itself) eat floppies and crash your system.

      Yeah. The strain of the virus that I caught didn't do anything overtly destructive. It just replicated.

      Not that bad floppies were uncommon on the Amiga...

      How could you tell that you had a virus?

      --
      Fire and Meat. Yummy.
    7. Re:Amiga Memories by BigBlockMopar · · Score: 2
      That was cause diskdoctor thought it had done a good job of getting back the data on the disk. More usually it meant that you needed Jesus to get your data back.

      Urk. I think that was something that I'd very carefully closed away into a little, isolated part of my mind, sealed up, and walked away from, hoping that it would never corrode its way out through the barriers that I had built...

      And now look at what you've done.

      --
      Fire and Meat. Yummy.
  85. MySQL and /tmp as a RAM disk by Precision · · Score: 1

    While testing the databases for SourceForge we found that by mounting /tmp as a ram disk we saw about a 10-20% performace boost.. works great.

    --
    - U
  86. faster than 100 linux'es ;-) by mephinet · · Score: 1

    what i love of this idea is the fact that a true hardware system can react a hundred times faster than a hard-/software system as used today for pcs. think of a linux reacting within nano-seconds to input -> kewl thingie. if you'd program the linux kernel in vhdl (this is a c++-like hardware programming language used to create chips), you could get great performance out of it! so, lotta work for the electronic experts - like me :)) mephinet

    --
    Use the source, Luke!
  87. /usr mounted as iso9660 by theMAGE · · Score: 1

    I was thinking to convert my /usr (which I mount read-only) to iso9660. Would that reduce fragmentation?

    I am looking for a _simple_ filesystem to store a bunch of read-only files. There is no need for all the metadata overhead and I guess iso9660 will do it.

    Of course it will make upggrades harder, but with some script to copy all the /usr into another partition, install/upgrade there and then mkisofs it back it can be done.

    Different subtopic:

    I am not interested in a dumb ramdisk: it is stupid to load programs from ramdisk into kernel caches/buffers and then to main core.

    Optimize the kernel so it does not need to "load" a program from /usr in memory: it's already there, execute it from there. The same with shared libraries.

    THAT would be a FAST system.

  88. Linux and unused memory by PureFiction · · Score: 4

    In Linux, all unused memory is used for filesystem caching. In general, linux does this caching mcuh better than you could by mounting specific disks and files in a RAMDISK. Linux chooses things which are accessed frequently, or very recently, among other things, into this FS chache.

    By creating a RAM disk to do this, you would force a much smaller subset into memory, which would be great for what you are using there, but would hinder performance on other things which linux does not have the room to cache now.

    So, unless there is something very specific that needs to be cached, there is no rationale for this, and the chances are that linux will cache it for you anyway if its that much of a performance hit.

    Last but not least, the biggest reason RAM disks are slightly faster than average (when linux does cache) is because they never have to synch to a physical medium. If you dont care that all the data you have written there is gone *poof* once a crash occurs, or if the system is shutdown, then thats ok. If you have a file there, and 'oops' forgot to write it to disk, its gone.

  89. Re:Ah but we are talking about linux here by gavinhall · · Score: 1

    Posted by polar_bear:

    You know, I have nothing against any of the *BSDs, but some of you BSD-bigots really get annoying. A guy posted a question about doing something with Linux, he didn't ask if other OSes could do "x" he asked how to do "x" under a particular OS. Leave it alone. It's all free UNIX, it's all good, get over it.

    Sure, FreeBSD does some things better than Linux - so use FreeBSD and let those of us who prefer Linux use Linux. I personally think Linux does nearly everything better than Windows or the MacOS, but I don't feel the need to insult and annoy Windows or Mac users with "why try to do it on those OSes - use Linux instead!" (Of course, if a Windows or Mac user asks about Linux I'm more than happy to share what I know...)

  90. Re:FreeBSD dosn't have the portability of other OS by lomion · · Score: 1

    There are quire a few gnu tools being used by FreeBSD. Grep and tar come immediately to mind. And FreeBSD does have SMP, now it's not the best but it works acceptably (I've used it). That should change soon when 5.0 comes out though.

    Linux talking about portability is rather amusing. How many linux developers right truly portable apps? The number of times I've had to fix a linux app so i could run on Solaris or BSD is very high. One shouldn't pretend portability where none really exists.

    --
    this space for rent
  91. More for fantasy by Kurgol · · Score: 1

    Just wondered if mixing this with the software layer in Crusoe would help patch future releases of the os (with a software layer upgrade for the chip) Dont know if its possible - but i want it :)

  92. Part of the basic philosophy of the Amiga by Lerc · · Score: 2

    Even though the lack of a swap file capability for the Amiga meant you sometimes you didn't have enough memory to do some things it did give you a certain philosophy that worked well.

    If you can run it, it will run well. If an app _has_ to use lots of memory because of it's fundimental nature (such as image processing) it will intelegently do the swapping itself.

    Because memory was not considered vitually unlimited people developed with an eye towards keeping memory requirements down.

    The requirements of programs for OS's with swap files have rocketed over the last few years.

    It's sad to see the Amiga style of operation disappear without any debate as to the merits of it. People made swap files because they could, not because they were essential.

    Bill Gates reputedly once said '640k should be enough for anybody'. In my own mind I think that 64 meg should be enough for most people, yet I routinely do tasks on 64meg machines that are swapping merrily away. It's not because I'm not considering the possibilities of things that could be done (Like Bill did) but rather that I feel that those things could be done in 64Meg. I fell like my memory is going to waste.

    I have ICQ running at te moment. It's using 6 meg, I haven't a clue what it actually puts in that 6 meg. If memory were not considered unlimited how much would it be using?

    --
    -- That which does not kill us has made its last mistake.
    1. Re:Part of the basic philosophy of the Amiga by nstenz · · Score: 1
      I have ICQ running at te moment. It's using 6 meg, I haven't a clue what it actually puts in that 6 meg. If memory were not considered unlimited how much would it be using?
      I'm wondering if all that memory taken up by ICQ is the stupid plug-ins I never use being loaded, or my entire message history. Either way, I think it could load both of those from disk as needed if it was a little more well-written. Even so, it crashes on me much less frequently than either MSN Messenger (ick) or AIM (double ick). The CPU utilization is horrible, but what do you expect from a horribly bloated program?
    2. Re:Part of the basic philosophy of the Amiga by RallyDriver · · Score: 1

      One of the other interesting tricks was the PURE executable type and the "p" permission flag; this allowed the OS to preload and link an executable (remember, not all Amiga's had virtual addressing) and then have it used many times by multiple processes.

      Coding a pure executable meant avoiding global variables (i.e. static in C) - in typical C you'd malloc a struct with all the context in at the top of main and pass a pointer to it into each function.

      There were some packages which implemented virtual memory on 68030 and higher Amigas; none of them worked flawlessly as I recall. I still have a 10Mb A3000/040 (8Mb Fast, 2Mb Chip) which runs lots of things well. I only recently switched from ProPage to StarOffice :-)

  93. The Problems with ramdisks by Metuchen · · Score: 1

    Firstly, ramdisks steal memory away from running programs and they completely defeat the purpose of disk buffering. Another thing is that a ramdisk could potentially run out of space and most os'es (including Linux) don't like it when they run out of space on a "storage device." Many times, the memory that is occupied by the ramdisk would be better off used by running programs. Also, think about the case where you run out of ramdisk space and your ramdisk is using swap space instead...then what happens??? Your OS will wind up calling something from your ramdisk which is then redirected to your swap space when it could have just as easily read it from your HDD in the first place. Another scenario: your computer runs out of available RAM and your OS is forced to operate some of the running programs out of your swap space...again, you have negated any performance gains. In short, I would suggest that you would be better off allowing your operating system to manage its own memory and disk space.

    --
    # They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety. --Fran
    1. Re:The Problems with ramdisks by dman6666 · · Score: 1

      Back when I used to do OS/2 support you'd get the occasional story how someone thought putting their swap file onto a RAM Disk would increase performance.

  94. Re:Ram disk on Windows by nstenz · · Score: 1

    Windows 95 etc. does use a write-behind cache for hard drives by default. You can turn it off in Settings, Control Panel, System, Performance, File System, Troubleshooting (that's a lot of clicking...).

    I wonder if anyone cares about my useful tip for making Windows more crash-tolerant... (my sense of humor is horrible today, really) *grin*

  95. Re:Ah but we are talking about linux here by Chiasmus_ · · Score: 2

    You have to admit that if I somehow got an "Ask Slashdot" posted where I asked the question: "How do I get my Windows 98 box to recognize 4 ethernet cards without crashing?", I'd get the following five answers:

    1. Works fine for me - under Linux.
    2. Why are you using Windows?
    3. Linux supports theoretically infinite ethernet devices.
    4. Natalie Portman!
    5. FUCK YOU AND YOUR WINDOWS BOX, YOU WHORE

    --
    "Beware he who would deny you access to information, for in his heart he deems himself your master."
  96. Fast Loading Interpreters by dica · · Score: 1

    I keep perl, python, Eterm, and zsh on a ram disk.

    Those are programs which are often spawned, but unlikely to be cached.

    My xterms open noticeably quicker since zsh and Eterm don't need to be loaded from disk each time. Perl and Python scripts are executed much quicker as well since I don't have to wait as long for the interpreters to be loaded.

  97. A Good Use for RAM Disks... by Black+Art · · Score: 3

    A friend of mine uses a RAM disk for his Netscape cache. It saves him the trouble of having to clear the cache out manually on every boot. (He is on a Mac.) I have been considering doing something similar on my Linux box, but too many things are already needing to be done.

    --
    "Trademarks are the heraldry of the new feudalism."
    1. Re:A Good Use for RAM Disks... by Tower · · Score: 1

      Why not just increase the memory cache, and set the disk cache to 0? That should have the same effect without all of the effort.
      --

      --
      "It's tough to be bilingual when you get hit in the head."
  98. Ramdisks by Arker · · Score: 2

    The reason ramdisks were so useful on your old Amiga was the absence of a good disk caching program. Linux has excellent dynamic disk caching, you're better off letting the kernel have that memory to play with instead of locking it into a ramdisk.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  99. this would be usefull......... by Vantage · · Score: 1

    if you had an install where a very select amount of info was reused a great deal. Say a web server that serves only a few very small pages but takes a huge number of hits or a database that is VERY small.

    There are instances where it could be a usefull tool. Not very many that I can see though. As far as a home system goes, you generaly wouldn't have the resources to spare. Maybe if you have say 1GB of ram. In that case you could probably spare some and not notice the differance elsewhere. but at that point you most likely have a system so fast anyway that you couldnt realy tell the differance in speed.

  100. Web caching RAM disk by Sahib! · · Score: 1

    Well, Macs have had the ability to make RAM disks since back before anyone had enough RAM to make them useful as well, so maybe some of my experience with them will apply here. Web caching is not really a good use for a RAM disk. Since most of the files in a browser's cache are pretty small, if you have anything better than a modem connection, you may even be better off turning off disk caching altogether. Large files, such as .mp3's, may benefit more from running off a RAM disk. This is basically like buffering the whole file into RAM before playing. The largest benefit of RAM disks seems to come to applications on the disk. Since the executable is already loaded into RAM, it should start much faster. This may not apply to Linux, but some older Mac code was 'segmented' so that only parts of the executable were loaded into RAM at once. Having the application already entirely in RAM also speeded this up. Personally, I've tried using a RAM disk as a browser cache, a boot volume and a temporary place for power-hungry games. I noticed marked performance increases on both booting from the RAM disk and running applications from it, but no appreciable difference for using it as document storage.

    --

    I prayed about it, and God said, "Don't do it!" But I thought, "I know better."

  101. Re:The OS in ROM -- Did this with the Amiga! by gabrieltss · · Score: 1

    Back in the late 80's we did this with an Amiga 2000. We bought a multi-eprom board and mounted it in the A2000. We burned the whole amiga OS into EPROMM. The machine booted the OS Instantly!. There were 8 EPROM slots in the board so we had the Whole OS and some small, heavily used programs burned into the EPROMMS. It was awsome!

    Of course the Amiga was a hardware hackers dream machine. It was nice having multi-rom boards so you could boot up with Amiga OS 1.1,1.2,1.3,2.0,2.1 at any time. A TRUE multi-boot machine.

    I don't see why you couldn't do this same type of thing with Linux. There are a few different "Embedded Linux" distros out there. Just burn them to EPROMM and "Hack" the hardware! Boot from an EPROMM board vs. hard drive. And have the EPROMMed OS mount your hard drive(s) to the OS. Easy? maybe not for the faint of heart. But a truely driven individual could do it.

    If someone gets it to work let us all now. Share the wealth per say.

    --
    The Truth is a Virus!!!
  102. You all are missing the point by bakey · · Score: 1

    The Amiga system was a shared memory ram based os. When you loaded a program into ram it was never paged out because there was no vm support. Also because it was shared memory you could make pointers to programs in memory and run many copies of the same code without using much memory for each extra copy. The Linux ram disk is slow because it is trying to emulate a file system. Look at the work that sgi is doing with apache and loading htmml pages in memory. Memory is much faster then hard drives but we have to create a completely different core to take advantage. You can have fast and unsafe (shared memory) or slower and safe (vm).

  103. Re:The OS and GUI in ROM by Jonathan+C.+Patschke · · Score: 1

    As I recall, my Tandy 1000SL (this was back in 1987 or so) had MS-DOS 3.33 (and Cassette BASIC!) in ROM. The DeskMate environment was there as well, but you still needed to load the DeskMate modules from disc. IMHO, it was an -excellent- idea, on the 1000. The 1000 was a low-end machine that rarely had a hard drive (I got one of the first that had the 3.5" floppy available). The machine booted up in seconds, and brought you a DOS prompt without requiring any magnetic medium. Compare this to waiting nearly a minute for DOS to load from a floppy. The difference becomes even more marked when you realize that you could actually load the DeskMate UI from ROM, as well. You wouldn't have any modules available, but the UI would just blink-up (and this is on an 8088) without having to wait for discs to spin-up. The manuals for the 1000SL made levity of how slowly the 1000SL loaded from disc--I don't think floppy-cache cache wasn't an option, I'm sure it was read straight to RAM, which probably yielded a lot of dry-spins on the disc. That being said, I think we're past the days where we need to worry about such things. Permanent, reliable secondary storage is all but in a glut right now.

    --
    Pining for the days when The Glorious MEEPT!!! graced SlapDash with his wisdom.
  104. A Different Persective by sherpajohn · · Score: 1

    I have a fellow sitting beside me at work who has a RAM disk on his Win95 box. I asked him why. His answer: "The icon looks cool in the My Computer folder".

    Can you say the same about a Linux Ramdisk? Bet a MAC one looks *really* neat.

    Going on means going far

    --

    Going on means going far
    Going far means returning
  105. Brainstorm! Put the VM swap file on the RAM disk by ReelOddeeo · · Score: 1

    Okay, after having read the above discussion, and seen how everyone is in agreement about the following points...

    * Everyone has plenty of ram to spare
    * Putting ramdisks into Unix is a great idea, for all the reasons others gave in other threads
    * ramdisks have such a large positive effect on performance in the post-floppy disk world

    ...and in the true spirit of Microsoft innovation, I propose the following:

    Put the /tmp filesystem on a ramdisk. Make the ramdisk dynamically resizable. If the ramdisk gets too big, then vm will page it out to disk. But wait! There's more. If the vm system is too slow, or runs out of real disk space, then you could make it use a swapfile and put that back on the ramdisk under /tmp.

    The wonderfulness of this concept is that it involves no hacks to the Linux kernel, and so wouldn't give the BSD bigots anything to say. Furthermore, even in Microsoft's view of "innovation", this would be an innovation unmatched by Windows.

    Hmmm.

    (Reminds me of my idea for a generator on an electric car to keep the batteries fully charged while the car is driven. Oh wait -- I don't have the patent filed for that one yet.)

    --

    Those who would give up liberty in exchange for security and DRM should switch to Microsoft Palladium!
  106. RAMdisks do have their uses by Trolan · · Score: 1

    The company I worked at previously had a daemon which was receiving 1500 requests every 30 seconds, each of which resulted in a dbm open/create, update, and close. After 6 months of incessant drive chatter, it killed the disk it was running on. We then threw 1/2GB of RAM at it and tossed the files into /tmp (on Solaris, so it was effectively RAM). System was much quieter, a little faster and we didn't torch anymore drives. RAMdisks come in very handy at cutting back on hardware stresses in cases like this.

  107. Large files not a problem by devphil · · Score: 2

    Every filesystem type comes with a special set of options you can use when mounting one of those filesystems. For Solaris' tmpfs, you can set the maximum size of the "partition" so that it won't actually use up all of swap.

    Most admins bitching about the large files problem aren't aware of this option. (I wasn't for a while.)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  108. Real world use of linux ram disk by Le+Fol · · Score: 1

    We use heavily Linux Ram disk in at least 2 subsidiaries of my company.

    All the box boot using dhcp, and get an OS ram image dedicated to a job (web server, mail server ...). The data are coming from a NetApp. So a box function is only related to a MAC address.

    When the kind of processing needed or the configuration doesn't imply concurrent write access, the benefit is twofold:
    - easy hot swapping of boxes (just boot an another box using the failing one OS config);
    - easy and cheap computing power expansion (clone the OS config, add a MAC address, an IP and a DNS entry and you're set.

    The boxes of course don't have swap, and the performance is not a problem when you consider the gain in ease of maintenance.

    An other usage I plan for it is splitting my home computer in 3 boxes: a super silent stripped down box with just a good sound card next to the hifi; a super silent stripped down box with a good graphic card, keyboard and screen as console; and a fat server with lot of disks and CPUs (at least 2, the 8ways Xeon are a bit expensives) in some place where the noise is not a problem. Now if someone knows about power supplies which are quieter than 34db, that's interesting me!

    Nicolas

  109. Ramdisks Aren't Needed by VegeBrain · · Score: 1
    I concluded some years ago that Ramdisks aren't needed for Unix. This happened when I was a new SCO sysadmin and was trying to figure out how to speed things up. SCO Unix has Ramdisks, but the docs say it's better to rely on the Unix disk buffer cache. Coming from the DOS world, I didn't believe it (DOS really does have a buffer cache!) because I'd been been using Ramdisks for years and had seen how much faster things ran with them. So I configured a Ramdisk and ran a few tests. Guess what? Things ran slower with the Ramdisk, just like the docs said.

    Of course SCO Unix isn't Linux, but I'm sure that this principle still applies. If you think about it, the buffer cache has more smarts than Ramdisks. It contains which disk blocks really have been most recently been used. Ramdisks, on the other hand, don't maintain any usage information, which means you're using your memory to hold disk blocks that aren't the most frequently used. Files can hog memory in a ramdisk that are never been used, while the buffer cache will eventually flush unused blocks.

    Another problem with Ramdisks is sizing it properly. It's got to be big enough to hold everything that goes there with as little extra space as possible so you use as little precious RAM as possible. At the same time you want as much extra space as possible so it doesn't run out of room when Slashdot links to your site. And you can almost ensure it will run out of room anyway, probably in the wee hours of the morning.

    Some other posters indicated that Linux will simply start using swap space when the Ramdisk fills. Not quite; Linux will treat the Ramdisk just like any other partition that fills up. This means that applications can't perform add anything to the disk, which in turn usually means your applications crash and burn.

    So here's my view on Ramdisks: don't use them. It's better to just crank up the size of the disk buffer cache if you really need the increased performance.

  110. Why memory filesystems aren't as good as you think by bugg · · Score: 1
    First of all, modern kernels have filesystem caching. These do matter! Some systems, such as McKusick's softupdates will have additional benefit.

    As for why not to use memory filesystems, it's because most implementations have the memory filesystem as a device not unlike a harddrive, and then place a filesystem on top of that. So you've got the overhead of a filesystem on top of the overhead of the memory disk.

    As a rule, they aren't worth the hassle. Like most filesystem discussions, there _are_ cases where a technique shows its strengths. Memory filesystems have more weaknesses than strengths.

    --
    -bugg
  111. duhhhhh by incubus · · Score: 1

    any ram you put into the ram disk takes away from space available to the buffer cache..
    Not only that, but your buffer cache will *still* be buffering your RAM disk, so all of your data will be stored twice in RAM. There may be a way to bypass this, I'm not sure.
    It's not surprising that if you took a significant chunk of memory for a RAM disk, you'd get *lower* performance.

    There are almost no applications that are *good* for a ramdisk. nvram disk is another story altogether. :-)

  112. Disk caching is not unique by Valdrax · · Score: 3

    One of the Fundamental differences between all Unixes and every other OS ever invented is the use of memory to buffer the filesystem.

    Actually, disk caching is NOT a unique idea at all.

    Macs have supported a disk cache for performance since at least System 3.0, in 1986. You can see a history of the old Mac OS here. However, I'm not sure if this is a read cache only and what form of cache writing scheme it supports if any nowdays.

    While I can't really say about the DOS-based Windows variants, the NT versions of the Win32 API has lots of support for asynchronous file I/O. By default, all normal disk writes are written to a disk cache which is lazily flushed. You can specify certain options when opening a file handle with Cre ateFile() to force it to write straight through to disk rather than lazily cache it. In fact NT gets its asynchronous packet-based I/O subsystem design from VMS. (The designers of the NT kernel were ex-VMS designers.)

    Finally, while I can't speak about the Amiga, I can speak about MVS's descendant OS, OS/390, which can handle asynchronous file I/O. I can't find you a good link, but most of the references I could find on this talk about OS/390's UNIX services. Apparently around release 2 of OS/390, they began to comply to the XOpen definition of a UNIX, so I guess that doesn't help that much.

    --
    If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
  113. Remember the Amiga's VD0: ? by RiffRafff · · Score: 1

    VD0: was a recoverable ram disk on later versions of the Amiga OS. Very convenient.

    I can see where ram as /tmp could be a problem in multi-users environments, but it might be a nice option for Linux home users.

    --
    "I might have made a tactical error in not going to a physician for 20 years." -- Warren Zevon
  114. c:resident cli ... by Dwonis · · Score: 1

    Now what I'd really like to see in Linux is the Amiga "resident" command. (For non-Amigans, resident was a command that would load executables into resident memory. In Linux, this would take the form of a command to tell the disk cacher to load this file into cache and keep it there.)
    --------
    "I already have all the latest software."

    1. Re:c:resident cli ... by jbuchana · · Score: 1

      That sounds rather like what the "sticky bit" in the Unix file permissions used to do, it would cause the program to stay in memory so that it would seem to execute faster the next time.

      I've heard two reasons why this was changed:

      More efficient handling of memory made it unnecessary, and/or, commercial application vendors abused the sticky bit to make their apps start faster.

      I do not vouch for either of those reasons myself, but they do sound plausible.

      --
      Jim Buchanan
    2. Re:c:resident cli ... by Dwonis · · Score: 1

      No, no. I don't want programs to be resident once they're loaded. I want to make them resident *now* (eg. at bootup).
      --------
      "I already have all the latest software."

  115. rd_size by Cheeze · · Score: 1

    insmod rd rd_size=128M
    mkfs -m 0 /dev/ram
    mkdir /mnt/ram
    mount /dev/ram /mnt/ram
    dd if=/dev/zero of=/mnt/ram/swap bs=128M count=1
    mkswap /mnt/ram/swap
    swapon /mnt/ram/swap

    how useless.

    ramdisks are cool to put your netscape cache in though. that way, when the fbi comes knocking, they cannot see what sites you have been, since the cache is in a ramdisk that is deleted when the ram loses power.

    --
    Why read the article when I can just make up a snap judgement?
  116. Re:BASIC interpreter in ROM! by Cyberbabe · · Score: 2
    With a blue background and High intensity white lettering. Ready prompt and flashing block cursor!

    I want my PIII to boot like a C64!!

    --
    -- Periodically spray diskettes with insecticide to prevent system bugs from spreading.
  117. Why not IPC by rangek · · Score: 1

    Because it was a hack job.

    And can you even do that in g77?

    Anyway, it wasn't worth it to me to figure it out. Maybe if I was really going to "put my name" on that program/technique i would have done it "slicker."

  118. Duh. by -=[+SYRiNX+]=- · · Score: 1

    Why in the world would you set your web browser cache to a RAM drive? Most web browsers already have the ability for you to set up a RAM cache that will be used in its entirety before caching anything to disk.

    And besides, if a program would benefit from a faster RAM-first, disk-last style cache, it should be the program designer's job to cache things as memory and let the OS vmm swap memory pages in and out to disk as needed.

    --
    - "It's just a matter of opinion!" - PRIMUS
  119. Database Updates in RAM by Christopher+B.+Brown · · Score: 2
    If you've got something like a DBM file that you're going to be doing absolutely massive numbers of updates on, it would be a slick idea to store that file on a RAMdisk so that updates wouldn't get forced out to disk on a regular basis.

    Obviously this will be vulnerable to failure, but for something that collects massive quantities of statistics, such as Ifile, it can be worthwhile.

    With Ifile, an early edition stored stats in DBM files, and would do simply massive numbers of increments to entries. On disk, this meant that for a relatively small mail spool, the analysis would take hours.

    --
    If you're not part of the solution, you're part of the precipitate.
  120. Re:Ah but we are talking about linux here by gavinhall · · Score: 1

    Posted by polar_bear:

    You probably would - and would probably be (quite rightly) annoyed by those responses. Unfortunately, there's a high signal to noise ratio here...

    The main reason I chose to respond to the FreeBSD comment is because I've been to quite a few Linux shows and met several of the BSD bigots and find it unbelievable the amount of hostility that they display towards Linux. I think that the BSD projects are great - but they're not for me. But, I'm glad they're out there, I'm happy that they are moving forward and I might even decide to use them someday. I just don't understand why some of the BSD camp feel the need to flame Linux users - I've never seen any Linux user flame someone for using FreeBSD. Ever.

    And what is the deal with the Natalie Portman stuff anyway?

  121. Re:BASIC interpreter in ROM! by Tower · · Score: 1

    Only if I can plug in my FastLoad cartridge - wow! what a difference!

    --

    --
    "It's tough to be bilingual when you get hit in the head."
  122. Amiga's standard use of the RamDisk: ENV:&ENVARC: by tinic · · Score: 1
    By default the Amiga copies the content of ENVARC: into the RamDisk and assigns ENV: to it. This folder basically contains everything /etc/ on Unix systems contains and in addition also all environment variables (they appear as files).

    Advantage was certainly speed but also more stability. This way it was possible to use settings only during one session. This was usually done having two buttons in the preferences panel: Use and Save. A simple reboot would bring you back to the saved settings. Very useful if you were changing the screen settings and your monitor did not like it.

    Personally I think this concept could be interesting for Linux systems in general, perhaps even provide more security since the content /etc would be mostly temporary. A simple reboot would bring you back to the original state. A simple way to defend hackers? Perhaps it is just a stupid idea...

  123. Re:FreeBSD MFS by Arker · · Score: 1

    Well I was not able to confirm this, although there is a lot of excellent humour and information, there are only three very brief mentions of MFS in the FreeBSD FAQ and none of them say anything about it resizing itself (although it might be inferrable from the fact that there is no mention of a flag to set it's size.)

    I am curious as to what purpose this serves, however. If, as was my impression, FreeBSD has the same sort of dynamic caching that Linux uses, this would only add an extra layer of overhead - and hurt, not help, performance. Any FreeBSD folks want to enlighten me? Is there actually any situation where this is useful, or is it an artifact from a time when the caching algorithm really sucked, or what? ;^)

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  124. Linux Router Project Security by ramdisk by impadmin · · Score: 1
    Well, I've been working on an application to utilize the volatility aspect of ramdisks as a method to eliminate trojan horses and clean hacked systems instantly.

    Since the Linux Router Project runs from ramdisk by default, it's an excellent candidate for this. My app runs like Tripwire, but very often, and detects changes in system files. If such changes occur, it logs it to a logserver and reboots or re-reads the write-protected floppy back into ramdisk. Look mommy, no more trojan horses on poorly secured firewalls!

    The app is called Tripwall and the original project site was http://homepages.hack-net.com/code_valley/tripwall , but this is down so I plan to move this to http://cise.ufl.edu/~cl0/tripwall.html.

  125. Re:FreeBSD dosn't have the portability of other OS by Enahs · · Score: 1

    >How many linux developers right(sic) truly
    >portable apps?

    How many *BSD developers write truly portable apps?

    Probably the same answer for both Linux and *BSD camps--not nearly enough. :^(

    My example is the standard utils like ls, chown, etc., that ship with FreeBSD. It's not because of that "it ain't GNU/Linux" argument, although it was due to that argument that I got the ambition to try this. It was just because I wanted to be able to say that, when I use "ls", it's The Real Thing(TM). :^) The build process kicks ass, but I'm not anywhere close to getting it to work under Linux. I was happy to see, tho, that someone wrote a really simple little Makefile in the "make" dir so I could build the BSD make without writing my own makefile. :^) The build process, tho, is *totally* specific to FreeBSD. OTOH, apparently the GNU utils compile with little prob on other platforms. I've never done it, though, so I really can't comment on that.

    As far as platform-independence of Linux-specific apps, it depends on who wrote it and how they wrote it.

    One argument I've heard is that "gee, Linux is just a kernel; FreeBSD is a whole system, and there's only one FreeBSD." Yeah, but there's more than one BSD. If a Linux distro conforms to the filesystem standard, and sticks to what has become fairly standard on other distros, and doesn't contain, say, assembly language code, a proggy will compile (and run) on a good number of distros (and will compile on different platforms.)
    This statement pertains only to Linux. For those distros that don't stick to convention, well, they're not very popular so we don't care. :^)

    If the proggy comes with a decent "configure" script, there shouldn't be that many problems. If someone goes off half-cocked and writes their own Makefile (believe it or not, that can be a problem :^( ) then you might have to do some rewriting.

    >One shouldn't pretend portability where none
    >really exists.

    Ooh, I'm impressed; a brash statement without a single example. Thank you, I'm so informed. :^(

    It sounds like we're making the same point--you have trouble compiling Linux apps, I have trouble compiling BSD apps.

    >The number of times I've had to fix a linux app
    >so i could run on Solaris or BSD is very high.

    Funny; back when I was taking a system programming course in college, we did our programming projects on Sparc Stations and a SMP SysV machine. When we did the stuff on the Sparc, I had to do everything on one of their stations--my stuff from home wouldn't compile nicely on the Suns.

    When it came time to do SysV stuff, though, I had to stop using the Suns and was actually able to do everything at home on a Slackware box--with no code modification whatsoever. This was pretty simple stuff, though, so the argument may not be relevant. Your mileage may vary. :^)

    --
    Stating on Slashdot that I like cheese since 1997.
  126. Why did Amiga use RAM disks? by Chris+Colohan · · Score: 1

    I think you left out one of the main reasons why Amiga users needed RAM disks. Back when I had an A500, it only had the internal floppy drive, and no hard drive. If you had enough RAM to copy your critical system files into a RAM disk, you no longer needed to play the "disk swapping game" whenever you wanted to load a program off of another disk.

    This game quickly forced me to buy a second floppy drive -- on the Amiga, you pretty much always needed the system disk in the drive...

    Chris

  127. Think about... by The+Ferg · · Score: 1

    Nothing to do withyour question... but think about the local access studio that i work in that uses the Amiga. Think about how under budget we are.... Heh Heh... -Peace Fergs

    --
    - The Ferg webmaster@na.mdc.net
  128. Re:Ram is usually needed elsewhere and is expensiv by stikko · · Score: 1

    if you have that many httpd requests that it's bogging down your disk subsystem, wtf are you doing running netscape or any web browser on that machine for that matter? i mean, i can see having to use IE occasionally if you're talking about an NT machine, but hard-core servers (such as the ones where the disk is being maxxed out by the httpd) really shouldn't be running something that eats up as much resources as a web browser (well, maybe lynx, but definitely not netscape)...

    just my 2 cents...

    devon

  129. Re:Hacking a CD-ROM based web site by thing12 · · Score: 2

    I think his point was that you wouldn't have any writable media in the machine which would prevent what you're talking about.

    Of course the corollary to that is if you could create a ramdisk then you can write to it. So if you leave out ramdisks and all network filesystems - you'd be set. Just log everything remotely via syslog (or something better/custom) and you'd be pretty much defacement proof... won't stop 'em from bringing down the server - and because you're running on ROM you won't be able to fix the problem very quickly so they could just keep performing the same exploit over and over... haha!


  130. Interesting... by stinky+monkey · · Score: 1

    I was just thinking the other day how we'd load the old DOS WordPerfect into RAM... it smoked. If I get it to work for the new version for Linux I'll lets ya know :)

    --
    ~Bout Time for another tea party.®~
  131. that's what cache is for by vik007 · · Score: 1

    Why bother using a ramdisk when the operating system automatically keeps a copy of frequently used data in the cache?

    1. Re:that's what cache is for by Graymalkin · · Score: 2

      But if you've ever USED a ramdisk before you'd know that it stores non-active executables in the ramdisk or files you want memory resident without actually being in use. On MacOS you can stick Word and IE into the ramdisk and they will start pretty darned fast as they don't need to access the disk in order to open. The cache is for stuff thats already been used, ramdisk is for things you might use.

      --
      I'm a loner Dottie, a Rebel.
  132. Re:Hacking a CD-ROM based web site by Webmonger · · Score: 1

    Unmount the cd-rom, and mount something else where the cd-rom used to be.

  133. HOW TO DO IT ?! by Taco+Cowboy · · Score: 1



    What you say makes A LOT OF SENSE !

    Is there anyone who can tell me how to do such a thing?

    Thank you !!

    --
    Muchas Gracias, Señor Edward Snowden !
  134. RAMdisk Root by Demerzel · · Score: 1

    Back about when 2.0 first came out, I set up a firewall for my dad's small office. He didn't have any UPSes, and I didn't want to bother going in to poke the machine if it ever lost power for some reason.

    So I rigged it to boot up with a small root partition on a RAMdisk, (~1MB - this was a rather old machine even back then) then mounted everything but /tmp and /var read-only.

    It worked like a charm. I could power off the thing without running shutdown and not corrupt any critical files. A LILO switch let me boot up in "regular" r/w mode so I could maintain the system.

  135. Other uses: Yes, but no. by Tin · · Score: 1

    I've been using RAMdisks on Linux for some time and still think its a good idea. The sad thing is
    that it doesn't help you much and that the caveats
    are quite large. The only reason why you'd want to
    write things to a RAMdisk is when you are pretty
    sure you want to read it again, and probably more than once. The thing is that databases have their own caching mechanisms as well as most other smart programs. You think you want a fast netscape cache ? Use squid on your local box and set the netscape
    cache off. I still think RAMdisks are cool, but still am looking for something to use them for.

  136. Why not LVM for /tmp? by Cato · · Score: 2

    To get the best of both worlds, it would be very handy if you could use logical volume management (or maybe something simpler) to ensure that the /tmp filesystem started out using RAM disk, then migrated onto a second physical volume on disk.

    But perhaps the real issue is filesystem-specific caching parameters - if you could configure the /tmp filesystem caching to be much more aggressive, using more memory, this would be self-tuning (i.e. expanding to disk when needed) and probably work better all round. Though perhaps a special filesystem would still be needed to avoid writing to disk unless you've run out of RAM.

  137. Pre-cacheing by RallyDriver · · Score: 1

    If you have the RAM, then just pre-read all the files with something like:

    tar cf /dev/null ...files...

    Running something like this in a cron process is good to stop important binaries (Communicator, XMMS) being swapped out by your home machine's email daemons while you're out.

  138. Re:FreeBSD dosn't have the portability of other OS by lomion · · Score: 1

    How many *BSD developers write truly portable apps? I was answering directly to your statement.

    Truth is most linux most linux distros are not 100% compatible. Whereas if you use FreeBSD there is only one FreeBSD to use. And most of the BSD's share code and its fairly portable between them.

    how about redhat jumping the gun so to speak on glibc? That caused and still does cause problems when going between distros.

    >One shouldn't pretend portability where none >really exists.
    Ooh, I'm impressed; a brash statement without a single example. Thank you, I'm so informed. :^(


    Not really, its a simple statement of fact. I never claimed everythin on bsd was totally portable did I? And most linux app developers dont develop very portable code, but there is a large amount of lip service to it. GNU tools will work on most platforms if you use gcc to compile, that is a know fact and im not disputing that. I'm talking about non-GNU tools here.

    --
    this space for rent
  139. Quake and ramdisks by Jasonv · · Score: 1

    Back in the day of Quake 1, when every little bit of an edged helped out on your net games, we used to load up all the map files into a RAM disk. That way you'ld be instantly in the level instead of having to wait for the map to load. You'd enter into the game a few seconds faster - which meant a lot when getting the jump on that rocket launcher or red armour :)

  140. Do not try this at home by Stauf · · Score: 1

    WARNING: the following is very Windows/DOS centric

    At work we had an old server computer with over 2 gig of RAM. I fiddled around with it for a bit and got Windows 95 to boot, copy itself into a 1 gig RAM disk and run. I had to put an old 1 gig drive into the comp. (Drive D:) temporarily and install windows onto that, then copy that onto the original HDD (C:), rip out D: and put an entry into autoexec.bat that copied the windows dir from C: to D: (which was now the RAM disk).

    I measured a total of 0.8% average speed increase (using some god-awful old DOS benchmarker) and the comp. took 23 minutes to boot.
    --
    - Bob

  141. Why it made sense for Amiga OS by dadith · · Score: 1

    The Amiga OS did not really have a disk cache.
    Basically linux (most modern OSes really) use free ram to buffer files that were recently accessed which is usually better then just simply copying the whole system into ram.
    Amiga OS wouldn't do that, making disk access rather slow. On the other side it was usually quite save to just flip the switch on the machine , as long as the floppy wasn't active it was OK since no vital structures were buffered into RAM.

    BTW: Copying the whole System into the ramdisk was
    somewhat of a brute force approach. There was disk caching software available (only read cache usually), I can dimly remember using it.

  142. Amigas by Lozzer · · Score: 1

    Didn't have a hard drive as standard so buffering wasn't really much of an option (though it did do chunking to the floppy which isn't much fun - except for those clever games people who managed to do async read ahead on the floppy - predicting which data they'd likely need next)

    --
    Special Relativity: The person in the other queue thinks yours is moving faster.
  143. Nothing is hack proof by hey! · · Score: 2

    but you can't unmount root.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  144. Re:FreeBSD dosn't have the portability of other OS by Enahs · · Score: 1

    /*
    Truth is most linux most linux distros are not 100% compatible. Whereas if you use FreeBSD there is only one FreeBSD to use. And most of
    the BSD's share code and its fairly portable between them.
    */

    Oh, come on. That's like me saying, "Gee, when you pick up a CD by the band Metallica, they don't always sound the same. But Pink Floyd's The Wall, now there's a CD that sounds the same no matter where you pick it up!" You're comparing distros built around the Linux kernel to a specific BSD distribution.

    That's total bullshit.

    I can be assured that, if I build a package for a Linux-Mandrake box on my Linux-Mandrake box, I won't have to port it to someone else's box, unless the other box has been tweeked to the extereme. But here's the kicker: the same is true of FreeBSD. FreeBSD being standardized has to rely on the same thing that, say, a Linux-Mandrake or Debian box has to rely on: it has to rely on the end user leaving their system alone.

    >I'm talking about non-GNU tools here.

    This is the second or third time I've tried to coerce you into actually *naming* a tool. Please. My only beef was with the fact that I was trying to build the set of BSD tools that come with FreeBSD as a replacement for the GNU tools. It's a pain, but I'm sure it can be done. It's just going to be a matter of finding out what the quirks are in libbsd.a, that's all. I've been told that I should look to either NetBSD or OpenBSD for more portable code. Care to comment? :^)

    --
    Stating on Slashdot that I like cheese since 1997.
  145. Thank you. by Enahs · · Score: 1

    The one sensible post in the whole lot. Heck, on my machine, if I start Netscape, kill it, and start it again, it re-loads all entirely from memory. Wow. :^)

    Tips for the original "Ask Slashdot" poster:

    strip your binaries (man strip)

    if you can stand to do so, run a lighter WM if you use X (such as, instead of running KDE or GNOME/Sawfish, use Window Maker with a hacked kde2wm.pl to allow the new KDE format/GNOME format.)

    although I don't know if this helps, upx at least frees space on your HD and doesn't have a huge overhead (they claim that there's no overhead, but, come on :^)

    If you're a real gearhead, and the boottime on your Linux box drives you nuts, try replacing the SysV-style init with the Slackware-style init (I won't walk you through this; try looking at linux.com., I posted some instructions there.)

    I don't remember the command, but it's possible to tune the performance of your IDE drive through Linux.

    --
    Stating on Slashdot that I like cheese since 1997.
  146. Re:Because in the 90s we have virtual memory. by stray · · Score: 1

    uhm.. isn't a ram disk quite the opposite of
    virtual memory? hit me with the cluestick if i'm wrong...

    toodles
    stray

  147. Not such a silly idea. by Nonesuch · · Score: 1
    Back in the good old PC days of Windows 3.11 and OS/2, programs like 'doublespace' were a popular way to get more storage out of expensive 50megabyte drives. They used a single large file in C:\ as a virtual drive D:

    Was I the only person to try to copy the c:\ volume image into the D: compressed volume?

    Solaris had the concept of 'tmpfs' long ago, all of my Ultra-250 servers have this line in /etc/vfstab: swap - /tmp tmpfs - yes size=1536m This means /tmp is handled by the swap partition, but cannot grow to more than 1.5Gb of storage (half of all the swap space). Works like a charm.

    Don't ask why I have 3Gb of swap, it's not a pretty story.

  148. Re:FreeBSD dosn't have the portability of other OS by lomion · · Score: 1

    Ok here goes:

    Tools : gCVS, Mahogany, many many gnome apps, a few windowmaker dock apps like wmnet, wmitime, wmmon, wmmount to name

    How portable is that mandrake compiled app to say redhat? That is what I am saying, Linux advocates often say Linux is not fragemented or chaotic when it is both. There is no denying that. You also made my point : if you use FreeBSD you only use one thing. If you use Linux, you need to know what Distro, which kernel, etc... That in and of itself point to linux being fragmented.

    I cannot comment fully on OpenBSD or NetBSD so I won't i do know that alot of code has been shared among all three BSD's.

    --
    this space for rent