Pages

Sunday, March 5, 2017

RAMdisk performance in a virtual machine

Thought I would share some performance testing I have done, regarding using RAM disks in conjunction with virtual machines.

imageI am using VMware Workstation, to do a lot of software demonstrations, and of course wants the best performance possible, when in front of potential customers. So I am dragging around one of the fastest laptops on the market, Dell XPS 15 9550 spec’ed as you can see in the picture, using it as the Host machine for my demo VM’s. The physical HD is a 1TB SSD.

imageSo with plenty of RAM, I want to se if I can squeeze some more performance out my VM’s, running web applications with databases intensive tasks. My intention is to move both websites and DB to RAMdisks, and wanted to see if I should just create one RAMdisk for both website and DB’s of have two RAMdisk, one for the websites and one for the DB’s.

My VM is Microsoft Windows Server 2012 R2 Standard, and configures as in the picture.

One thing to note about VMware configuration, is that VMware has a general setting, where you can force to keep the VM’s in physical RAM, so that when configured to use 16 GB, it will use 16 GB physical RAM, and not try to swap some of the ram to the hard drive. Not sure how it affects a RAMdisk inside the VM, but to be sure I have enabled this option.

I am using https://www.softperfect.com/products/ramdisk/ . Did a lot of investigation, as there is many RAMdisk vendors out there. Softperfect RAM disk, was chosen because of top performance, ability to create persistent disks and OK price ($29.00 private/$49.00 Business).

So on to the testing. First, some normal disk performance figures running CrystalDiskMark (CDM), both inside the VM and on the host. As you can see, there is a performance penalty inside the virtual machine, when it comes to disk performance.

Standard VM disk For reference, Host physical SSD
image image

Next, performance of RAMdisk.

RAMdisk inside the VM For reference, Host RAMdisk
image image

As expected, significant performance increase, compared to regular disks, both inside VM and on the Host.

Odd thing here is that the 4K tests inside the VM actually out performs the same on the host.

Now lets see if we can get higher performance with two RAMdrive’s inside the VM, tested simultaneously
RAMdrive 1 RAMdrive 2
image image

A small performance gain, but I am sure that it is caused by the two tests, not running 100% in sync. CDM does each test 5 time, and pauses both between each repetition and each of the eight test. As the tests are not pausing at exactly the same time, one of the CDM instances will have 100% of the bandwidth on its own.

One thing to note here is that, even running two instances of CDM, only one CPU kernel is used, and it is maxing out.
IO and CPU performance counters  
image image

Just for reference, testing two RAMdrive’s simultaneously on the host. ON the Host, we have the same issue that both CDM instances uses CPU1 that is maxed out, and the sum Read/Write is about the same as for one RAMdisk.
Two RAM drives on host – IO performance counter
image  image  image

Just to confirm, the problem running two instances of CDM at the same time, I have also tested with one RAM Disks inside the VM (NTFS), but tested simultaneously with two instances of CDM. Results here are mixed. Some are better than when testing two RAM disks, some are worse. Again, sure that this is caused by the two instances not being 100% in sync.

As you can see in the I/O graph, comparing it to the same for testing two RAMdisks, the read sequences, are slightly more off. For the pink write test, especially the second last one, they run more simultaneously, and here we actually gets less MB/s compared to writing to two disks.
     
image image image

Conclusion

Great performance gain of using RAMdisk. No real gain of using two disks, but this can be caused by several reasons. CDM only using one CPU that max out, is one of them. But it could also be that Soft perfect RAM disk driver is handling both disks.

As for my own purpose, I have moved my websites and DB’s to a RAM disk, and see a significant increase in especially load time when hitting my websites for the first time after boot. As the websites/applications utilize heavy caching, once warmed up, there is not much difference. But my websites has some DB heavy publishing process, where huge amount of date is read/written to my databases. One of these process take about 10 minutes, with website and DB’s moved to a RAMdisk, I was able to cut that down to 6 minutes.

One caveat of RAMdisk the way I am using it, using persistent disks, is that it takes longer booting and shutting down the VM. In my case, I have a 6GB persistent disk, and that of course need to be loaded every time I boot the machine, as well as written to disk on shutdown. Also there is a risk associated with RAMdisks, as you loose all data when your machine crash. Softperfect has an option, to write the content of persistent RAM disks to its disk file, at configurable intervals, and you can also do it manually.

This also affects Microsoft SQL Server, as the RAMdisk, on boot, actually does not get loaded fast enough, so the DB you have on RAMdisk, will go into recovery mode. This can be fixed, just restarting the SQL server service. You can also make SQL Server service delay start, or start it manually.


Friday, October 2, 2015

Day 1 - Being Mac'ed–Confessions of a Windows aficionado

