Live data from Hacker News

The AWS EC2 Windows Secret Sauce

technodrone.blogspot.com

41–44 of 44 posts

Re: The AWS EC2 Windows Secret Sauce

#41
post #21

Earlier quoted context omitted.

> Windows goes through a mandatory process whereby it identifies hardware, installs and configures drivers etc. etc. etc. You can inject a script to carry out the process of things like setting up a user, and generating a password, but that's fairly minor on the scale of things. This first process requires a reboot. There's no escaping it. This is the "OOBE" (out of box experience) phase. I'd have thought they'd just…

Disclosure and claim to authority: I work on the Windows team at Microsoft, sometimes on performance and OS installation stuff. There's definitely some cruft that chews up time on first boot. But it's not everybody's favorite punching-bag, licensing. That stuff doesn't happen in the critical boot path. It might be installation of device drivers, but that too is unlikely. If you generalize Windows in a VM, you can use…

> you can use the `sysprep.exe /mode:vm` flag, which essentially tells sysprep to retain most of the device tree, since you expect to run the thing on similar hardware

In my experience that only really works with full paravirtualized environments. If you start mixing in SR-IOV things can get a little messy. Given customers actually crave high performing networks, that then presents you with a choice:

1) Make two images. One for full paravirtualized environments.

2) Ignore it and let Windows first boot time take longer.

Of course most clouds already end up with what are effectively multiple images for the same setup/configuration of Windows, one per hardware type anyway, because even with full PV things can get a bit strange, and you're often ending up with blue screens during first boot.

They're not going to want to _double_ that number. Even with full automation that's a bunch more things that can go wrong, more operational burden etc. etc. Where's the value proposition? Windows provisions a little faster?

Linux images rarely need to be produced for different hardware types / environments. They just spin up and away you go. As to your systemd/sysv comment.. even sysv based instances have a time-to-login on first boot of under a minute.

The systemd developers were obsessed with the idea that parallelism would speed up the boot process, but it doesn't make as significant a performance impact as they'd have you believe, especially when you're talking about cloud images that rarely have many services running on first boot. Even if you go trawling down the systemd boot time reporting, you'll see that most components start in fractions of a second, and the same was true under SysV too.

Re: The AWS EC2 Windows Secret Sauce

#42
post #29

I used Windows instances a few years ago. Beyond the slow start, once started, frequently the CPU would stay stuck at very low %, and my tasks would run very slowly. Eventually I would get to 100%, but it could often take 10 minutes. What I learned from those pains is how to use Linux in the Cloud.

Seems like you were using T2 instances which have a low baseline performance and burst credits. I would imagine that you quickly run out of credits on some of the smaller instance types after creation, given how lengthy and costly (in terms of CPU usage) the instance creation and boot process is.

I was typically using c3.xlarge for CPU-intensive tasks (video processing).

Boot time was OK. I would log in on the machine with RDP, because sometimes my processes were almost frozen for a while. It felt like my neighbours were stealing my CPU, but I did not know how to prove it.

Once I moved to Ubuntu, same instance type, I never experienced this.

Re: The AWS EC2 Windows Secret Sauce

#43

I used Windows instances a few years ago. Beyond the slow start, once started, frequently the CPU would stay stuck at very low %, and my tasks would run very slowly. Eventually I would get to 100%, but it could often take 10 minutes. What I learned from those pains is how to use Linux in the Cloud.

Instances launched from EBS snapshot (or EBS-backed AMI) are lazily loaded from S3, which probably explains slow performance, if you are doing lots of I/O operations (in my experience Windows is more I/O heavy, especially on boot). From Amazon documentation[1]: However, storage blocks on volumes that were restored from snapshots must be initialized (pulled down from Amazon S3 and written to the volume) before you can…

But I was logged in with RDP when I saw this... So I assume everything related to boot was over and not related.

Re: The AWS EC2 Windows Secret Sauce

#44
post #37

I don't think they have a pool of instances at all. It's a generalized image which they boot up for you. Cloning the image, even though it is many gigabytes, takes milliseconds since the underlying storage (EBS) will be some log-based storage. If they really wanted to optimize boot time, they would freeze the fully booted machine (keeping all the RAM contents) and then clone the frozen instance. That should be able t…

Windows licensing mechanism prevents this scenario

Amazon are big enough they could get Microsoft to rework how the technicals of licensing work.
Post reply on HN