Copy2ram and ram optimization

Post here if you are a new Porteus member and you're looking for some help.
Black ninja
Black ninja
Posts: 32
Joined: 30 Sep 2012, 19:57
Distribution: 1.2

Copy2ram and ram optimization

Post#1 by uyduruq » 16 Dec 2012, 17:19

I am using porteus with copy2ram option. Sometimes, porteus freezes. I have 4 gb of ram. Total size of the modules are 225 mb.
The question is, how does porteus uses remaining part of the ram? I mean, how much for applications and how much for file system? For example, suppose that I have downloaded a 1 gb file. Then deleted this file, what will be the next, is this ram is dedicated as filesystem, or any application/process can use this ram for its operation?

I could not find detailed information what goes on after porteus is started. I want to optimize my system if I can.

User avatar
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Copy2ram and ram optimization

Post#2 by Hamza » 16 Dec 2012, 18:50

You used in reality only 60% of ram.

Add this into append of your porteus.cfg file

Code: Select all


User avatar
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland

Re: Copy2ram and ram optimization

Post#3 by fanthom » 16 Dec 2012, 22:17

if you are not saving changes then linuxrc allocates 60% of available Ram as aufs writable branch set on tmpfs (your root partition)
if you have 4GB of Ram then 2.4GB should be visible as root (/) partition. please run 'df -h' in terminal to confirm this.

now - if you choose copy2ram option then 'df- h' should show 2.4GB minus 225MB used on modules which are copied to /mnt/live/memory/copy2ram.
tmpfs is flexible - if you fill root partition with only 1GB of data then the rest (1.4GB minus 225MB) is available for applications to use.
if you fill up root in 100% then only 1.6GB is available for applications (4GB minus 2.4GB allocated on tmpfs).

if you fill up root partition in 100% (full 2.4GB) and then delete 1GB from it then this 1GB is again available for applications to use.

i hope it's not too complicated :)

i wouldn't use ramsize=100% as in case of filling aufs writable branch completely there will be nothing left for applications and system may work really slowly or even crash. haven't try it myself - will do just to check how system behaves.
Please add [Solved] to your thread title if the solution was found.

Posts: 333
Joined: 26 Jan 2011, 16:15
Distribution: Porteus 3.2 and 4.0 64bit KDE
Location: Malaysia

Re: Copy2ram and ram optimization

Post#4 by cttan » 17 Dec 2012, 03:48

Hi uyduruq,

I am using Porteus 1.2 64bit and copy to ram mode. My ramsize is set at ramsize=75%
I have about 195MB in porteus/modules and after startup I will activate another 97 modules which is 353MB.

When everything is running with one spreadsheet open:-

Code: Select all

# df
Filesystem     1K-blocks    Used Available Use% Mounted on
aufs             2987060  672888   2314172  23% /
/dev/sdb1        7742680 7682196     60484 100% /mnt/sdb1
/dev/sda3        1050188 1029012     21176  98% /mnt/sda3
/dev/sda6        7218432 6797900     53852 100% /mnt/sda6
# free
             total       used       free     shared    buffers     cached
Mem:       3982744    3397836     584908          0     304616    1737356
-/+ buffers/cache:    1355864    2626880
Swap:      2072568          0    2072568
I have also activated zram:-
modprobe zram
echo $((1024*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon -p 100 /dev/zram0

Post Reply