:: Re: [DNG] use zram for /tmp - how?
Página Principal
Delete this message
Reply to this message
Autor: emninger
Data:  
Para: dng
Assunto: Re: [DNG] use zram for /tmp - how?
Am Sat, 04 Jun 2016 21:14:23 +0000
schrieb parazyd <parazyd@???>:

> For /tmp I would definitely use tmpfs.
> It's as simple as adding an entry to the fstab
>
> tmpfs /tmp tmpfs nodev,nosuid,size=2G 0 0
>
> In this example, your /tmp will be 2 gigabytes big, but tmpfs will
> keep your /tmp in RAM, while not cutting off the entire 2GB of your
> system's RAM. It will only use as much as it needs.


I read the man tmpfs and there i see, that tmpfs refers to the total
amount of virtual memory including swap. So i've to clear up my mind:

i installed a zram as swap but i also installed a small harddrive
partition as swap (for s2disk which otherwise would not work (?) ).

fdisk -l looks like this:
-------------------------
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048  78141439  78139392  37,3G 83 Linux
/dev/sda2        78141440 961148927 883007488 421,1G 83 Linux
/dev/sda3       961148928 976771071  15622144   7,5G 82 Linux swap /
Solaris



Disk /dev/zram0: 1,8 GiB, 1952563200 bytes, 476700 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram1: 1,8 GiB, 1952563200 bytes, 476700 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
-------------------------


Now, tmpfs would make use of that swap in which way (the priority of
the zram swap is higher than those of sda3)?

Thanks a lot in advance.