Hello!
I’m trying to do a “live preview” server, where I just build a single page. For good UX I’m trying to keep it as close as < 1000 ms. On my machine, I get 552ms which is fantastic, but on the prod server I’m getting 24000ms
There are some obvious big differences about specs and I’m trying to pinpoint the bottleneck so I can ask for more resources for the server if applicable, or if I need to tweak some partials… I’m not sure where to look really
- Would having more cores have an impact even if we are only processing one page?
- Static files are not needed but I can’t ignore it via mounts (its in a theme subfolder)
- Non page files are images that might or not be processed in the page via
resource.getmatch
. (0 images used in this example)
Local specs:
CPU: AMD Ryzen 7 2700 (16 cores ) @ 3.6
RAM: 16GB
OS: EndeavourOS Linux x86_6 - Kernel: 5.18.12-arch1-1
Server Specs:
CPU: Intel Xeon E5-2697 (2 cores) (vmware) @ 2.4
RAM: 8GB
OS: Windows Server 2016 Standard
Build logs:
Local:
Start building sites …
hugo v0.99.1-d524067382e60ce2a2248c3133a1b3af206b6ef1 linux/amd64 BuildDate=2022-05-18T11:18:14Z VendorInfo=gohugoio
WARN 2022/07/26 14:20:17 .File.UniqueID on zero object. Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}
Template Metrics:
cumulative average maximum cache percent cached total
duration duration duration potential cached count count template
---------- -------- -------- --------- ------- ------ ----- --------
3.066031ms 3.066031ms 3.066031ms 0 0 0 1 _default/single.aspx
812.566µs 812.566µs 812.566µs 100 0 0 1 partials/footer.html
698.734µs 698.734µs 698.734µs 100 0 0 1 partials/footer-edit-helper.html
541.56µs 135.39µs 250.768µs 100 0 0 4 partials/functions/getEditInBuilderURL.html
321.61µs 321.61µs 321.61µs 100 0 0 1 partials/breadcrumbs.html
188.712µs 188.712µs 188.712µs 100 0 0 1 partials/navigation-main.html
168.214µs 168.214µs 168.214µs 100 0 0 1 partials/redirect-page.html
131.024µs 65.512µs 114.483µs 100 0 0 2 partials/functions/getCascadeRoot.html
126.076µs 126.076µs 126.076µs 100 0 0 1 partials/environment-banner.html
117.459µs 117.459µs 117.459µs 100 0 0 1 partials/functions/getRedirect.html
71.844µs 71.844µs 71.844µs 100 0 0 1 partials/analytics-google-gtm-body.html
60.664µs 60.664µs 60.664µs 100 0 0 1 partials/redirect-message.html
60.522µs 60.522µs 60.522µs 100 0 0 1 partials/styles-custom.html
58.91µs 58.91µs 58.91µs 100 0 0 1 partials/banner.html
55.393µs 55.393µs 55.393µs 100 0 0 1 partials/logo.html
52.698µs 52.698µs 52.698µs 100 0 0 1 partials/analytics.html
52.067µs 52.067µs 52.067µs 100 0 0 1 partials/analytics-posthog.html
41.017µs 41.017µs 41.017µs 100 0 0 1 partials/analytics-bugherd.html
31.779µs 31.779µs 31.779µs 100 0 0 1 partials/analytics-google-ga4.html
28.373µs 28.373µs 28.373µs 100 0 0 1 partials/analytics-google-gtm-head.html
| EN
-------------------+------
Pages | 1
Paginator pages | 0
Non-page files | 633
Static files | 862
Processed images | 0
Aliases | 0
Sitemaps | 0
Cleaned | 0
Total in 620 ms
Server:
Start building sites …
hugo v0.99.1-d524067382e60ce2a2248c3133a1b3af206b6ef1 windows/amd64 BuildDate=2022-05-18T11:18:14Z VendorInfo=gohugoio
WARN 2022/07/26 18:56:33 .File.UniqueID on zero object. Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}
Alloc = 29.6 MB
TotalAlloc = 48.7 MB
Sys = 41.3 MB
NumGC = 7
Alloc = 29.4 MB
TotalAlloc = 64.0 MB
Sys = 49.9 MB
NumGC = 8
Alloc = 26.5 MB
TotalAlloc = 79.5 MB
Sys = 50.0 MB
NumGC = 9
Alloc = 31.3 MB
TotalAlloc = 98.7 MB
Sys = 50.0 MB
NumGC = 10
Template Metrics:
cumulative average maximum cache percent cached total
duration duration duration potential cached count count template
---------- -------- -------- --------- ------- ------ ----- --------
6.9984ms 6.9984ms 6.9984ms 0 0 0 1 _default/single.aspx
2.0016ms 1.0008ms 1.0008ms 100 0 0 2 partials/functions/getCascadeRoot.html
2.0008ms 2.0008ms 2.0008ms 100 0 0 1 partials/breadcrumbs.html
1.9986ms 1.9986ms 1.9986ms 100 0 0 1 partials/footer.html
1ms 250µs 1ms 100 0 0 4 partials/functions/getEditInBuilderURL.html
1ms 1ms 1ms 100 0 0 1 partials/banner.html
1ms 1ms 1ms 100 0 0 1 partials/footer-edit-helper.html
0s 0s 0s 100 0 0 1 partials/analytics-google-ga4.html
0s 0s 0s 100 0 0 1 partials/functions/getRedirect.html
0s 0s 0s 100 0 0 1 partials/navigation-main.html
0s 0s 0s 100 0 0 1 partials/analytics-posthog.html
0s 0s 0s 100 0 0 1 partials/analytics-google-gtm-head.html
0s 0s 0s 100 0 0 1 partials/environment-banner.html
0s 0s 0s 100 0 0 1 partials/redirect-page.html
0s 0s 0s 100 0 0 1 partials/logo.html
0s 0s 0s 100 0 0 1 partials/analytics-google-gtm-body.html
0s 0s 0s 100 0 0 1 partials/redirect-message.html
0s 0s 0s 100 0 0 1 partials/analytics-bugherd.html
0s 0s 0s 100 0 0 1 partials/analytics.html
0s 0s 0s 100 0 0 1 partials/styles-custom.html
| EN
-------------------+------
Pages | 1
Paginator pages | 0
Non-page files | 633
Static files | 862
Processed images | 0
Aliases | 0
Sitemaps | 0
Cleaned | 0
Total in 24172 ms