DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default OpenBSD only regognizes 1.6 GB out of 8 GB RAM installed

Hi.

I recently upgraded from a Mac Mini G4 to a Asrock Beebox NUC. Main reason was that I need to use java, which is not available under powerpc. Anyway.... Everything works fine so far, except that OpenBSD only recognizes 1.6 GB of RAM. However, I have 2x 4GB RAM modules installed.

During boot OpenBSD correctly detects both 4GB modules, but only 1.6 GB are usable. I first thought that the onboard graphics card steals some usable memory, but not to that amount...

So. What's going on here? How can I get OpenBSD to use the full amount of RAM installed?

Code:
$ dmesg|grep mem
OpenBSD 5.8 (GENERIC.MP) #1098: Sun Aug 16 02:38:27 MDT 2015
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Celeron(R) CPU N3150 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS,SENSOR,ARAT
real mem  = 1797062656 (1713MB)
avail mem = 1748631552 (1667MB)
[...]
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
Many thanks in advance.
Reply With Quote
  #2   (View Single Post)  
Old 17th December 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

Quote:
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
You installed the "i386" version of OpenBSD. This is for 32 bit CPU's and with 32 bits only 4 gigabyte of memory can be addressed
Code:
$ echo 2^32 | bc
4294967296
$  echo 2^64 | bc
18446744073709551616
The question is whether that CPU is 64 bits or not
You can find that out with the following command:
Code:
$  sysctl hw
hw.machine=amd64
hw.model=AMD Athlon(tm) 64 Processor 3700+
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=cd0:,wd0:3a6d4322b09ba067,fd0:
hw.diskcount=3
hw.sensors.kate0.temp0=40.00 degC
hw.sensors.kate0.temp2=30.00 degC
hw.sensors.lm1.temp0=33.00 degC
hw.sensors.lm1.temp1=20.50 degC
hw.sensors.lm1.temp2=28.00 degC
hw.sensors.lm1.volt0=2.19 VDC (VCore)
hw.sensors.lm1.volt1=2.86 VDC (+12V)
hw.sensors.lm1.volt2=3.30 VDC (+3.3V)
hw.sensors.lm1.volt3=5.15 VDC (+5V)
hw.sensors.lm1.volt4=1.05 VDC (-12V)
hw.sensors.lm1.volt5=5.01 VDC (5VSB)
hw.sensors.lm1.volt6=3.52 VDC (VBAT)
hw.cpuspeed=2200
hw.setperf=100
hw.vendor=MICRO-STAR INTERNATIONAL CO., LTD
hw.product=MS-7094
hw.version=1.00
hw.uuid=Not Set
hw.physmem=1071579136
hw.usermem=1071566848
hw.ncpufound=1
hw.allowpowerdown=1
You also could read the machine section of boot.conf(8)
On my Alix (i386) I have the following lines in /etc/boot.conf
Code:
machine diskinfo
machine memory
set timeout 10
That prints out on boot:
Code:
M>> OpenBSD/i386 BOOT 3.27
Disk    BIOS#   Type    Cyls    Heads   Secs    Flags   Checksum
hd0     0x80    label   971     128     63      0x2     0xcc6c9536