Unboxing my first Mac today, and thought I would share my experience, as a lifelong Windows aficionado. Writing about the pros and cons, trying to keep an open mind, I have no doubts, I will run into situations where I wished I never made this move.
My employer, IBM, have blessed we with a MacBook Pro Retina 15. (The latest and greatest I suppose :-)
So day 1 – UnBoxing leads to my first confession. What a beauty! And this is strong words from a Windows aficionado, IBM'er, former HP and Compaq, who have been spoiled with the best HW at all times.
I think most people who now me, would go a far as calling me a "Mac hater", but getting this piece of aluminum in my hands, I have to cave in.
Any cons on day one. Really to minor to mention, but compared to my current ASUS Zenbook, I find the keyboard to both harder and more noisy. Can imagine, and hope it will soften a bit, after some use. Sure many keys are missing and in the wrong places. But I knew that and will just have to learn (But why move the @ key, I am sure its most comfortable being on the same key as 2.
Well managed to get through the first boot and setup, without any problems, except I quickly found out that having my full name as "Full name" was not smart, as it is the login you have to enter a lot of times as your credentials. With the help of google, also shortned my account name, as I can imagine having to entering it a lot in terminals, knowing I want to get into the engine room of my Mac.

END NOTE: Back in 1984 I was an exchange student in Colorado Springs, where I took my first computer class. It was Fortran programming using punch cards. In 3rd semester the school got some Apple Macintosh computers. Of course tried them, but no fun at all, as you could not make them print anything! (In Fortran class we sent the punch cards down town for processing, and got the result back on endless paper. Sometimes several miles, when accidently having programmed an endless loop in the print code).
But no kidding. The video shows the first time I have ever turned on a Mac since 1984!


Technorati Tags: ,,,

Friday, November 23, 2012

Two months with my new ASUS ZENBOOK


I've had many laptops, desktop replacement laptops, gaming laptops, and also been lucky to work for companies ligke Compaq, HP and IBM, and been supplied with top of the pops at that time. But my new UX32VD R4002V beats everything! And yes, I really require a lot from my computer. At work I use VM  to demonstrate large e-commerce solutions, so I need a machine that performs, so until I bought ASUS ZENBOOK UX32VD-R4002V i dragged around 4-8 kg. heavy Lenovo monsters.

Then bought an ASUS ZENBOOK UX32VD-R4002V for my daughter who started high school, and after having installed / configured / de-crapified it for her, I just had to also own one :-)

I deliberately choose ASUS ZENBOOK UX32VD-R4002V (Top EU model in UX32VD series), rather than the slightly thinner/lighter UX31A series, as you can change/extend the RAM and disk in UX32VD, which can not be in UX31A'erne. In addition, UX32VD-R4002V has a separate graphics card so that it can run both games and graphics-intensive applications better (I am not a gamer at all, but do some video editing).

After a few months, behindt the keyboard, several customer presentations and a few trips around Europe, I must say that I am 110% satisfied with my purchase. (This is my daughter also, and she is quite good at making complaints about a lot of things).

With a little extra shopping i now have a lightning fast computer that beats anything I have ever had in my hands before, but here are pros & cons, after a couple of months use on the road.

Stuff that the makes working with UX32VD into a good day ...
  • The screen is fantastic
  • Perfectly thin and light
  • Good milage on a charge
  • Instant On feature is really "Instant on"! (Close teh lid when you're done, fold it up, enter the password and you're going again)
  • Light in keyboard
  • Three USB 3 ports, so you do not have to lug around a hub, to have more than one external mouse connected.
  • Does not get hot, even when lying on your lap
  • Stable, robust and fast
  • Small nifty power supply, with long thin wire
Could be better ...
  • The keyboard is not as it was on a real IBM Thinkpad, but it's probably just the top, of what can be expected on such a thin machine
  • Instant on is as I said, INSTANT, but some time after the instant one happens once in a while the machine is beating furiously up the fan for 5-10 seconds
  • It could be done better, and is a little annoying ...
  • The screen can not be fully opened enough that you can comfortably use it on a plane on monkey class.
Try once again - It's just crap ...
  • I have not found anything yet... Well , OK, to be honest - it is not very smart to put the  "on/off" button next to the Delete button. And it is not smart to have PgUp / PgDn / Home / End and Insert buttons available only as fn buttons.
But all in all, a machine which I can highly recommend to anyone who is ready to pay DKR 10,000 for a new computer.

Are you ready to use even more, you may want to do as I have done and get even more speed, run longer on a charge and be completely silent.

I have expanded RAM with 8GB Corsair Vengeance SO-DIMM PC3-12800S module. UX32VD-R4002V comes with 2x2GB. Only one RAM module can be changed, giving  a total of 10 GB. As the machine has different RAM modules,it no longer runs DUAL Channel, which should hit on performance, but it's definitely not something I've noticed. On the contrary. I run many intensive applications, so the extra RAM actually makes it run faster.

UX32VD-R4002V comes with both a 450 GB standard SATA HD, and a 32 GB SSD. The 32 GB SSD is  used for cache, which ensures that the most frequently used files on the large hard disk is cached on the small but fast 32 GB SSD. It makes windows starts much faster, and often used programs and files also load much faster. I have chosen to equip mine with an Intel Solid-State Drive 520 Series 480 GB, which in itself is faster than the small 32 GB built-in SSD, and then it no longer makes sense to use the built-in for cache. In any case, the result is a crazy fast small, light thin, silent notebook.

Now I am a geek, so I just to squeeze a little more performance out of the beast, then there is no reason that the built-in 32 GB SSD, hangs around unused. I have chosen to move Windows pagefile, onto it.

Afraid to take apart a brand new computer? Do not worry, if you can operate a screwdriver, you can also do it. How easy it is, you can see here.

Should you still consider a ZENBOOK, I have collected some info about the different ZENBOOK models here.