Skip to content

Commit

Permalink
Support gcsfuse-generic and any machine-type in pods
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Aug 6, 2024
1 parent 8360569 commit ce59323
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ spec:
image: {{ .Values.image }}
resources:
limits:
cpu: "100"
memory: 400Gi
cpu: {{ .Values.resourceLimits.cpu }}
memory: {{ .Values.resourceLimits.memory }}
requests:
cpu: "50"
memory: 300Gi
cpu: {{ .Values.resourceRequests.cpu }}
memory: {{ .Values.resourceRequests.memory }}
env:
- name: RDMAV_FORK_SAFE
value: "1"
Expand Down Expand Up @@ -86,6 +86,10 @@ spec:
++workload.reader.read_threads={{ .Values.dlio.readThreads }} \
++workload.output.folder=/logs/{{ .Values.dlio.numFilesTrain }}-{{ .Values.dlio.recordLength }}-{{ .Values.dlio.batchSize }}/{{ .Values.scenario }}
{{ if eq .Values.scenario "gcsfuse-generic"}}
echo "{{ .Values.gcsfuse.mountOptions }}" > /logs/{{ .Values.dlio.numFilesTrain }}-{{ .Values.dlio.recordLength }}-{{ .Values.dlio.batchSize }}/{{ .Values.scenario }}/gcsfuse_mount_options
{{ end }}
gsutil -m cp -R /logs gs://{{ .Values.bucketName }}/logs/$(date +"%Y-%m-%d-%H-%M")
volumeMounts:
- name: dshm
Expand All @@ -103,6 +107,13 @@ spec:
- name: data-vol
{{- if eq .Values.scenario "local-ssd" }}
emptyDir: {}
{{- else if eq .Values.scenario "gcsfuse-generic" }}
csi:
driver: gcsfuse.csi.storage.gke.io
volumeAttributes:
bucketName: {{ .Values.bucketName }}
gcsfuseLoggingSeverity: "info"
mountOptions: "{{ .Values.gcsfuse.mountOptions }}"
{{- else if eq .Values.scenario "gcsfuse-file-cache" }}
csi:
driver: gcsfuse.csi.storage.gke.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ bucketName: gke-dlio-test-data
scenario: local-ssd
nodeType: n2-standard-96

resourceLimits:
cpu: 0
memory: 0
resourceRequests:
cpu: 0
memory: 0

dlio:
numFilesTrain: 500000
recordLength: 102400
Expand All @@ -34,3 +41,4 @@ gcsfuse:
metadataTypeCacheCapacity: "-1"
fileCacheCapacity: "-1"
fileCacheForRangeRead: "true"
mountOptions: "implicit-dirs"
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
cpu: {{ .Values.resourceLimits.cpu }}
memory: {{ .Values.resourceLimits.memory }}
requests:
cpu: "30"
memory: 300Gi
cpu: {{ .Values.resourceRequests.cpu }}
memory: {{ .Values.resourceRequests.memory }}
command:
- "/bin/sh"
- "-c"
Expand Down Expand Up @@ -110,7 +110,7 @@ spec:
pause_in_seconds=20
block_size={{ .Values.fio.blockSize }}
file_size={{ .Values.fio.fileSize }}
num_of_threads=50
num_of_threads={{ .Values.fio.numThreads }}
workload_dir=/data
# Cleaning the pagecache, dentries and inode cache before the starting the workload.
Expand All @@ -126,6 +126,11 @@ spec:
echo "Run fio tests..."
mkdir -p /data/fio-output/{{ .Values.scenario }}/$read_type
{{ if eq .Values.scenario "gcsfuse-generic" }}
echo "{{ .Values.gcsfuse.mountOptions }}" > /data/fio-output/{{ .Values.scenario }}/$read_type/gcsfuse_mount_options
{{ end }}
for i in $(seq $epoch); do
echo "[Epoch ${i}] start time:" `date +%s`
Expand Down Expand Up @@ -164,6 +169,13 @@ spec:
- name: data-vol
{{- if eq .Values.scenario "local-ssd" }}
emptyDir: {}
{{- else if eq .Values.scenario "gcsfuse-generic" }}
csi:
driver: gcsfuse.csi.storage.gke.io
volumeAttributes:
bucketName: {{ .Values.bucketName }}
# gcsfuseLoggingSeverity: "info"
mountOptions: "{{ .Values.gcsfuse.mountOptions }}"
{{- else if eq .Values.scenario "gcsfuse-file-cache" }}
csi:
driver: gcsfuse.csi.storage.gke.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,23 @@ scenario: local-ssd
nodeType: n2-standard-96

resourceLimits:
cpu: 100
memory: 400Gi
cpu: 0
memory: 0
resourceRequests:
cpu: 0
memory: 0

fio:
readType: read
fileSize: 64K
blockSize: 64K
filesPerThread: "20000"
numThreads: "50"

gcsfuse:
metadataCacheTTLSeconds: "6048000"
metadataStatCacheCapacity: "-1"
metadataTypeCacheCapacity: "-1"
fileCacheCapacity: "-1"
fileCacheForRangeRead: "true"
fileCacheForRangeRead: "true"
mountOptions: "implicit-dirs"

0 comments on commit ce59323

Please sign in to comment.