guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43540] [PATCH] Instantiate nscd in each system container instead of


From: Jason Conroy
Subject: [bug#43540] [PATCH] Instantiate nscd in each system container instead of using the container host's service.
Date: Sun, 27 Sep 2020 13:44:32 -0400

Hi Mathieu, thanks for the feedback. Please find the revised patch and log attached.

Cheers,

Jason


On Thu, Sep 24, 2020 at 4:01 AM Mathieu Othacehe <othacehe@gnu.org> wrote:

Hello Jason,

Thanks for this patch. You need to write a commit message that is
compliant with the ChangeLog format, see:
https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html.

> +(define %nscd-container-caches
> +  ;; Similar to %nscd-default-caches but with smaller cache sizes. This allows
> +  ;; many containers to coexist on the same machine without exhausting RAM.
> +  (list (nscd-cache (database 'hosts)
> +                    (positive-time-to-live (* 3600 12))
> +                    (negative-time-to-live 20)
> +                    (persistent? #t)
> +                    (max-database-size (expt 2 18)))
> +        (nscd-cache (database 'services)
> +                    (positive-time-to-live (* 3600 24))
> +                    (negative-time-to-live 3600)
> +                    (check-files? #t)   ;check /etc/services changes
> +                    (persistent? #t)
> +                    (max-database-size (expt 2 18)))))

You can write something like:

--8<---------------cut here---------------start------------->8---
(map (lambda (cache)
       (nscd-cache
        (inherit cache)
        (max-database-size (expt 2 18)))) ;256KiB
     %nscd-default-caches)
--8<---------------cut here---------------end--------------->8---

to avoid repeating the same values.

Otherwise, looks nice. Could you please send an updated version?

Thanks,

Mathieu
--
https://othacehe.org

Attachment: one-nscd-per-container-v2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]