# How to use more RAM?



## vsoto (Mar 26, 2009)

According to top(1):

Mem: 283M Active, 190M Inact, 531M Wired, 4312K Cache, 399M Buf, 2914M Free
Swap: 4096M Total, 4096M Free

Seems like a lot of RAM is just sitting there doing nothing.
This is a laptop running 7.2-PRERELEASE amd64 so sleep and suspend to RAM/DISK are not supported. In an computer that is on most of the time it seems like some data get cached: xorg starts faster the second time and so on so that would be a good use for the memory. But I have to turn off the laptop every time I move.

Is there a way to put that memory to good use?

v.


----------



## SirDice (Mar 26, 2009)

vsoto said:
			
		

> Seems like a lot of RAM is just sitting there doing nothing.
> This is a laptop running 7.2-PRERELEASE amd64 so sleep and suspend to RAM/DISK are not supported. In an computer that is on most of the time it seems like some data get cached: xorg starts faster the second time and so on so that would be a good use for the memory.


The remaining memory will be used for file caching.


----------



## vermaden (Mar 26, 2009)

vsoto said:
			
		

> Is there a way to put that memory to good use?



You can use *tmpmfs* and *varmfs* in rc.conf to mount /tmp and /var in RAM.


----------



## ph0enix (Mar 26, 2009)

*locate daemon?*

n/m


----------



## vsoto (Mar 27, 2009)

SirDice said:
			
		

> The remaining memory will be used for file caching.



I know, I have noticed that some programs/commands are faster after the first time they are run. The problem is that the computer is not on long enough for that to be useful: It's a laptop running amd64 so I can't suspend to disk or RAM and continue later; so every time I go from home to coffee shop I have to turn it off and lose what the system had cached.

v.


----------



## vsoto (Mar 27, 2009)

vermaden said:
			
		

> You can use *tmpmfs* and *varmfs* in rc.conf to mount /tmp and /var in RAM.



I'll look into it.

Thanks,

v.


----------



## darcsis (Mar 27, 2009)

*how about this sysctl?*

kern.ipc.shm_use_phys=1

it seems this would comsume some RAM. but i'm not quite sure.


----------



## Djn (Mar 27, 2009)

I think amd64 suspend/resume support just got committed to CURRENT, by the way - I got the impression it works quite well.


----------



## vermaden (Mar 27, 2009)

Djn said:
			
		

> I think amd64 suspend/resume support just got committed to CURRENT, by the way - I got the impression it works quite well.



On SMP systems as well?


----------



## oliverh (Mar 27, 2009)

vermaden said:
			
		

> On SMP systems as well?



http://lists.freebsd.org/pipermail/freebsd-current/2009-March/004417.html


----------



## vsoto (Mar 29, 2009)

Djn said:
			
		

> I think amd64 suspend/resume support just got committed to CURRENT, by the way - I got the impression it works quite well.



Are there any plans to port it to STABLE?

v.


----------

