# Any www browser that using memory to save tmp files?



## jronald (Sep 19, 2010)

It uses memory instead of hard disk to save tmp files, eg. *.html.
And the tmp files as a whole can be exchanged between memory and hard disk.
I think the speed will be very fast, and the runtime overhead is very small,
doesn't it?


----------



## fronclynne (Sep 19, 2010)

Most browsers do use RAM for caching, yes.  I suppose you could also point the cache dir at a tmpfs(5) filesystem, or a md(4).  But most modern browsers work best when you don't try too hard to fix what ain't wrong yet.


----------



## Beastie (Sep 19, 2010)

I use Opera. Memory caching is disabled, disk caching is enabled. I have a tmpfs(5) and ~/.opera is symlinked to it. A shell script copies configuration files to the tmpfs and starts the browser. Thus, disk caching is in fact a "controlled" memory caching.


----------



## jronald (Sep 24, 2010)

But, for example, when you browser a web site,
you'll find the .html files will be in the tmp dir.
It means disk operations, that slows things down.


----------



## rden (Sep 24, 2010)

Yes it will slows things down, lets see, the proportion of time taken to write and read the files to/from disk against the time it takes to bring those files over the network, ohh off the top of my head the speed saving of doing it memory would be what, 0.001% faster.

IOW: instead of taking say 1 second to load google it will take, um, a blazing .99999 seconds.  And not only that: saves wear and tear on the HDD too!

Sign me up, . . . not.


----------



## Beastie (Sep 24, 2010)

jronald said:
			
		

> But, for example, when you browser a web site, you'll find the .html files will be in the tmp dir.
> It means disk operations, that slows things down.


Are you replying to my post? No, all files are written to the *memory-backed* disk so no hard-disk access ever happens unless the md/tmpfs uses all available physical memory and the system starts swapping.
You can redirect your browser cache directory to any other directory, and if this directory is mounted on a memory-backed filesystem, everything your browser stores is obviously stored in memory.


----------

