I have an on premise solution that consists of a server (1 machine) and X users (each in 1 machine). All the users are using the same Win32 application. The question is: How do I translate this in to an Azure enviroment? Each of the users machines are using 4 CPUs and 8 GB of RAM (this is necessary).
Do I have to configure a new machine which has to have the 4 CPUs and 8GB per user, or is there a more efficient way to get this done? Because otherwhise this is not economically profitable.
I was thinking about using XenApp and only one VM for all the users to solve this problem. But I'm not quite sure.
Any help is welcome.
you could automate the provisioning of the VMs with ARM templates. Your virtualizationception could also work. But then: how do you garantee the 8GB of RAM that is necessary? Would be good to have some more details about the requirements.
Related
I am wondering whether it is possible to run multiple VM's within a single VM. Basically I am looking at doing some research for an upcoming university subject. I want to run a mini blockchain style environment, and I need multiple VM's to test this.
What do you think is my best approach? A single cloud service with multiple machines? or am I required to purchase every single VM that I will require?
I suspect you can't. The virtualization software requires access to a set of specific CPU resources which are not in turn virtualized inside a VM it creates. Thus, you have three options
rent as many VM's as you need;
build a test environment yourself using any PC equipped with an Intel CPU supporting VT-x, or AMD
CPU supporting AMD-V;
run a full X86 emulator (as many instances
as needed) on a physical or virtual PC. One of such implementations
is open sourced project BOCSH.
The last option would have a very big performance issues of course.
I am limited by a piece of software that utilizes a single core per instance of the program run. It will run off an SQL server work queue and deposit results to the server. So the more instances I have running the faster the overall project is done. I have played with Azure VMs a bit and can speed up the process in two ways.
1) I can run the app on a single core VM, clone that VM and run it on as many as I feel necessary to speed up the job sufficiently.
OR
2) I can run the app 8 times on an 8-core VM, ...again clone that VM and run it on as many as I feel necessary to speed up the job sufficiently.
I have noticed in testing that the speed-up is roughly the same for adding 8 single core VMs and 1 8-core VM. Assuming this is true, would it better better price-wise to have single core machines?
The pricing is a bit of a mystery, whether it is real cpu usage time, or what. It is a bit easier using the 1 8-core approach as spinning up machines and taking them down takes time, but I guess that could be automated.
It does seem from some pricing pages that the multiple single core VM approach would cost less?
Side question: so could I do like some power shell scripts to just keep adding VMs of a certain image and running the app, and then start shutting them down once I get close to finishing? After generating the VMs would there be some way to kick off the app without having to remote in to each one and running it?
I would argue that all else being equal, and this code truly being CPU-bound and not benefitting from any memory sharing that running multiple processes on the same machine would provide, you should opt for the single core machines rather than multi-core machines.
Reasons:
Isolate fault domains
Scaling out rather than up is better to do when possible because it naturally isolates faults. If one of your small nodes crashes, that only affects one process. If a large node crashes, multiple processes go down.
Load balancing
Windows Azure, like any multi-tenant system, is a shared resource. This means you will likely be competing for CPU cycles with other workloads. Having small VMs gives you a better chance of having them distributed across physical servers in the datacenter that have the best resource situation at the time the machines are provisioned (you would want to make sure to stop and deallocate the VMs before starting them again to allow the Azure fabric placement algorithms to select the best hosts). If you used large VMs, it would be less likely to find a suitable host with optimal contention to accommodate many virtual cores.
Virtual processor scheduling
It's not widely understood how scheduling a virtual CPU is different than scheduling a physical one, but it is something worth reading up on. The main thing to remember is that hypervisors like VMware ESXi and Hyper-V (which runs Azure) schedule multiple virtual cores together rather than separately. So if you have an 8-core VM, the physical host must have 8 physical cores free simultaneously before it can allow the virtual CPU to run. The more virtual cores, the more unlikely the host will have sufficient physical cores at any given time (even if 7 physical cores are free, the VM cannot run). This can result in a paradoxical effect of causing the VM to perform worse as more virtual CPU cores are added to it. http://www.perfdynamics.com/Classes/Materials/BradyVirtual.pdf
In short, a single vCPU machine is more likely to get a share of the physical processor than an 8 vCPU machine, all else equal.
And I agree that the pricing is basically the same, except for a little more storage cost to store many small VMs versus fewer large ones. But storage in Azure is far less expensive than the compute, so likely doesn't tip any economic scale.
Hope that helps.
Billing
According to Windows Azure Virtual Machines Pricing Details, Virtual Machines are charged by the minute (of wall clock time). Prices are listed as hourly rates (60 minutes) and are billed based on total number of minutes when the VMs run for a partial hour.
In July 2013, 1 Small VM (1 virtual core) costs $0.09/hr; 8 Small VMs (8 virtual cores) cost $0.72/hr; 1 Extra Large VM (8 virtual cores) cost $0.72/hr (same as 8 Small VMs).
VM Sizes and Performance
The VMs sizes differ not only in number of cores and RAM, but also on network I/O performance, ranging from 100 Mbps for Small to 800 Mbps for Extra Large.
Extra Small VMs are rather limited in CPU and I/O power and are inadequate for workloads such as you described.
For single-threaded, I/O bound applications such as described in the question, an Extra Large VM could have an edge because of faster response times for each request.
It's also advisable to benchmark workloads running 2, 4 or more processes per core. For instance, 2 or 4 processes in a Small VM and 16, 32 or more processes in an Extra Large VM, to find the adequate balance between CPU and I/O loads (provided you don't use more RAM than is available).
Auto-scaling
Auto-scaling Virtual Machines is built-into Windows Azure directly. It can be based either on CPU load or Windows Azure Queues length.
Another alternative is to use specialized tools or services to monitor load across the servers and run PowerShell scripts to add or remove virtual machines as needed.
Auto-run
You can use the Windows Scheduler to automatically run tasks when Windows starts.
The pricing is "Uptime of the machine in hours * rate of the VM size/hour * number of instances"
e.g. You have a 8 Core VM (Extra Large) running for a month (30 Days)
(30 * 24) * 0.72$ * 1= 518.4$
for 8 single cores it will be
(30 * 24) * 0.09 * 8 = 518.4$
So I doubt if there will be any price difference. One advantage of using smaller machines and "scaling out" is when you have more granular control over scalability. An Extra-large machine will eat more idle dollars than 2-3 small machines.
Yes you can definitely script this. Assuming they are IaaS machines you could add the script to windows startup, if on PaaS you could use the "Startup Task".
Reference
Can anyone offer me any insights into why my cloud deployment would be slower than an on-premises computer in "horsepower" terms?
I have a compute intensive application which uses a worker role to carry out millions of computations (in parallel).
Currently in Azure I'm testing using an Extra Large (8 core, 16GB) VM to do the processing. On average it's taking 45 minutes per iteration whereas the same code running on a 4 core, 8GB on-premises machine was taking only 15 minutes.
Azure logs indicate total processor utilisation is 99% but I have 12GB memory free so I'll definitely try loading more data into memory for each iteration.
Are the 8 cores just individually very low spec? Is local storage really local? That is, is local storage really on a different physical device and therefore fetching data from file and writing results to disk is slow?
Scott Guthrie (main at Windows Azure team) to me
Hi Ivan,
We have other VM HW configurations as well – including multi-proc and high memory options. You’ll see even more options in the future.
Hope this helps,
Scott
My test: (100% of processor time)
Lucas-Lehmer math calculations. Multithread version uses Parallel.For implementation
Home computer Core i7 3770K (4 cores x 3.5GHz) (Win 8)
SINGLETHREADED (17 primary numbers): 11676 ms (11.6 secs.)
MULTITHREADED (17 primary numbers): 2816 ms (2.8 secs.)
Azure Large VM (4 cores x 1.6 GHZ) (Win S 2008)
SINGLETHREADED (17 primary numbers): 37275 ms
MULTITHREADED 17 primary numbers): 10118 ms
Azure Extra Large VM (8 cores x 1.6 GHZ) (Win S 2008)
SINGLETHREADED (17 primary numbers): 36232 ms
MULTITHREADED (17 primary numbers): 6498 m
Work computer - AMD FX 6100 (6 cores x 3.3 Ghz) (Win 7 w upd)
SINGLETHREADED (17 primary numbers): 48758 ms
MULTITHREADED (17 primary numbers): 16486 ms
Vote for this idea on first page http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/3622286-upgrade-windows-azure-processor-from-1-6-ghz-to-mi
I am experiencing the same issue. My web app with the database (on sql azure) is also really slow compared to my on-premise computer.
Local server details:
- dell's entry level server < $1000, with 4 cores and 8GB memory.
- Server is running as VMs
- even DB server is on the same server (sharing same hardware with the web server)
Azure:
- Webrole on Extra large server with 8 cores.
- SQL Azure (I guess on the different physical server)
My expectation was that it will improve the performance when I deploy to azure! :(
Guess what, it is 4 times slower (verified using the profiler code that times every request)
I am disappointed, I think it is really slow 8 cores.
I ran the test on my old computer (Intel Pentium). Installed the same local VMs on that (VMWare host). It is even faster than azure.
Couple questions in here, I'll try to answer some...
Local storage is local - means on the same disk, in a restricted area. Are you using the local storage APIs to access it? Local storage is also disposable - if your app is redeployed, all data in local storage is lost. If you are using an Azure Drive, then yes I would expect some delays since this writes to blob storage but you haven't mentioned that.
CPU spec is defined on the Azure website.
It is difficult to solve your actual slowness problem though without getting a better idea of the architecture and process your background work is following. But as a general rule, I would be surprised to see the results you are indicating. (Is your on prem machine a VM or dedicated hardware?)
I find the same thing when running analytics-heavy code (ie. little disk usage, not too much RAM needed). I guess the problem is that they select CPUs based on price and number of cores rather than power. The theory is that you should be parallelizing your code to take advantage of all those cores, but sometimes that's hard or expensive (in coding time). Consider voting for more CPU power, but sometimes that's hard or expensive.
I've been working with Windows Azure and Amazon Web Services EC2 for a good many months now (almost getting to the years range) and I've seen something over and over that seems troubling.
When I deploy a .NET build into Windows Azure into a web role (or service role) it takes usually 6-15 minute for it to startup. In AWS's EC2 it takes about the same to startup the image and then a minute or two to deploy the app to IIS (pending of course its setup).
However when I boot up an AWS instance with SUSE Linux & Mono to run .NET, I get one of these booted and deploy code to it in about 2-3 minutes (again, pending it is setup).
What is going on with Windows OS images that cause them to take soooo long to boot up in the cloud? I don't want FUD, I'm curious about the specific details of what goes on that causes this. Any specific technical information regarding this would be greatly appreciated! Thanks.
As announced at PDC, Azure will soon start to offer full IIS on Azure web roles. Somewhere in the keynote demo by Don Box, he showed that this allows you to use the standard "publish" options in Visual Studio to deploy to the cloud very quickly.
If I recall correctly, part of what happens when starting a new Azure role is configuring the network components, and I remember some speaker at a conference mentioning once that that was very time consuming. This might explain why adding additional instances to an already running role is usually faster (but not always: I have seen this take much more than 15 minutes as well on ocassion).
Edit: also see this PDC session.
I don't think the EC2 behavior is specific to the cloud. Just compare boot times of Windows and Linux on a local system - in my experience, Linux just boots faster. Typically, this is because the number of services/demons launched is smaller, as is the number of disk accesses that each of them needs to make during startup.
As for Azure launch times: it's difficult to tell, and not comparable to machine boots (IMO). Nobody knows what Azure does when launching an application. It might be that they need to assemble the VM image first, or that a lot of logging/reporting happens that slows down things.
Don't forget, there is a Fabric controller that needs to check for fault zones and deploy your VMs across multiple fault zones (to give you high availability, at least when there are more than two instances). I can't say for sure, but that logic itself might take some extra time. This might also explain why network setup could be a little complicated.
This will of course explain the difference (if any) between boot times in the cloud and boot times for windows locally or in Amazon. Any difference in operating systems is completely dependent on the way the OS is built!
I need to run 8-10 instances of my application on IIS 6.0 that are all identical but point to different backends (handled via config files, which would be different for each virtual directory). I want to create multiple virtual directories that point to different versions of the app and I want to know if there is any significant performance penalty for this. The server (Windows Server 2003) is a quad-core with 4 GB of ram and the single install of the app barely touches the CPU or memory, so it doesn't seem to be a concern. This doesn't seem to justify another server, especially since some of the instances will be very lightly used. Obviously, performance depends on the server and the application, but are there any concerns with this situation?
IIS on Windows Server 2003 is built to handle lots of sites, so the number of sites itself is not a concern. The resource needs of your application is much more of a factor. I.e., How much, i/o, cpu, threads, database resources does it consume?
We have a quad-core Windows Server 2003 server here handling several hundred sites no problem. But one resource-intensive app can eat a whole server no problem.
If you find your application is cpu bound, you can put each instance in its own application pool and then limit the amount of cpu each pool can use, so that no one instance can bottleneck any of the others.
I suggest you add a few at a time and see how it goes.
No concerns. If you run into any performance issues, it won't be with IIS for 10 apps that size.
You should consider using multiple application pool. If you do that, and the cpu, memory, IO and network resources of the server are in order. Then there is no performance issue.
It is possible to run them all on the same application pool. But then add to the list, thread pool usage issue, because all application will use one thread pool, and if it is 32 bit server Then there is a limit( around 1.5 Gb ) for the w3wp process.
We constantly run 15-20 per server on a 10 server load balanced farm. We don't come across any issues
The short answer is no, there should be no concerns.
In effect, you are asking if IIS can host 8 - 10 websites... of course it can. Perhaps, you might want to configure it as individual websites rather than virtual directories, and perhaps with individual application pools so that each instance is entirely independent.
You mention that these aren't vary demanding applications; assuming they aren't all linking into the same Access database, I can't see any problems.