slateci / slate-catalog

SLATE application catalog based on Helm
12 stars 21 forks source link

Cache memory is now aware of the CPUs requested #570

Closed LincolnBryant closed 2 years ago

LincolnBryant commented 2 years ago

The cache memory spec will now consider how many CPUs were requested and divide accordingly. Squid passes the cache_mem memory value to each child process it manages in multi-core mode.

For some reason this has to happen in two places. Need to investigate if this is redundant or not.

LincolnBryant commented 2 years ago

I tested this with some values that don't cleanly divide. Helm's div function does integer division so it works out okay. E.g.:

CPU: 3
CacheMemory: 4096

yields:

cache_mem 1365 MB

and

        - name: SQUID_CACHE_MEM
          value: '1365 MB'