Friday, June 28, 2013

1 Build Fake NUMA test environment with BCDEdit

My last attempt to create the NUMA lab environment with Aamazon EC2 was successful . ( see pot here). However, it will cost 7.25 per hr.

During the research of NUMA, I found the article by Jonathan Kehayias. He use BCDEdit to fake the hardware NUMA. This seems very interesting so I decide to give it a try.

My VM environment is Virtual Box, I was not sure it can work because it does not let me specify number of core and cpu like VMWare does.

image

If the VM is VMware workstation, it let us specify the number of core and CPU.

image

Before bcdedit , the SQL server shows only 1 NUMA node with 8 logical CPU.

select  node_id,node_state_desc,memory_node_id,cpu_affinity_mask,online_scheduler_count,active_worker_count,processor_group  from sys.dm_os_nodes

image

image

bcdedit /set groupsize 2

 

groupsize means how many processor each group can have. In this case, we have 8 processes and each group can have 2 processors, therefore we will end up with 4 nodes and each node would have 2 processes.

image

After set the groupsize, we needs to reboot the server. When server comes back, we now have 4 NUMA nodes. very cool.

 

image

image

SQL server error log

image

image

From Coreinfo

image

 

AWS EC2 SQL Server

I like to see if the same changes can use on the EC2 . It works good.

Now, I can use the smaller instance on EC2 for testing NUMA if I want to.  ( I like to have 4 virtual core so I choice m1.xlarge which cost about ~ $1.434/hr, Not too bad ).

image

image

 

Reference

http://www.sqlskills.com/blogs/jonathan/faking-hardware-numa-on-a-smp-machine-for-learning-and-demos/

1 comments:

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates