Gentoo Archives: gentoo-amd64

From: Mateusz Mierzwinski <mateuszmierzwinski@××.pl>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] tmpfs help
Date: Tue, 12 Feb 2008 23:36:50
Message-Id: 47B22D9A.7070301@o2.pl
In Reply to: Re: [gentoo-amd64] tmpfs help by Pascal BERTIN
1 Pascal BERTIN pisze:
2 > Beso a écrit :
3 >
4 >> You can give a size for tmpfs in the option
5 >> here is an extract from my /etc/fstab :
6 >>
7 >>
8 >> tmp /tmp tmpfs size=1000000000 0 0
9 >>
10 >>
11 >> i'll try that. setting it to about 3/4 of swap is good?! i have 8gb swap
12 >> and 1 gb ram but ram is always full. after setting tmpfs the ram is full
13 >> but also the swap fills-up quite well.
14 >>
15 >> --
16 >> dott. ing. beso
17 >>
18 >
19 > On one of my system, with 1G of RAM and 6 GB of swap,
20 > I set it to 6GB (so that I can compile openoffice).
21 > Although It's slow (anyway I start openoffice compilation at the end of a day and check on
22 > the next morning), it works well, and openoofice compiles.
23 >
24 >
25 If You see a FSTAB:
26
27 tmpfs /dev/shm tmpfs defaults 0 0
28
29 there is probably some thing like dev link to shared memory - I think,
30 that SHM is needed by some proceses, if You put something in SHM, then
31 after process starting, that opens SHM from IPC, it's allocated in space
32 of tmpfs, and tmpfs is dropping into swapfile. If I don't get wrong,
33 then You should stop using tmpfs...
34
35 |# mount -o remount,size=8G /dev/shm
36 ||# mount -t tmpfs -o size=5G,nr_inodes=5k,mode=700 tmpfs /disk2/tmpfs
37
38 "|shm / shmfs is also known as tmpfs, which is a common name for a
39 temporary file storage facility on many Unix-like operating systems. It
40 is intended to appear as a mounted file system, but one which uses
41 virtual memory instead of a persistent storage device.
42
43 If you type mount command you will see /dev/shm as a tempfs file system.
44 Therefore, it is a file system, which keeps all files in virtual memory.
45 Everything in tmpfs is temporary in the sense that no files will be
46 created on your hard drive. If you unmount a tmpfs instance, everything
47 stored therein is lost. By default almost all Linux distros configured
48 to use /dev/shm."
49
50 |
51 This is what i found about resizing SHM (tmpfs)
52 .
53 Greetings
54 |
55 --
56 gentoo-amd64@l.g.o mailing list