Jarred Capellman
Putting 1s and 0s to work since 1995

Friday, October 31, 2014

Sun Sunfire X4600 M2

Posted By Jarred Capellman

One machine that I had always wanted finally came to a pricepoint I saw as a good deal. This machine as expected from this blog's title, a Sun X4600 M2. This machine originally was released in Summer 2008 with the version I have in Late 2008. Luckily the version I have has 8 AMD Opteron 8384 Quad Core CPUs for a total of 32 cores. Most configurations I had been seeing on eBay are either Dual Core or lowerend Quad Core models.

Sun Sunfire X4600 M2 - Front

Sun Sunfire X4600 M2 - Inside

Sun Sunfire X4600 M2 - Hard Drives

I had the Mushkin 120gb and Western Digital Black hard drives laying around from a NewEgg sale a while back. I should note the SAS Controller on the X4600 is SATA II only, so your SATA III drives will be limited to SATA II's 300mb/sec.

One word of caution, during the initial bootup of the system the decibal level get quite extreme. After 10 seconds or so the noise gets to a bearable level, but no where near "living room" safe levels. As a result, I'm building a little rack in the garage since it stays around 50' all year round and can just use a Powerline adapter to keep it connected to my other machines.

Having purchased a HP Blade thinking I might one day own an HP Blade enclosure, I had 32gb of compatible DDR2 ECC ram laying around. One thing to note, the arrangement of ram is incredibly picky. If you're populating more than 4 DIMMs per CPU module they all need to match. I had at first just used the 16 DIMMs to populate the CPU modules as I found empty slots. Upon turning on the X4600 I was presented with only a fraction of the CPU modules and 16gb of ram (down from the 80gb it should have been). I ended up populating two CPU modules with the 16 2gb sticks I had from the HP Blade and then maxing out another with the original ram.

Sun Sunfire X4600 M2 - Extra ram from 
HP Blade

Operating System wise I chose Windows Server 2012 R2 since I had already started utilizing Hyper-V on my NAS for FreeBSD, OpenSUSE, Windows XP and Solaris VMs. To get Windows Server 2012 R2 installed I had to use an external USB drive and reduce the ECC Ram Settings in the bios to Good. Otherwise after cycling through the onboard SAS controller it would hang.

After applying all of the Windows Updates since 2012 R2 hit RTM, I pulled up Task Manager:

Sun Sunfire X4600 M2 - Windows Server 2012 R2 

Task Manager

Immediately afterwards, I pulled open jcBENCH to see how it compared to my other systems, not surprisingly it is the current leader in the world:

jcBENCH 0.9.850.0531(x86/Win32 Edition)
(C) 2012-2014 Jarred Capellman

Usage: jcBench [Number of Objects] [Number of Threads]

Example: jcBench 100000 4
This would process 100000 objects with 4 threads

Invalid or no arguments, using default benchmark of 150000 objects using 32 CPUS

CPU Information
 Manufacturer: AuthenticAMD
        Model: Quad-Core AMD Opteron(tm) Processor 8384
        Count: 32x2693.27mhz
 Architecture: x86

Running Benchmark....

Integer: 1897
Floating Point: 2265
Pretty impressive for a 6 year old machine I believe, a part of me wishes I was still doing 3D Animation and Visual Effects on a routine basis as this would have made a rendering back in the day so much better with 3ds max and After Effects. Going forward this will be my primary Hyper-V server.

Friday, October 03, 2014

Mono on Windows IoT with an Intel Galileo

Posted By Jarred Capellman

After a failed attempt earlier this week (see my post from Tuesday night) to utilize the CLR that is bundled with Windows IoT, I started digging around for an alternative. Fortunately I was on Twitter later that night and Erik Medina had posted:

Not having any time Wednesday night to dive in, I spent a few hours Thursday night digging around for the Mono for Windows IoT. Fortunately, it was pretty easy to find Jeremiah Morrill's Mono on Windows IoT Blog post, download his binaries and get going.

For those wanting to use Xamarin Studio or MonoDevelop instead of Visual Studio after downloading the binary from Jeremiah, you'll need to add mcs.bat to your bin folder, with the following line (assuming you've extract the zip file to mono_iot in the root of your C drive):
@"C:\mono_iot\bin\mono.exe" %MONO_OPTIONS% "C:\mono_iot\lib\mono\4.5\mcs.exe" %*
For whatever reason this wasn't included and without it, you'll receive:
Could not obtain a C# compiler. C# compiler not found for Mono / .NET 4.5.
Inside of Xamarin Studio, goto Tools -> Options and then scroll down to Projects -> .NET Runtimes and click add to the root of the mono_iot folder. After you've added it, it should look like the following (ignoring the Mono 3.3.0 that I installed separately):

Xamarin Studio with Mono for Windows IoT setup

