You are not logged in.

#1 2006-02-16 01:06:46

wmvdg123
Member
Registered: 2006-02-12
Posts: 12

Can we mount / in ram and load apps instantly?

Hi, can we do this on Arch?
http://forums.gentoo.org/viewtopic-t-29 … ttime.html
It sounds pretty cool and I figured somebody might know how to do it big_smile
Thanks,
Wayne

Offline

#2 2006-02-16 08:52:12

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Can we mount / in ram and load apps instantly?

That is awesome, and perfect for my laptop.  It has a slow hd, and a gig of ram.

I see nothing in there that is distro specific.  You can just follow his instructions and try this on arch today.

Offline

#3 2006-02-16 10:57:49

pikass
Member
From: Schwartz space
Registered: 2005-11-28
Posts: 85

Re: Can we mount / in ram and load apps instantly?

It just increases first startuptime und may decreases speed of apps which need a large amount of ram (gimp for example) due to swapping.

In my opinion not worth the hassle. Maybe with two GB ram.

Offline

#4 2006-02-16 12:02:34

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Can we mount / in ram and load apps instantly?

you can already do this in Archie just use copy2ram (I think!) ... ;-)


Mr Green

Offline

#5 2006-02-16 12:44:14

wmvdg123
Member
Registered: 2006-02-12
Posts: 12

Re: Can we mount / in ram and load apps instantly?

I'll try it on my laptop in the next couple days, it would be awesome if it worked.
Mr. Green, do you know how to get copy2ram to work? It seems that SLAX can do the copy2ram, I only saw it mentioned one other time on our forums, if anyone could get it working it would probably be easier than the gentoo hack.
Wayne

Offline

#6 2006-02-16 12:55:58

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Can we mount / in ram and load apps instantly?

most of the smaller live distros can run from Ram ....its just a way of freeing up CDrom...

you would have to play around with initrd (like your link!) open up Archies/Slax  & take a look ;-)

Don't get put of by scripts most are in Bash....

The only problem I see which has already been stated is the fact that you need a large amount of ram installed

Not sure how it affects boot time but I never worry about how long it takes to boot rather than it boots at all ;-)


Mr Green

Offline

#7 2006-02-16 15:45:29

wmvdg123
Member
Registered: 2006-02-12
Posts: 12

Re: Can we mount / in ram and load apps instantly?

most of the smaller live distros can run from Ram ....its just a way of freeing up CDrom...

So do puppy and feather run just from ram? Their apps don't start instantly, at least when I tried?
Wayne

Offline

#8 2006-02-16 16:01:31

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Can we mount / in ram and load apps instantly?

Not sure on Puppy I think it creates an image on your hard disc ....because its designed for low end systems (limited Ram etc..!)

Feather I have not used much so I cannot comment

Always found slax to be nice to look at but lack apps (IMO)


Mr Green

Offline

#9 2006-02-17 01:59:51

mac57
Member
From: St. Somewhere
Registered: 2006-01-06
Posts: 302
Website

Re: Can we mount / in ram and load apps instantly?

If you have enough RAM to run your root system from RAM... you likely don't need to do it!

I have a 1 GB of RAM on my system. I find that the first time I start an app, it is clearly cached in RAM somehow by Arch. All subsequent starts are nearly instantaneous, as would be consistent with RAM caching. As a test, start Firefox. Quit and start it again. The second startup is MUCH faster than the first.

This is essentially the same as what you are trying to achieve with mounting / in RAM, or using copy2ram, no? You pay the price the first time you access the app, whether it be copying it to RAM, or just starting it normally. After that, startups are faster than greased lightening.

I am guessing that Arch maintains a pretty healty-sized disk cache. Does anyone know where/how this is configured?


Cast off the Microsoft shackles Jan 2005

Offline

#10 2006-02-17 08:55:42

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Can we mount / in ram and load apps instantly?

/tmpfs system you could up it, but that has its own problems

df -h /tmp  
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 505M  8.0K  505M   1% /tmp

in this case half my systems Ram


Mr Green

Offline

#11 2006-02-17 19:08:13

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Can we mount / in ram and load apps instantly?

tmpfs allocates space dynamically and can be limited in size by setting size=XX when mounting or in fstab.

Offline

#12 2006-02-18 08:11:34

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Can we mount / in ram and load apps instantly?

iBertus:  Thank you.  I've needed that tip for a while now.

Offline

#13 2006-02-18 17:55:32

mac57
Member
From: St. Somewhere
Registered: 2006-01-06
Posts: 302
Website

Re: Can we mount / in ram and load apps instantly?

Hmmm... I am running Arch 0.7.1, pretty much "straight out of the box". I don't have a /tmpfs. If I look at /etc/fstab, it is not mounted, and if I do

df -h

it is not there. Has it been replaced with something else in 0.7.1?


Cast off the Microsoft shackles Jan 2005

Offline

#14 2006-02-19 04:01:28

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Can we mount / in ram and load apps instantly?

wmvdg123;

Puppy linux runs in ram with a cache in the hdd area for replenishing the internet and other desktop items as prorammed by the user on first boot up(or later).

Knoppix can be run in ram as well with the same cache idea.  It has 700mb of cdrom which requires 1GB to enter all in ram.

The cheat codes allow the same for the DVD Knoppix of 4GB size which would require more ram than can be provided in my computer, which has 3GB.

Ramfs allows half of physical ram which can be augmented by swap.

One interesting transfer I noted in working with ramfs.

It agrees with the previous post about second time calls...I transferred one GB of video from ranfs to desktop at say 45MB/sec.  The second time I transferred the same file(under a new name) it transferred at over 120MB/sec as I recall.  Thus, caching is certainly evident.

In the event one uses more than half of physical ram, engages swap, the swap is much slower.

The foregoing suggests that caching uses the unavailable half of physical ram.

There is a limit to everything, as the saying goes, and direct install of a large distro would limit the available ram even moreso.  Thus, many small distros utilize ram to good advantage, including the removal of the cdrom after booting, using low ram computers, and read only systems.

I have loaded konqueror and operated it in ramfs just for kicks.

I find that .vob files of 1gb play nicely in ramfs along with mplayer when I have 3GB of ram available.  Half of that seems optimum for the purpose.

If one runs in ram, all other devices can be shutdown....some users find that helpful since it reduces the noise in a quiet room and reduces heat generated in the computer.

One last positive comment...viruses can be dumped forthwith...no anti-virus clogging up the system and slowing it down to say nothing about the price of the continued upgrades year after year!  Thusly, operating in ram is valuable from a defensive standpoint which is increasingly important in the windows arena, the prime target..  One could run a system in ram for many things to escape being blasted.

This isn't the last word, y'know!!!

=========================

A woman has the last word (except WHAT?).


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#15 2006-02-19 04:16:18

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Can we mount / in ram and load apps instantly?

mac57 wrote:

Hmmm... I am running Arch 0.7.1, pretty much "straight out of the box". I don't have a /tmpfs. If I look at /etc/fstab, it is not mounted, and if I do

df -h

it is not there. Has it been replaced with something else in 0.7.1?

Yes, in 0.7.1,  /tmp is just an ordinary directory.  It doesn't use tmpfs anymore. I think it was removed because some users were running out of space when using /tmp.

Offline

#16 2006-02-19 04:38:53

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Can we mount / in ram and load apps instantly?

Snowman wrote:
mac57 wrote:

Hmmm... I am running Arch 0.7.1, pretty much "straight out of the box". I don't have a /tmpfs. If I look at /etc/fstab, it is not mounted, and if I do

df -h

it is not there. Has it been replaced with something else in 0.7.1?

Yes, in 0.7.1,  /tmp is just an ordinary directory.  It doesn't use tmpfs anymore. I think it was removed because some users were running out of space when using /tmp.

Yes, unless you have a large amount of physical memory (i.e. 1GB+) you could easily run short when trying to extract large archives using file-roller. I still use /tmpfs because I've got 2GB of RAM and it's not an issue. I'd say that in my case the value of having it be fast and truly temporary is greater than the memory balance.

Offline

Board footer

Powered by FluxBB