Ramdisk, Debian, Firefox

Archived topics about LMDE 1
Forum rules
ShellGhost
Level 1
Level 1
Posts: 4
Joined: Mon Jan 31, 2011 5:35 am

Ramdisk, Debian, Firefox

Postby ShellGhost » Mon Jan 31, 2011 5:48 am

Hi all, I've been a happy user of LM 8 and 9 for the past few years, and now I've moved on to LMDE.

I'd like to create a ramdisk for my firefox cache (I know firefox can already store it's cache in ram, this is a learning experience and unless there is a very good reason to not do it this way - and I'd appreciate a comparison by someone more knowledgeable than myself - I'd like to try).

I have 2 GB of ram, even with firefox, bloated as it is, I rarely use more than 512MB and zero page file (less than what I used with ubuntu/gnome based mint!). I'd like the ram disk to be 512MB in size (as recommended by some walkthroughs etc. that I've linked to at the bottom).

I'd just do it myself, but I'd like to run a sanity check by the members here since (at least for me) the relationship between debian (and lmde) and ubuntu is a little confusing, and I feel like modifying the boot process and ram allocation is something I shouldn't be doing without caution.

TL;DR - what of the two ubuntu options in the link below will work for me? is there a better way? how does doing it this way compare to any other methods of storing firefox's cache in ram?

Thanks!

http://www.linuxreaders.com/2011/01/11/ ... ra-ubuntu/

User avatar
grimdestripador
Level 6
Level 6
Posts: 1053
Joined: Fri Feb 16, 2007 2:26 am

Re: Ramdisk, Debian, Firefox

Postby grimdestripador » Mon Jan 31, 2011 11:52 pm

Rather than doing all the setup, I went straight for the core code.

Code: Select all

mount -t tmpfs -o size=512M,mode=0744 tmpfs /tmp/ram1/
chmod 777 /tmp/ram1/ -R


I proved that it works by

Code: Select all

dd if=/dev/zero of=/tmp/ram1/file count=512M

and viewing the spare space

Code: Select all

df | grep /tmp/ram1


All that you'd need to do is setup firefox correctly

ShellGhost
Level 1
Level 1
Posts: 4
Joined: Mon Jan 31, 2011 5:35 am

Re: Ramdisk, Debian, Firefox

Postby ShellGhost » Tue Feb 01, 2011 10:02 am

so tmpfs is better? or the only option? I'm willing to give that a go, looks good (after reading the comments on the link I posted I saw a similar method that I was leaning towards).


Thanks a ton!!!!

ShellGhost
Level 1
Level 1
Posts: 4
Joined: Mon Jan 31, 2011 5:35 am

Re: Ramdisk, Debian, Firefox

Postby ShellGhost » Tue Feb 01, 2011 10:25 am

Seems to be working great! JW would I expect to see files in there if I were to navigate to that folder (after changing firefox's settings)?

ShellGhost
Level 1
Level 1
Posts: 4
Joined: Mon Jan 31, 2011 5:35 am

Re: Ramdisk, Debian, Firefox

Postby ShellGhost » Tue Feb 01, 2011 11:21 am

browser.cache.memory.enable

is that a better way than using tmpfs? how does using the method in the link I posted compare to both, or either?

I guess I should have been more clear in the original post.

benj_amin
Level 1
Level 1
Posts: 1
Joined: Tue Feb 08, 2011 11:00 am

Re: Ramdisk, Debian, Firefox

Postby benj_amin » Tue Feb 08, 2011 11:36 am

I have been looking for some answers on firefox caching as well and it seems that the memory used in RAM via the setting "browser.cache.memory.enable" is only used for very few things now (content that sets no-store), mainly due to the fact that image.cache that has been recently tweaked and will no longer use RAM. So it seems the best way to go is to use disk.cache and setup a tmpfs to get the cache back into RAM.

See https://bugzilla.mozilla.org/show_bug.cgi?id=454001 for some info on this matter. I currently cannot find much direct info on the image.cache though.


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 1 guest