Region 0: type 1 at 0x0 for 640KB
Region 1: type 2 at 0xf0000 for 64KB
Region 2: type 2 at 0xfff00000 for 1024KB
Region 3: type 1 at 0x100000 for 261120KB
Low ram: 640KB  High ram: 261120KB
Total free memory: 261760KB
As described in boot.conf(8) you also can enter these commands interactively (on boot just hit the space bar a few times, don't press ENTER ) and modify the memory configuration.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 17th December 2015 at 10:45 AM.
Reply With Quote
  #3   (View Single Post)  
Old 17th December 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

4GB may be addressable by a 32-bit x86 processor, but only 3GB is usable by OpenBSD/i386. x86 systems with more than 3GB of RAM are best served with OpenBSD/amd64.
Reply With Quote
  #4   (View Single Post)  
Old 17th December 2015
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

1.6 GB is still a hell-of-a-lot less than 3GB ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #5   (View Single Post)  
Old 17th December 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

According to http://ark.intel.com/products/87258/...up-to-2_08-GHz that CPU is 64 bits, so installing OpenBSD for amd64 should solve the issue.

But it should be interesting to know whether you can make more memory available for i386 with those machine memory commands outlined in the boot.conf man page.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 17th December 2015 at 11:25 AM.
Reply With Quote
  #6   (View Single Post)  
Old 17th December 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

The 1.6GB limit is likely a BIOS memory mapping issue which the bootloader's machine memory command may be able to both indicate and resolve.
Reply With Quote
  #7   (View Single Post)  
Old 17th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default

I added the parameters in /etc/boot.conf.

See attached photo of the output.

The (rather bad) UEFI BIOS has an option to set the amount of memory the graphics card can use. It correlates with the amount of RAM available under OpenBSD, e.g. graphics card = 512 MB, OpenBSD = 1.5 GB. However, 6 GB are always missing.

Maybe I should try the amd64 image? That would mean reinstalling....
Attached Images
File Type: jpg memory.jpg (205.1 KB, 106 views)
Reply With Quote
  #8   (View Single Post)  
Old 17th December 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by mayuka View Post
Maybe I should try the amd64 image?
Given:
Quote:
Code:
$ dmesg|grep mem
OpenBSD 5.8 (GENERIC.MP) #1098: Sun Aug 16 02:38:27 MDT 2015
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Celeron(R) CPU N3150 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS,SENSOR,ARAT
Yes.

The presence of "LONG" in the processor feature set indicates the capability of running amd64.

Is this a guarantee that all memory will be recognized? No, there may be oddities in the overall motherboard design which may be present which do not show in the limited information provided.

Last edited by ocicat; 17th December 2015 at 04:31 PM.
Reply With Quote
  #9   (View Single Post)  
Old 17th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default

Okay. Will try to install amd64-version of OpenBSD. Will take a while...

You can see the full dmesg-output (i386) here:
http://daemonforums.org/showpost.php...8&postcount=83
Reply With Quote
Old 17th December 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

Before you install amd64. please post the output of $ sysctl hw
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 17th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default

i386:

Code:
# sysctl hw
hw.machine=i386
hw.model=Intel(R) Celeron(R) CPU N3150 @ 1.60GHz ("GenuineIntel" 686-class)
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:,sd1:0ed8996a583a4968
hw.diskcount=2
hw.sensors.cpu0.temp0=58.00 degC
hw.cpuspeed=480
hw.setperf=0
hw.vendor=ASRock
hw.product=N3150-NUC
hw.uuid=65d3719e-a784-3ec4-93a7-c17aa1cf5f96
hw.physmem=1797062656
hw.usermem=1796853760
hw.ncpufound=4
hw.allowpowerdown=1
hw.perfpolicy=manual
Reply With Quote
Old 17th December 2015
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by J65nko View Post
You installed the "i386" version of OpenBSD. This is for 32 bit CPU's and with 32 bits only 4 gigabyte of memory can be addressed
I no longer use i386 but IIRC OpenBSD now includes PAE in generic. It is a byproduct of Mark Kettenis' and Mike Larkin's work on W^X and also related to Mike Larkin native hypervisor effort.

https://marc.info/?l=openbsd-cvs&m=142886392102122&w=2

https://marc.info/?l=openbsd-cvs&m=142987998607845&w=2

Last edited by Oko; 18th December 2015 at 01:37 AM.
Reply With Quote
Old 17th December 2015
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Quote:
Originally Posted by Oko View Post
Mike Larkin native hypervisor effort.
Between this and the Xen PV backend work going on I think I might overdose on joy and be found laying in a pool of my own drool giggling merrily to myself.

Edit - Not to stray too far from the original topic, of course. I can't suggest if reinstalling amd64 instead of i386 would help, but I can say that i386 to my knowledge doesn't leverage hardware NX bit circuitry (i.e. emulates it in software), so amd64 is preferable on that grounds, too.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.
Reply With Quote
Old 18th December 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

If you don't want to do an 64 bit reinstall yet, you could create an create an USB stick with an amd64 install58.fs and see how that boots.
When you don't have an USB stick, the alternative is to boot your current i386 system with an amd64 bsd.rd. For some more info on this see http://www.openbsd.org/faq/faq4.html#bsd.rd .

Select S to get a shell when the installer asks you what you want to do:
Code:
Welcome to the OpenBSD/amd46 5.8 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
With # dmesg | less you can use the space bar to scroll through the kernel boot messages.

You can also use the command # sysctl (no "hw"parameter!) to get a limited subset of the # sysctl hw output.
This is what I get when I boot my amd64 system with an i386 USB boot stick:
Code:
# sysctl
kern.osrelease=5.8
hw.machine=i386
hw.model=AMD Athlon(tm) 64 Processor 3700+ ("AuthenticAMD" 686-class, 1024KB L2 cache)
hw.product=MS-7094
hw.disknames=cd0:,wd0:3a6d4322b09ba067,fd0:,rd0:b41cc1508365704d,sd0:1eb98777cfc3e465,sd1:
hw.ncpufound=1
My 64 bits CPU now, just like yours, is recognized as an 686-class one.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 18th December 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

The machine memory information in the photo showed 3.44GB mapped in BIOS, if I've added all the KB correctly.
Reply With Quote
Old 18th December 2015
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by rocket357 View Post
Between this and the Xen PV backend work going on I think I might overdose on joy and be found laying in a pool of my own drool giggling merrily to myself.

Edit - Not to stray too far from the original topic, of course. I can't suggest if reinstalling amd64 instead of i386 would help, but I can say that i386 to my knowledge doesn't leverage hardware NX bit circuitry (i.e. emulates it in software), so amd64 is preferable on that grounds, too.
+1

For the entire post including the recommendation. Honestly I am having very hard time to think of a single reason somebody would run amd64.

Between have you seen this?

http://marc.info/?l=openbsd-tech&w=2&r=1&s=WAPBL&q=b

One more reason for the Joy this holiday season.
Reply With Quote
Old 18th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default

I migrated to OpenBSD-amd64. Now, all of the installed memory seems to be detected. However, changing the amount of memory that the graphics card can utilize does not seem to make a difference in OpenBSD... This seems a bit odd to me. In BIOS settings I decided to give it 512 MB.

Anyway, attached is an image of the memory boot-output.

Here is the output of sysctl hw under amd64:

Code:
# sysctl hw
hw.machine=amd64
hw.model=Intel(R) Celeron(R) CPU N3150 @ 1.60GHz
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.diskcount=2
hw.sensors.cpu0.temp0=59.00 degC
hw.cpuspeed=1601
hw.setperf=100
hw.vendor=ASRock
hw.product=N3150-NUC
hw.physmem=7954817024
hw.usermem=7954792448
hw.ncpufound=4
hw.allowpowerdown=1
hw.perfpolicy=high
In the meantime, I had trouble with java. It seems that java can only use a very limited amount of memory. Even "java -version" crashed with the following error:
Code:
Could not allocate metaspace: 268435456 bytes
As it turned out, there seem to be very hard standard ulimit restrictions in OpenBSD.

ulimit -a for user root:
Code:
# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) 33554432
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) 2509364
max memory size         (kbytes, -m) 7525516
open files                      (-n) 128
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1310
virtual memory          (kbytes, -v) 33562624
ulimit -a for the default user:
Code:
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) 524288
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) 2509364
max memory size         (kbytes, -m) 7525516
open files                      (-n) 128
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 4096
cpu time               (seconds, -t) unlimited
max user processes              (-u) 128
virtual memory          (kbytes, -v) 524288
I changed some entries in /etc/login.conf:
Code:
default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/l
ocal/sbin:\
        :umask=022:\
        :datasize-max=6144M:\
        :datasize-cur=6144M:\
        :maxproc-max=1024:\
        :maxproc-cur=512:\
        :openfiles-cur=512:\
        :stacksize-cur=8M:\
        :memorylocked=4096M:\
        :vmemoryuse=9192M:\
        :localcipher=blowfish,8:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:
Afterwards I ran the following command and rebooted:
Code:
cap_mkdb /etc/login.conf
Java now starts as expected. However, I am wondering what the best solution is for the problem???

Exploring PAE is interesting but may not give me any advantages when compared to amd64??
Attached Images
File Type: jpg memory_amd64.jpg (225.7 KB, 55 views)
Reply With Quote
Old 18th December 2015
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

I might be completely ignorant but I am not aware that you can assign certain amount of RAM to a video card. Is that something commonly done on other OSs?
Reply With Quote
Old 18th December 2015
mayuka mayuka is offline
Fdisk Soldier
 
Join Date: Dec 2009
Posts: 64
Default

Afaik, most ULV processors from Intel come with an integrated graphic card that do not has dedicated memory. The graphic card utilizes some of the computer's system memory. Typically in UEFI BIOS you can set the amount of memory assigned to the graphic card.

http://ark.intel.com/products/87258/...up-to-2_08-GHz

http://www.asrock.com/Nettop/Intel/B...asp?cat=Manual
Reply With Quote
Old 18th December 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Quote:
Originally Posted by mayuka View Post
...However, I am wondering what the best solution is for the problem???
The default login class is intentionally resource restricted. The staff class is commonly used for workstation users -- those who need to run applications with larger resource requirements such as browsers -- or in your case, Java.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installed OpenBSD 5.7.Need update help Itproman OpenBSD Installation and Upgrading 18 19th August 2015 02:57 PM
Installed OpenBSD, and wiped out MBR scottro OpenBSD Installation and Upgrading 31 13th December 2014 07:45 PM
Installed OpenBSD for the first time ..... Some questions bsd007 OpenBSD General 6 20th October 2014 02:55 AM
Install NetBSD when DesktopBSD or OpenBSD is installed ahlsner NetBSD General 4 6th August 2009 08:26 PM
Installed 4.3 & No GUI warriors OpenBSD General 24 14th August 2008 11:28 AM


All times are GMT. The time now is 02:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick