Hey guys. I’ve finally relaunched my project and it’s running on Hugo now - https://www.kukuruku.co/. It supports authentication, as well as static commenting system.
There is a problem with the build time. This is what I get when I build locally.
Started building sites ...
Built site for language en:
0 of 36 drafts rendered
0 future content
0 expired content
193 regular pages created
488 other pages created
0 non-page files copied
65 paginator pages created
41 hubs created
430 tags created
total in 460 ms
I’m on MacBook Pro 2.5 GHz Intel Core i7 16 GB 1600 MHz DDR3.
The production server is running 2 GB Memory Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz, Ubuntu 16.04.1 x64, and the build time is 1.2-1.3 seconds for the same number of posts/pages. This is almost 3 times slower.
I see in the docs that Hugo is multi-threaded. This CPU has 12 cores but don’t they have slower single thread performance than the i7’s (at least the latest ones)?
That’s your answer. DO uses KVM hypervisor to segment resources for each droplet. You don’t get any kind of guaranteed 100% use of resources and can suffer with ‘noisy neighbours’.
The way they word it “2 CPU plan” is a little misleading, but industry standard.
Apologies if you know this already but basically they’re virtual cores meaning you have theoretical access to the equivalent of 2 physical cores on the underlying bare metal. When you need some processing done the hypervisor will allocate your droplets’ request for CPU time to any available free CPU. That can take a little time for the request to be fulfilled, and it can take a little time to get the ‘answer’ back from the CPU.
So the hypervisor adds a bit of overhead and the other droplets present on the same underlying bare metal will be taking up some CPU resources too, so you won’t get the same performance as if you were on your own bit of dedicated hardware with no hypervisor or other droplets.
Add that to the fact the laptop you have is likely very good and that just about covers why you’re getting the results you are getting.