Subscribe via RSS Feed Connect on LinkedIn

16GB RAM in HP NL40 Microserver and using PowerShell to check system RAM at startup

20/01/2013 4 Comments

image

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

image

image

 

But with 16GB:

image

 

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
$mem.TotalPhysicalMemory
If ($mem.TotalPhysicalMemory -lt 8589074433)
{
Write-Host “Memory is only 8GB”
Restart-Computer
}
If ($mem.TotalPhysicalMemory -gt 8589074433)
{
Write-Host “Memory is over 8GB”
}

 

image

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

clip_image001

 

image

We run the script

image

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

image

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.

Take a second to share this, thanks, TomTwitter1LinkedIn0Facebook1Google+0
Tom Arbuthnot

Tom Arbuthnot

Managing Consultant at Modality Systems
Tom Arbuthnot is a Microsoft Lync Certified Master and MVP. He is currently Managing Consultant at Modality Systems. Tom is actively involved in the global Unified Communications community. He is a founding member of the Microsoft UC User Group London, a contributing writer to Lync Server 2013 Unleashed and a technical reviewer for Trainsignal. Modality Systems is a UC Centre of Excellence – specializing in strategy, infrastructure, user adoption, managed services and software development.
Tom Arbuthnot
Tom Arbuthnot
Filed in: vendor • Tags: , , ,

Comments (4)

Trackback URL | Comments RSS Feed

  1. Anders says:

    Cool script, to bad I’m running vmware and not Hyper-V and just noticed the same issue (my vmware cluster is never rebooted but just did and both my servers N40 and N54 showed up with 8G :( bummer

  2. Andrew says:

    Great script! thanks!

Leave a Reply