apiVersion: v1 kind: ConfigMap metadata: name: check-readahead-settings namespace: default data: show-readahead.sh: | #!/bin/bash echo "### $(date) - show-readahead.sh - looking for NFS filemounts on this host" cat /proc/self/mountinfo | grep nfs4 | awk {'print $3, $5'} | uniq | while read bdev vmount do echo "$vmount $bdev /sys/class/bdi/$bdev/read_ahead_kb = "$(cat /sys/class/bdi/$bdev/read_ahead_kb) done --- apiVersion: apps/v1 kind: DaemonSet metadata: name: check-readahead-settings namespace: default spec: selector: matchLabels: name: check-readahead-settings template: metadata: labels: name: check-readahead-settings spec: volumes: - name: config-volume configMap: name: check-readahead-settings - name: host-mount hostPath: path: /tmp containers: - command: - /bin/sh - -c - | #!/bin/sh cp /tmp/show-readahead.sh /host/show-readahead.sh chmod 777 /host/show-readahead.sh while true; do /usr/bin/nsenter -m/proc/1/ns/mnt -- /tmp/show-readahead.sh sleep 30 done image: alpine imagePullPolicy: Always name: check-readahead-settings volumeMounts: - name: config-volume mountPath: /tmp - name: host-mount mountPath: /host resources: limits: memory: 200Mi requests: cpu: 100m memory: 200Mi securityContext: privileged: true stdin: true stdinOnce: true terminationMessagePath: /dev/termination-log terminationMessagePolicy: File tty: true nodeSelector: kubernetes.io/os: linux kubernetes.azure.com/mode: user tolerations: - key: workload.sas.com/class operator: Equal value: compute effect: NoSchedule - key: workload.sas.com/class operator: Equal value: connect effect: NoSchedule - key: workload.sas.com/class operator: Equal value: cas effect: NoSchedule priorityClassName: system-node-critical dnsPolicy: ClusterFirst enableServiceLinks: true hostPID: true