Hacker News new | ask | show | jobs
by Zombiethrowaway 2655 days ago
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.

3 comments

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.

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 access the block. This preliminary action takes time and can cause a significant increase in the latency of an I/O operation the first time each block is accessed.

[1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-init...

But I was logged in with RDP when I saw this... So I assume everything related to boot was over and not related.
I've experienced this lately with a variety of Amazon Windows images. For example I will boot a 2016 image from this year vs one from last year and last year's will be significantly faster on the same hardware.
Any chance that might have to do with patches for the spectre vulnerability taking a performance toll?

https://en.wikipedia.org/wiki/Spectre_(security_vulnerabilit...

Its possible. I didn't run any numbers or look at patch levels. It just went from running AD FS flawlessly on one to being barely usable over RDP on the other. Now I'm interested and might have to dig up which AMIs I've been through.