mdconfig using malloc()

Pieter de Goeje pieter at degoeje.nl
Thu Jun 28 23:41:19 UTC 2007


On Thursday 28 June 2007, Shawn O'Connor wrote:
> Guys,
>
> I'm trying to do the following:
>
> mdconfig -a -t malloc -o reserve -s 2g
You really don't want to do this. mdconfig will try to allocate 2G of wired 
memory, which will obviously fail, because you really don't have that much 
kernel memory available. This might work (with some tweaks) on a 64bit 
platform however.
>
> Which fails saying it can't:
>
>   mdconfig: ioctl(/dev/mdctl): Cannot allocate memory
>
> I saw some old post advocated using -t swap instead, saying that swap
> probably wouldn't be used until real memory was consumed. But, on my
> 6.2 machine that immediately raises the swap usage to 2GB and does
> use disk instead of RAM when I test using it.
That's because you used -o reserve. Leave it out and it'll be fine.
>
> Is there any way I can get 2GB of physical memory actually allocated?
>
> As a last resort, would upgrading to -CURRENT get this to work?
Assuming you want to use the device for a filesystem, you could use tmpfs 
which is new in current.
>
> Many thanks!
>
> 	-Shawn

HTH,
Pieter de Goeje


More information about the freebsd-questions mailing list