Page 1 of 1

[Solved] copy2ram questions

Posted: 14 Aug 2012, 19:12
by rodyaj
Hi.

I installed Porteus to hard disk so I have enough storage for downloads and such, but I still boot with copy2ram:

Code: Select all

APPEND initrd=/boot/initrd.xz vga=791 copy2ram changes=/porteus/ kmap=gb lang=en_GB noload=kde
My system has 4gb of ram so I load in to ram to get the benefits of increased app start up times, but this means I quickly run out of space when I try to download large files. I'm guessing this means I need to mount my home directory on the hard disk filesystem instead? Is there a recommended way of doing this without breaking things?

Also, I'm not quite sure how loading into ram works. Are the files I download still getting stored on the hard disk install because the ram disk is just virtual? Or does it actually decrease the amount of ram available for access by running applications? If it does, I suppose I should point the 'changes=/porteus/' line to a hard disk as well?

Thanks for reading.

Re: copy2ram questions

Posted: 14 Aug 2012, 19:33
by brokenman
If I fill up ram with storage, does that actually decrease the amount of ram I have available for access by running applications? Will it slow down my system to a crawl? If it does, I suppose I should point the 'changes=/porteus/' line to a hard disk as well?
If you fill up ram with storage you indeed decrease the memory available for applications. The system puts aside a certain amount of ram to ensure the system doesn't go down easily. You shouldn't notice a speed decrease unless you fill up ram and are using swap, after which read times will increase slightly.

If you are using changes=/porteus/ then i would assume the porteus directory is on writable media (the place you installed porteus) which is where your changes are being stored. I'd recommend saving large files to external storage if using copy2ram.

Re: copy2ram questions

Posted: 14 Aug 2012, 19:36
by rodyaj
Ok thanks for the help. Will the changes be persistent if I edit /etc/fstab to mount my home directory on the hard disk?

Re: copy2ram questions

Posted: 14 Aug 2012, 20:34
by fanthom
@rodyaj

i guess that porteus is installed on NTFS/FAT formatted partition - is it?
otherwise 'changes=/porteus/' cheatcode would never let you fill up the RAM as all files would be saved on the partition where porteus is installed.
Will the changes be persistent if I edit /etc/fstab to mount my home directory on the hard disk?
Porteus is a live linux distro so fstab must be recreated at every boot.

i would recommend you using "magic folders" to pair your /home/guest folder with save.dat (if you have only windows fs around) or folder (if you have at least one linux fs on your hd).
I'm not quite sure how loading into ram works.
copy2ram tells linuxrc (booting script) to copy all modules to RAM first (you can find them in /mnt/live/memory/copy2ram folder). once done booting continues by using modules stored in RAM rather than by using modules placed on your booting media.
this way everything works faster.

copy2ram doesn't force storing everything in RAM.
you can use 'copy2ram' together with 'changes=' cheatcode so porteus will be working faster and your changes remain persistent (as saved on the hard drive)
same applies to 'copy2ram' + "magic folders".

Cheers

Re: copy2ram questions

Posted: 14 Aug 2012, 20:53
by rodyaj
fanthom wrote:@rodyaj

i guess that porteus is installed on NTFS/FAT formatted partition - is it?
I installed on ext4.
otherwise 'changes=/porteus/' cheatcode would never let you fill up the RAM as all files would be saved on the partition where porteus is installed.
Yes I see that now. I only added 'changes=' today and didn't reboot to test it. Now that I have rebooted to test it, files are getting written just as I wanted all along. Any new files (that aren't added through modules) are getting written to the hard disk installation rather than the live system - just as I wanted. So now I can download without running out of disk space or using up ram.

Thanks for helping me understand how the system works. Very neat.