Questions about setting up a new computer
hartmans at mit.edu
Sat Jul 16 18:06:45 UTC 2016
>>>>> "John" == John J Boyer <john.boyer at abilitiessoft.org> writes:
John> I've more or less decided to replacer my ten-year-old Linux
John> machine. It is giving error messages intermittently. Most of
John> them are about sector errors, but others seem to have nothing
John> to do with the hard drive. It may be more and more
John> troublesome, even if the hard drive is replaced. Besides, it
John> would be nice to get more up-to-date hardware.
John> I'm thinking of getting 32 GB of ram. 8 GB will be for normal
John> use. The other 24 GB will be in a ramdisk.
I think you must have a DOS background here.
An explicit RAM disk is rarely if ever useful on Linux. I'm tryinfg to
remember if I even know how to create a block device backed by RAM... O,
yeah, I can think of a way, but you probably don't want to do that.
Instead, you probably do want to create something called a tmpfs.
That's a filesystem backed by RAM. When your computer reboots all its
contents go away.
There are important differences between a tmpfs and a RAM disk.
The biggest is that Linux will only use as much RAM as is needed by the
tmpfs to store what currently lives in it.
(You can set a maximum size, but with 32g I wouldn't bother)
So, you can get the best of both worlds, storing your temporary files in
RAM, but using RAM for RAM if you don't have 24G of temporary files at
John> Do I need a paging
John> file? 8 GB of available ram should be more than enough. The
John> paging file on my present machine always shows 0 usage, even
John> with only 4 GB of ram.
Having a paging file has a couple of affects even if it is not used, but
no, you probably don't want a swap partition or file (linux names for
John> How do I avoid setting up a paging file
John> during installation? I'm using Debian Jessie.
In expert mode, avoid creating a swap partition and if asked don't
create a swap file.
If you don't want to use expert mode, don't worry about it; having a
swap partition won't be a problem.
John> How do i set up the ramdisk? I want to assign the temp
John> directory to it.
I think the installer will do that by default.
But in /etc/fstab you want a line like
none /tmp tmpfs defaults 0 0
John> It might be nice if the
John> bin, sbin and usr
John> directories were loaded onto it at boot-up.
No need for that.
Linux is also smart enough to cache files as they are used, storing
copies in memory, so no value in moving them to the tmpfs.
The file will be loaded the first time it is used.
You could do that at boot for /bin, /sbin and /usr, but you probably
don't want to. The reason is that the system is fairly busy at boot,
and it would probably slow down things like bringing up your desktop and
starting system services. The only advantage of pre-caching files on
boot would be faster performance the first time you accessed a program
after pre-caching is done. However you get slower boot times and slower
performance during the pre-caching.
More information about the Blinux-list