FreeBSD doesn't 'see' all available memory

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
ivanatora
Posts: 3
Joined: 13. Apr 2008, 17:48

FreeBSD doesn't 'see' all available memory

Post by ivanatora »

Hello,
I've installed FreeBSD 7 and it runs flawlessly. But when I run X (fluxbox) everything is moving crappy, and Gkrellm tells me I have only 50MB of memory. When I was configurating the virutal machine I've set 512MB base memory and 32MB video memory.
Here is a little debugging output from FreeBSD:

Code: Select all

% sysctl -a |grep -i mem
Virtual Memory:         (Total: 2294124K, Active 191152K)
Real Memory:            (Total: 39720K Active 29412K)
Shared Virtual Memory:  (Total: 46104K Active: 40248K)
Shared Real Memory:     (Total: 11064K Active: 9592K)
Free Memory Pages:      3136K
vm.kmem_size_scale: 3
vm.kmem_size_max: 335544320
vm.kmem_size_min: 0
vm.kmem_size: 25165824
vfs.ufs.dirhash_mem: 173727
vfs.ufs.dirhash_maxmem: 2097152
debug.fwmem_debug: 0
hw.physmem: 55005184
hw.usermem: 34349056
hw.realmem: 68153344
hw.firewire.fwmem.speed: 2
hw.firewire.fwmem.eui64_lo: 0
hw.firewire.fwmem.eui64_hi: 0
hw.cbb.start_memory: 2281701376
hw.pci.host_mem_start: 2147483648
p1003_1b.memlock: 0
p1003_1b.memlock_range: 0
p1003_1b.memory_protection: 0
p1003_1b.shared_memory_objects: 1
aeichner
Oracle Corporation
Posts: 193
Joined: 31. Aug 2007, 19:12

Post by aeichner »

You can try to add hw.physmem=<memory in bytes> to your loader.conf
In your case the line should look like this;
hw.physmem=536870912

Additionaly if you have a high cpu load on your host even if the guest idles you can add the following line:
kern.hz=100
ivanatora
Posts: 3
Joined: 13. Apr 2008, 17:48

Post by ivanatora »

I did that and now FreeBSD won't boot. I see at the initial screen that the memory is 512MB. I tried booting in verbose logging mode in order to show some debug info, and I made a screenshot
However after that I disabled ACPI and now the virtual machine boots.
Is this normal?
This is my memory now:

Code: Select all

> sysctl -a | grep -i Mem
Virtual Memory:         (Total: 2187520K, Active 68128K)
Real Memory:            (Total: 25112K Active 12800K)
Shared Virtual Memory:  (Total: 9764K Active: 5248K)
Shared Real Memory:     (Total: 6052K Active: 4172K)
Free Memory Pages:      458768K
vm.kmem_size_scale: 3
vm.kmem_size_max: 335544320
vm.kmem_size_min: 0
vm.kmem_size: 171335680
vfs.ufs.dirhash_mem: 157517
vfs.ufs.dirhash_maxmem: 2097152
debug.fwmem_debug: 0
hw.physmem: 523722752
hw.usermem: 501821440
hw.realmem: 536870912
hw.firewire.fwmem.speed: 2
hw.firewire.fwmem.eui64_lo: 0
hw.firewire.fwmem.eui64_hi: 0
hw.cbb.start_memory: 2281701376
hw.pci.host_mem_start: 2147483648
p1003_1b.memlock: 0
p1003_1b.memlock_range: 0
p1003_1b.memory_protection: 0
p1003_1b.shared_memory_objects: 1
localhost66
Posts: 5
Joined: 18. Jun 2008, 15:31
Primary OS: OpenSolaris 11
VBox Version: PUEL
Guest OSses: XP SP3, Ubuntu 8.04, 2003x64

512MB + ACPi

Post by localhost66 »

I tried to increase mem in VBOX from 512 to 544 and kepp hw.physmem 512M.
Now it works with ACPI enabled !
len
Posts: 2
Joined: 4. Jul 2008, 15:55

Post by len »

This worked beautifully for me. I tried just 16MB between "realmem" and "physmem" and that works too. The numbers from your sysctl suggest that there is 0xC8A000 (around 13MB) slack between real and physmem. I did not try to ride that edge.
Thanks for the tip: I would never have found this solution otherwise!
polki
Posts: 49
Joined: 17. Dec 2008, 14:58

Post by polki »

Anybody got me an idea how to solve this problem if i can't even install anything *BSD because of this mem problem?
sandervl
Volunteer
Posts: 1064
Joined: 10. May 2007, 10:27
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Windows, Linux, Solaris

Post by sandervl »

polki
Posts: 49
Joined: 17. Dec 2008, 14:58

Post by polki »

Ok, so i have no option other than waiting for an update to come or build my own binary?
KenJackson
Posts: 27
Joined: 6. Jul 2007, 16:52
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: WindowsXP, OpenSolaris
Location: Maryland, USA
Contact:

Re: FreeBSD doesn't 'see' all available memory

Post by KenJackson »

ivanatora wrote:I've installed FreeBSD 7 and it runs flawlessly.

Were you able to access a remote server during installation?

I tried to install 7.1 using one of the offical FTP sites, but I can never get any network traffic.
Other virtual machines work correctly, so I think my setup is correct.
Post Reply