ansible / ansible-documentation

Ansible community documentation
https://docs.ansible.com/
GNU General Public License v3.0
83 stars 494 forks source link

A lot of resources to build #1836

Open nolash opened 2 months ago

nolash commented 2 months ago

I build devel d4e77888a45cde3745e7edd7ad9039fffef8ea2b with command nox (I wanted to build v2.17.3 but if failed due to missing parameters in a file, probably deps version issue).

It took 8 whole minutes to build on:

Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          39 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                GenuineIntel
  Model name:             11th Gen Intel(R) Core(TM) i5-11320H @ 3.20GHz
    CPU family:           6
    Model:                140
    Thread(s) per core:   2
    Core(s) per socket:   4
    Socket(s):            1
    Stepping:             2
    CPU(s) scaling MHz:   52%
    CPU max MHz:          4500.0000
    CPU min MHz:          400.0000

It also gobbled up all my available ram - 5gb - while building, nearly grinding my device to a halt.

Seems a bit unreasonable just to build some docs...

python 3.12.5 nox==2024.4.15


I've uploaded the built html files here, in case someone else want to browse them offline:

https://g33k.holbrook.no/8425e9f019d31f5696334c5694c084e7de27d0050698fd3f2607839e78c84146

ansible-documentation-bot[bot] commented 2 months ago

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.

samccann commented 2 months ago

Hi @nolash ! So you are correct, building the full Ansible package documentation is a major resource hog. It basically communicates to Ansible Galaxy for every collection in the package.

Can you explain what your trying to do? If for example, you want to make a docs change and test that locally, you could try make coredocs instead. Also, for every PR, the CI here will build a test docsite for you, so you could use that option as well.

gotmax23 commented 2 months ago

Yeah, sphinx is a memory hog, especially when parallelization is enabled and the size/complexity of our docs that @samccann mentioned. You can try exporting CPUS=1 — or another number that's lower than the default in the Makefile, i.e., the total number of threads your CPU has — before calling nox to reduce the amount of memory used. nox -e make defaults to building the minimal coredocs, but even these can use a fair amount of resources to build.