HUGO

Hugo Num Workers Strategy

I see that HUGO_NUMWORKERMULTIPLIER is now a configurable setting in the Hugo config (ref). The definition:

Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.

Can anyone explain more about this? For example, is it a bad thing to set this number higher than the number of CPU cores available? Does actual CPU cores for threads (Intel’s hyperthreading) matter?

4 Likes

The multiplier is as a base to calculate the number of go routines used for the parallel tasks in Hugo, e.g. page rendering. Go routines are cheap (they’re not threads) to create, so setting it too high will probably not hurt.

In most cases the default will be good (it’s set to num CPU cores, on my MacBook i9 that is 8). I would think that a more relevant use case for that setting is to set it to some lower (if you for some reason do not want to use all your CPU for Hugo).

3 Likes

Great thanks.