In addition you'll need to copy the lib folder to your Galileo and at least mono.exe and mono-2.0.dll, both found in the bin folder from Jeremiah's zip file to the folder where you intend to copy your C# executable. You could alternatively after copying over the entire mono_iot folder structure add it to the path like so (assuming once again you've extracted to c:\mono_iot) over a Telnet session:
C:\mono_iot\bin>setx PATH "%PATH%;c:\mono_iot\bin"

SUCCESS: Specified value was saved.
In order for the path variable to update, issue a shutdown /r.

If you want to see the existing variables and their values you can issue a set p which will list the following after you've rebooted your Galileo:
ProgramFiles=C:\Program Files
With the environment variable updated, you'll no longer have to either copy the mono executable to the folder of your app nor include the full path over Telnet - definitely a time saver in my opinion.

Now back to deploying my little WebClient test from Tuesday with Mono...

From Visual Studio you don't need set anything up differently, however I was running into issues with the app.config when compiling from Visual Studio and deploying a little test app to my Galileo:
System.AggregateException: One or more errors occurred ---> 
System.TypeInitializationException: An exception was thrown by the type initializer for
System.Net.HttpWebRequest ---> System.Configuration.ConfigurationErrorsException: 
Error Initializing the configuration system. ---> 
System.Configuration.ConfigurationErrorsException: Unrecognized configuration section 
So I went back to using Xamarin Studio, but received the following:
System.Net.WebException: An error occurred performing a WebClient request. ---> System.NotSupportedException: http://www.bing.com
  at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000] in :0 
  at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in :0 
  at System.Net.WebClient.GetWebRequest (System.Uri address) [0x00000] in :0 
  at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in :0 
  at System.Net.WebClient.OpenRead (System.Uri address) [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Net.WebClient.OpenRead (System.Uri address) [0x00000] in :0 
  at System.Net.WebClient.OpenRead (System.String address) [0x00000] in :0 
  at (wrapper remoting-invoke-with-check) System.Net.WebClient:OpenRead (string)
Not a good sign - essentially saying WebClient isn't supported. Got me thinking to verify the version of Mono from Jeremiah:
C:\>mono -V
Mono JIT compiler version 2.11 (Visual Studio built mono)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC)
From the 2.x branch not the newer 3.x branch like what I utilize at work for my iOS and Android development, but not wanting to go down the path of creating my own 3.x port I kept diving in - attempting to try the HttpClient that I knew wasn't supported by Windows IoT's CLR. I threw together a quick sample to pull down the compare results from jcBENCH to the console:
public async Task < T > Get < T > (string url) {
	using (var client = new HttpClient()) {
		var result = await client.GetStringAsync(url);

		return JsonConvert.DeserializeObject < T > (result);

public async void RunHttpTest() {
	var result = await Get < List < string > > ("http://www.jcbench.com/api/CompareResults");

	foreach (var item in result) {
		Console.WriteLine (item);
As far the project was concerned I added the .NET 4.5 version of Newtonsoft.Json.dll to the solution via NuGet and made sure it was copied over during deployment. With a bit of a surprise:
C:\winiottest>mono winiottest.exe
AMD A10-4600M APU with Radeon(tm) HD Graphics  
AMD A10-7850K Radeon R7, 12 Compute Cores 4C 8G
AMD A6-3500 APU with Radeon(tm) HD Graphics
AMD A6-5200 APU with Radeon(TM) HD Graphics    
AMD Athlon(tm) 5150 APU with Radeon(tm) R3
AMD Athlon(tm) 5350 APU with Radeon(tm) R3
AMD C-60 APU with Radeon(tm) HD Graphics
AMD E-350D APU with Radeon(tm) HD Graphics
AMD E2-1800 APU with Radeon(tm) HD Graphics
AMD FX(tm)-8350 Eight-Core Processor
AMD Opteron(tm) Processor 6176 SE
ARMv7 Processor rev 0 (v7l)
ARMv7 Processor rev 1 (v7l)
ARMv7 Processor rev 2 (v7l)
ARMv7 Processor rev 3 (v7l)
ARMv7 Processor rev 4 (v7l)
ARMv7 Processor rev 9 (v7l)
Cobalt Qube 2
Intel Core 2 Duo
Intel Core i5-4300U
Intel(R) Atom(TM) CPU  Z3740  @ 1.33GHz
Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz
Intel(R) Core(TM) i7-4650
Intel(R) Quartz X1000
Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz
Intel(R) Xeon(R) CPU E5440 @ 2.83GHz
PowerPC G5 (1.1)
I should note even with the newly added Sandisk Extreme Pro SDHC card, the total time from execution to returning the results was around 10 seconds, where as on my AMD FX-8350 also hard wired it returns in less than a second. Given that also the Galileo itself is only 400mhz - you definitely won't be running a major WebAPI service on this device, but there are some definite applications (including one I will be announcing in the coming weeks).

More to come with the Galileo - I received my Intel Centrino 6235 mPCI WiFi/Bluetooth card yesterday and am just awaiting the half->full length mPCIe adapter so I can mount it properly. With any luck I will receive that today and will post on how to get WiFi working on the Galileo under Windows IoT.