| 4 May 2026 |
swarsel | yeah NIX_SHOW_STATS is where i got the number from (totalBytes) - I think the issue is that I am cross-referencing other nodes in nearly each one of them - i am not sure how it affects the whole closure, but could be that each microvm in essence then has to eval itself + all other nodes? | 13:09:36 |
swarsel | * yeah NIX_SHOW_STATS is where i got the number from (totalBytes) - I think the issue is that I am cross-referencing other nodes in nearly each one of them - i am not sure how it affects the whole closure, but could be that each microvm in essence then has to eval itself + all other nodes? i guess that would scale exponentially. interestingly, when i removed a single microvm, i noticed nearly no difference in the memory usage | 13:10:22 |
phaer | Ah, i was about to write: yes, cross-references between nixos closures should be avoided as much as possible, if you care about memory usage IMO. | 13:10:28 |
swarsel | yeah i will have to do that now, until now that only manifested in eval time taken which i did not care about, but now this needs fixing 😅 | 13:11:21 |
| 5 May 2026 |
swarsel | well i looked into it a little and found that the biggest offender were a fer malformed lines that generated thousands of nftables rules for each wireguard peer - fixing that took it down from >90G to now about 20G. much, better, but still too much for my liking :p
all my cross node evaluations are already done once when filling my globals output - that iterates over all config and aggregates some global definitions. that is a mechanism that i really do not want to get rid of, i think it is super useful. also i thought that this kind of eval would not be very costly since nearly nothing needs to be accessed in the first place.
for my client pc config without any microvms, it takes me 9G - what is the memory usage for a usual nixosConfig for you guys? | 14:05:43 |
swarsel | * well i looked into it a little and found that the biggest offender were a fer malformed lines that generated thousands of nftables rules for each wireguard peer - fixing that took it down from >90G to now about 20G. much, better, but still too much for my liking :p
all my cross node evaluations are already done once when filling my globals output - that iterates over all config and aggregates some global definitions. that is a mechanism that i really do not want to get rid of, i think it is super useful. also i thought that this kind of eval would not be very costly since nearly nothing needs to be accessed in the first place.
for my client pc config without any microvms, it takes me 9G - what is the memory usage for a usual nixosConfig for you people? | 14:07:59 |
swarsel | * well i looked into it a little and found that the biggest offender were a fer malformed lines that generated thousands of nftables rules for each wireguard peer - fixing that took it down from >90G to now about 20G (that surprised me a lot!). much, better, but still too much for my liking :p
all my cross node evaluations are already done once when filling my globals output - that iterates over all config and aggregates some global definitions. that is a mechanism that i really do not want to get rid of, i think it is super useful. also i thought that this kind of eval would not be very costly since nearly nothing needs to be accessed in the first place.
for my client pc config without any microvms, it takes me 9G - what is the memory usage for a usual nixosConfig for you people? | 14:13:31 |
swarsel | * well i looked into it a little and found that the biggest offender were a fer malformed lines that generated thousands of nftables rules for each wireguard peer - fixing that took it down from >90G to now about 20G (that surprised me a lot!). much, better, but still too much for my liking :p
all my cross node evaluations are already done once when filling my globals output - that iterates over all config and aggregates some global definitions. that is a mechanism that i really do not want to get rid of, i think it is super useful. also i thought that this kind of eval would not be very costly since nearly nothing needs to be accessed in the first place. the evaluation of globals by itself (which is around 35 configs I guess) takes around 4G, which seems reasonable?
for my client pc config without any microvms, it takes me 9G - what is the memory usage for a usual nixosConfig for you people? | 14:44:24 |