Skip to content

Commit 9a16b57

Browse files
authored
Merge pull request 2i2c-org#3569 from yuvipanda/cryptnono-bump
Bring in newer cryptnono version
2 parents d23f71e + 5595b13 commit 9a16b57

File tree

2 files changed

+36
-20
lines changed

2 files changed

+36
-20
lines changed

helm-charts/support/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ dependencies:
4242
# cryptnono, counters crypto mining
4343
# Source code: https://github.com/yuvipanda/cryptnono/
4444
- name: cryptnono
45-
version: "0.0.1-0.dev.git.27.h01b4f25"
45+
version: "0.3.1-0.dev.git.107.heb504bc"
4646
repository: https://yuvipanda.github.io/cryptnono/
4747
condition: cryptnono.enabled

helm-charts/support/values.yaml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -396,30 +396,46 @@ cryptnono:
396396
# resources for cryptnono was set after inspecting cpu and memory use via
397397
# prometheus and grafana.
398398
#
399-
# cryptnono has an init container (kubectl-trace-init) and another container
400-
# (trace). The init container has been found using up to 1.6Gi and up to about
401-
# 600m for 4 minutes. The main container has been found using up to 150Mi but
402-
# typically below 100Mi, and miniscule amounts of CPU (0-3m).
399+
# cryptnono has an init container (fetch-kernel-headers) and one container per
400+
# detector. We currently only use one detector (monero).
401+
#
402+
# In the past, the init container init container has been found using up to 1.6Gi and up to about
403+
# 600m for 4 minutes. However, recent changes seem to have made this much faster,
404+
# and there's no record of the initcontainer because our prometheus scrape interval
405+
# is 1minute, and the init container seems to complete by then. We retain the older
406+
# measured metrics until we can make new measurements.
403407
#
404408
# Since cryptnono is a non-critical service, we are at the moment allowing it
405409
# to be evicted during node memory pressure by providing a low memory request
406410
# compared to the limit. We are also not requesting significant amounts of CPU
407411
# so that it doesn't compete well with others initially.
408-
#
409-
# Note that as of now 2023-03-31 (8367fa5 in yuvipanda/cryptnono), the
410-
# resources configuration configure both containers.
411-
#
412-
# PromQL queries for CPU and memory use:
413-
# - CPU: sum(rate(container_cpu_usage_seconds_total{container="kube-trace-init", namespace="support"}[5m])) by (pod)
414-
# - Memory: sum(container_memory_usage_bytes{container="kube-trace-init", namespace="support"}) by (pod)
415-
#
416-
resources:
417-
limits:
418-
cpu: 800m
419-
memory: 2Gi
420-
requests:
421-
cpu: 5m
422-
memory: 100Mi
412+
fetchKernelHeaders:
413+
resources:
414+
limits:
415+
cpu: 800m
416+
memory: 2Gi
417+
requests:
418+
cpu: 5m
419+
memory: 100Mi
420+
421+
detectors:
422+
# Disable the execwhacker detector for now, as it matures by being deployed on mybinder.org
423+
execwhacker:
424+
enabled: false
425+
monero:
426+
enabled: true
427+
resources:
428+
# Measured with the following prometheus queries:
429+
# Memory: sum(container_memory_usage_bytes{container="monero", namespace="support"}) by (instance)
430+
# CPU: sum(rate(container_cpu_usage_seconds_total{container="trace", namespace="support"}[5m])) by (instance)
431+
# Seems to hover mostly around the 60Mi mark for memory, and generally less than 0.0002 in CPU. But
432+
# 1m (or 0.001) is the lowest that can be specified in kubernetes, so we use that.
433+
limits:
434+
memory: 128Mi
435+
cpu: 5m
436+
requests:
437+
memory: 64Mi
438+
cpu: 1m
423439

424440
# Configuration of templates provided directly by this chart
425441
# -------------------------------------------------------------------------------

0 commit comments

Comments
 (0)