16GB RAM in HP NL40 Microserver and using PowerShell to check system RAM at startup
I have a couple of the HP NL40 Microservers in my lab, they are little low powered servers (dual core AMD 1.5Ghz) but make quite decent little virtualisation hosts for a lab environment. Officially they support 8GB RAM, but there are a number of reports of them working with 16GB. In fact a good UK supplier ships them with 16GB http://www.serversplus.com/servers/server_bundles/658553421-16GB, using this ECC kit http://www.ec.kingston.com/ecom/configurator_new/partsinfo.asp?root=&LinkBack=&ktcpartno=KVR1333D3E9SK2/16G
The servers will also take non ECC kits (about half the price), but unfortunately on boot the servers only register 16GB of usable RAM about 1/3 or 1/5 boots in my experience (even with the various modified bios FYI). If they boot registering only 8GB they work quite happily, but with only 8GB addressable, if they boot with 16GB all appears to work fine too (had them running for more than a week consistently with Hyper-V VM’s using all the RAM), that being said, this isn’t supported, your mileage may vary etc..
For reference I’m using Patriot G2 Series PC3-10600 Main Memory 16 GB 1,333 MHz 240-Pin 2x 8 GB DDR3-RAM Kit (PGD316G1333ELK) and G.Skill 16GB (2x 8GB) Dual Channel Ares Series Memory Kit (DDR3 1333, 9-9-9-24, 1.5v, Intel XMP Extreme Memory Profile Ready) (F3-1333C9D-16GAO).
So, I have a server that can work with 16GB, but I can only tell if I’m in front of it watching POST when it boots, that’s not much use as I often start the servers remotely/run them headless. Fortunately a little PowerShell comes to the rescue.
When booted with 8GB we get this
Get-WmiObject -Class Win32_ComputerSystem
But with 16GB:
So, I can run a script to check the amount of RAM and reboot if it’s not 16GB, but I’ll want a get out, in case it decides it’s jut not registering 16GB anymore and I get stuck in an endless loop
# If mem is 16GB it reports 17179009024
# If mem is 8GB it reports 8589074432
$mem = Get-WmiObject -Class Win32_ComputerSystem
If ($mem.TotalPhysicalMemory -lt 8589074433)
Write-Host “Memory is only 8GB”
If ($mem.TotalPhysicalMemory -gt 8589074433)
Write-Host “Memory is over 8GB”
So, if the server reports less than 16GB it will reboot and try again.
Let’s create some files in the c:\Check-Memory folder to simulate more than 100 unsuccessful boots, here is a little loop to create the files
We run the script
Nothing happens as there are more than 100 files in the C:\Check-Memory folder
If we delete some of the c:\Check-Memory files, to bring it below 100
The script runs fine, since I’m running booted on 16GB, the server isn’t rebooted and the log files are deleted out of C:\Check-Memory.
So, now when I boot my servers remotely or via WOL, it will check the memory and reboot itself until the memory registered is 16GB, unless it loops 100 times then it gives up.