Skip to content

Commit 6e371ec

Browse files
authored
Switch to using gcsfuse profile feature in aiml gcs-bucket mounts in slurm cluster blueprints (GoogleCloudPlatform#5047)
2 parents 3786b16 + 8f5b45a commit 6e371ec

3 files changed

Lines changed: 84 additions & 117 deletions

File tree

examples/machine-learning/a3-ultragpu-8g/a3ultra-slurm-blueprint.yaml

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -362,44 +362,39 @@ deployment_groups:
362362
# (Optional) The following creates a GCS bucket that will be mounted
363363
# using gcsfuse. If you prefer to use a pre-existing bucket, use the
364364
# modules/file-system/pre-existing-network-storage module.
365+
# For more information on these flags, see
366+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
365367
- id: gcs_bucket
366368
source: modules/file-system/cloud-storage-bucket
367369
settings:
368370
enable_hierarchical_namespace: true
369371
local_mount: /gcs
370372
random_suffix: true
371-
mount_options: "implicit-dirs,\
372-
metadata-cache-negative-ttl-secs=0,\
373-
metadata-cache-ttl-secs=-1,\
374-
stat-cache-max-size-mb=-1,\
375-
type-cache-max-size-mb=-1,\
376-
enable-streaming-writes=true,\
377-
dir-mode=777,\
378-
file-mode=777,\
373+
mount_options: "implicit_dirs,\
374+
metadata_cache_negative_ttl_secs=0,\
375+
metadata_cache_ttl_secs=-1,\
376+
stat_cache_max_size_mb=-1,\
377+
type_cache_max_size_mb=-1,\
378+
dir_mode=777,\
379+
file_mode=777,\
379380
allow_other"
380381

381382
# (Optional) Create a mount-point optimized for checkpoint writing/reading Uses
382383
# local-ssd for and enables parallel downloads. For more information on
383384
# these flags, see
384385
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
386+
# and
387+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
385388
- id: gcs_checkpoints
386389
source: modules/file-system/pre-existing-network-storage
387390
settings:
388391
remote_mount: $(gcs_bucket.gcs_bucket_name)
389392
local_mount: /gcs-checkpoints
390393
fs_type: gcsfuse
391-
mount_options: "implicit-dirs,\
392-
metadata-cache-negative-ttl-secs=0,\
393-
metadata-cache-ttl-secs=-1,\
394-
stat-cache-max-size-mb=-1,\
395-
type-cache-max-size-mb=-1,\
396-
file-cache-max-size-mb=-1,\
397-
file-cache-cache-file-for-range-read=true,\
398-
file-cache-enable-parallel-downloads=true,\
399-
cache-dir=/mnt/localssd,\
400-
enable-streaming-writes=true,\
401-
dir-mode=777,\
402-
file-mode=777,\
394+
mount_options: "profile=aiml-checkpointing,\
395+
cache_dir=/mnt/localssd,\
396+
dir_mode=777,\
397+
file_mode=777,\
403398
allow_other"
404399

405400
# (Optional) Create a mount-point optimized for reading training data.
@@ -411,42 +406,36 @@ deployment_groups:
411406
# file-cache-max-size-mb=<DATASET_SIZE>,\
412407
# file-cache-cache-file-for-range-read=true,\
413408
# to the mount_options.
409+
# For more information on these flags, see
410+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
411+
# and
412+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
414413
- id: gcs_training_data
415414
source: modules/file-system/pre-existing-network-storage
416415
settings:
417416
remote_mount: $(gcs_bucket.gcs_bucket_name)
418417
local_mount: /gcs-training-data
419418
fs_type: gcsfuse
420-
mount_options: "implicit-dirs,\
421-
metadata-cache-negative-ttl-secs=0,\
422-
metadata-cache-ttl-secs=-1,\
423-
stat-cache-max-size-mb=-1,\
424-
type-cache-max-size-mb=-1,\
425-
enable-streaming-writes=true,\
426-
dir-mode=777,\
427-
file-mode=777,\
419+
mount_options: "profile=aiml-training,\
420+
dir_mode=777,\
421+
file_mode=777,\
428422
allow_other"
429423

430424
# (Optional) Create a mount-point optimized for model serving.
431425
# For more information on these flags, see
432426
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
427+
# and
428+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
433429
- id: gcs_model_serving
434430
source: modules/file-system/pre-existing-network-storage
435431
settings:
436432
remote_mount: $(gcs_bucket.gcs_bucket_name)
437433
local_mount: /gcs-model-serving
438434
fs_type: gcsfuse
439-
mount_options: "implicit-dirs,\
440-
cache-dir=/mnt/localssd,\
441-
metadata-cache-negative-ttl-secs=0,\
442-
metadata-cache-ttl-secs=-1,\
443-
stat-cache-max-size-mb=-1,\
444-
type-cache-max-size-mb=-1,\
445-
file-cache-max-size-mb=-1,\
446-
file-cache-cache-file-for-range-read=true,\
447-
file-cache-enable-parallel-downloads=true,\
448-
dir-mode=777,\
449-
file-mode=777,\
435+
mount_options: "profile=aiml-serving,\
436+
cache_dir=/mnt/localssd,\
437+
dir_mode=777,\
438+
file_mode=777,\
450439
allow_other"
451440

452441
- group: cluster

examples/machine-learning/a4-highgpu-8g/a4high-slurm-blueprint.yaml

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -367,44 +367,39 @@ deployment_groups:
367367
# (Optional) The following creates a GCS bucket that will be mounted
368368
# using gcsfuse. If you prefer to use a pre-existing bucket, use the
369369
# modules/file-system/pre-existing-network-storage module.
370+
# For more information on these flags, see
371+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
370372
- id: gcs_bucket
371373
source: modules/file-system/cloud-storage-bucket
372374
settings:
373375
enable_hierarchical_namespace: true
374376
local_mount: /gcs
375377
random_suffix: true
376-
mount_options: "implicit-dirs,\
377-
metadata-cache-negative-ttl-secs=0,\
378-
metadata-cache-ttl-secs=-1,\
379-
stat-cache-max-size-mb=-1,\
380-
type-cache-max-size-mb=-1,\
381-
enable-streaming-writes=true,\
382-
dir-mode=777,\
383-
file-mode=777,\
378+
mount_options: "implicit_dirs,\
379+
metadata_cache_negative_ttl_secs=0,\
380+
metadata_cache_ttl_secs=-1,\
381+
stat_cache_max_size_mb=-1,\
382+
type_cache_max_size_mb=-1,\
383+
dir_mode=777,\
384+
file_mode=777,\
384385
allow_other"
385386

386387
# (Optional) Create a mount-point optimized for checkpoint writing/reading Uses
387388
# local-ssd for and enables parallel downloads. For more information on
388389
# these flags, see
389390
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
391+
# and
392+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
390393
- id: gcs_checkpoints
391394
source: modules/file-system/pre-existing-network-storage
392395
settings:
393396
remote_mount: $(gcs_bucket.gcs_bucket_name)
394397
local_mount: /gcs-checkpoints
395398
fs_type: gcsfuse
396-
mount_options: "implicit-dirs,\
397-
metadata-cache-negative-ttl-secs=0,\
398-
metadata-cache-ttl-secs=-1,\
399-
stat-cache-max-size-mb=-1,\
400-
type-cache-max-size-mb=-1,\
401-
file-cache-max-size-mb=-1,\
402-
file-cache-cache-file-for-range-read=true,\
403-
file-cache-enable-parallel-downloads=true,\
404-
cache-dir=/mnt/localssd,\
405-
enable-streaming-writes=true,\
406-
dir-mode=777,\
407-
file-mode=777,\
399+
mount_options: "profile=aiml-checkpointing,\
400+
cache_dir=/mnt/localssd,\
401+
dir_mode=777,\
402+
file_mode=777,\
408403
allow_other"
409404

410405
# (Optional) Create a mount-point optimized for reading training data.
@@ -416,42 +411,36 @@ deployment_groups:
416411
# file-cache-max-size-mb=<DATASET_SIZE>,\
417412
# file-cache-cache-file-for-range-read=true,\
418413
# to the mount_options.
414+
# For more information on these flags, see
415+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
416+
# and
417+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
419418
- id: gcs_training_data
420419
source: modules/file-system/pre-existing-network-storage
421420
settings:
422421
remote_mount: $(gcs_bucket.gcs_bucket_name)
423422
local_mount: /gcs-training-data
424423
fs_type: gcsfuse
425-
mount_options: "implicit-dirs,\
426-
metadata-cache-negative-ttl-secs=0,\
427-
metadata-cache-ttl-secs=-1,\
428-
stat-cache-max-size-mb=-1,\
429-
type-cache-max-size-mb=-1,\
430-
enable-streaming-writes=true,\
431-
dir-mode=777,\
432-
file-mode=777,\
424+
mount_options: "profile=aiml-training,\
425+
dir_mode=777,\
426+
file_mode=777,\
433427
allow_other"
434428

435429
# (Optional) Create a mount-point optimized for model serving.
436430
# For more information on these flags, see
437431
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
432+
# and
433+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
438434
- id: gcs_model_serving
439435
source: modules/file-system/pre-existing-network-storage
440436
settings:
441437
remote_mount: $(gcs_bucket.gcs_bucket_name)
442438
local_mount: /gcs-model-serving
443439
fs_type: gcsfuse
444-
mount_options: "implicit-dirs,\
445-
cache-dir=/mnt/localssd,\
446-
metadata-cache-negative-ttl-secs=0,\
447-
metadata-cache-ttl-secs=-1,\
448-
stat-cache-max-size-mb=-1,\
449-
type-cache-max-size-mb=-1,\
450-
file-cache-max-size-mb=-1,\
451-
file-cache-cache-file-for-range-read=true,\
452-
file-cache-enable-parallel-downloads=true,\
453-
dir-mode=777,\
454-
file-mode=777,\
440+
mount_options: "profile=aiml-serving,\
441+
cache_dir=/mnt/localssd,\
442+
dir_mode=777,\
443+
file_mode=777,\
455444
allow_other"
456445

457446
- group: cluster

examples/machine-learning/a4x-highgpu-4g/a4xhigh-slurm-blueprint.yaml

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -375,44 +375,39 @@ deployment_groups:
375375
# (Optional) The following creates a GCS bucket that will be mounted
376376
# using gcsfuse. If you prefer to use a pre-existing bucket, use the
377377
# modules/file-system/pre-existing-network-storage module.
378+
# For more information on these flags, see
379+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
378380
- id: gcs_bucket
379381
source: modules/file-system/cloud-storage-bucket
380382
settings:
381383
enable_hierarchical_namespace: true
382384
local_mount: /gcs
383385
random_suffix: true
384-
mount_options: "implicit-dirs,\
385-
metadata-cache-negative-ttl-secs=0,\
386-
metadata-cache-ttl-secs=-1,\
387-
stat-cache-max-size-mb=-1,\
388-
type-cache-max-size-mb=-1,\
389-
enable-streaming-writes=true,\
390-
dir-mode=777,\
391-
file-mode=777,\
386+
mount_options: "implicit_dirs,\
387+
metadata_cache_negative_ttl_secs=0,\
388+
metadata_cache_ttl_secs=-1,\
389+
stat_cache_max_size_mb=-1,\
390+
type_cache_max_size_mb=-1,\
391+
dir_mode=777,\
392+
file_mode=777,\
392393
allow_other"
393394

394395
# (Optional) Create a mount-point optimized for checkpoint writing/reading Uses
395396
# local-ssd for and enables parallel downloads. For more information on
396397
# these flags, see
397398
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
399+
# and
400+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
398401
- id: gcs_checkpoints
399402
source: modules/file-system/pre-existing-network-storage
400403
settings:
401404
remote_mount: $(gcs_bucket.gcs_bucket_name)
402405
local_mount: /gcs-checkpoints
403406
fs_type: gcsfuse
404-
mount_options: "implicit-dirs,\
405-
metadata-cache-negative-ttl-secs=0,\
406-
metadata-cache-ttl-secs=-1,\
407-
stat-cache-max-size-mb=-1,\
408-
type-cache-max-size-mb=-1,\
409-
file-cache-max-size-mb=-1,\
410-
file-cache-cache-file-for-range-read=true,\
411-
file-cache-enable-parallel-downloads=true,\
412-
cache-dir=/mnt/localssd,\
413-
enable-streaming-writes=true,\
414-
dir-mode=777,\
415-
file-mode=777,\
407+
mount_options: "profile=aiml-checkpointing,\
408+
cache_dir=/mnt/localssd,\
409+
dir_mode=777,\
410+
file_mode=777,\
416411
allow_other"
417412

418413
# (Optional) Create a mount-point optimized for reading training data.
@@ -424,42 +419,36 @@ deployment_groups:
424419
# file-cache-max-size-mb=<DATASET_SIZE>,\
425420
# file-cache-cache-file-for-range-read=true,\
426421
# to the mount_options.
422+
# For more information on these flags, see
423+
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
424+
# and
425+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
427426
- id: gcs_training_data
428427
source: modules/file-system/pre-existing-network-storage
429428
settings:
430429
remote_mount: $(gcs_bucket.gcs_bucket_name)
431430
local_mount: /gcs-training-data
432431
fs_type: gcsfuse
433-
mount_options: "implicit-dirs,\
434-
metadata-cache-negative-ttl-secs=0,\
435-
metadata-cache-ttl-secs=-1,\
436-
stat-cache-max-size-mb=-1,\
437-
type-cache-max-size-mb=-1,\
438-
enable-streaming-writes=true,\
439-
dir-mode=777,\
440-
file-mode=777,\
432+
mount_options: "profile=aiml-training,\
433+
dir_mode=777,\
434+
file_mode=777,\
441435
allow_other"
442436

443437
# (Optional) Create a mount-point optimized for model serving.
444438
# For more information on these flags, see
445439
# https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/samples/gcsfuse_config
440+
# and
441+
# https://docs.cloud.google.com/storage/docs/cloud-storage-fuse/profile-based-configurations
446442
- id: gcs_model_serving
447443
source: modules/file-system/pre-existing-network-storage
448444
settings:
449445
remote_mount: $(gcs_bucket.gcs_bucket_name)
450446
local_mount: /gcs-model-serving
451447
fs_type: gcsfuse
452-
mount_options: "implicit-dirs,\
453-
cache-dir=/mnt/localssd,\
454-
metadata-cache-negative-ttl-secs=0,\
455-
metadata-cache-ttl-secs=-1,\
456-
stat-cache-max-size-mb=-1,\
457-
type-cache-max-size-mb=-1,\
458-
file-cache-max-size-mb=-1,\
459-
file-cache-cache-file-for-range-read=true,\
460-
file-cache-enable-parallel-downloads=true,\
461-
dir-mode=777,\
462-
file-mode=777,\
448+
mount_options: "profile=aiml-serving,\
449+
cache_dir=/mnt/localssd,\
450+
dir_mode=777,\
451+
file_mode=777,\
463452
allow_other"
464453

465454

0 commit comments

Comments
 (0)