Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2007 01:41:06 +0200
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-questions@freebsd.org
Cc:        Shawn O'Connor <soconnor@falconknight.com>
Subject:   Re: mdconfig using malloc()
Message-ID:  <200706290141.07063.pieter@degoeje.nl>
In-Reply-To: <4D15FF0C-0531-4455-9631-F60D939F9EB2@falconknight.com>
References:  <4D15FF0C-0531-4455-9631-F60D939F9EB2@falconknight.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706290141.07063.pieter>