aibangjuxin / groovy

study groovy
1 stars 0 forks source link

GKE DISK TMP #91

Open aibangjuxin opened 7 months ago

aibangjuxin commented 7 months ago

Question on GKE . Use need to land some file in temp local storage to do the process. They could land the file in /tmp directory . Correct ? We should have couple mb space . Correct ?

在 GKE(Google Kubernetes Engine)中,您可以将文件存储在 /tmp 目录中。这个目录通常用于存储临时文件,因为它位于容器文件系统中,不会被挂载为卷[2]。然而,您需要注意的是,/tmp 目录中的文件可能会在容器重启时丢失[5]。对于几兆字节的空间需求,/tmp 目录应该足够使用。但是,如果您需要持久化存储或更大的存储空间,建议使用 GKE 提供的其他存储选项,例如 PersistentVolumeClaim 或 Local SSD[3]。

Sources [1] Quickstart: Deploy an app to a GKE cluster | Google Kubernetes Engine (GKE) https://cloud.google.com/kubernetes-engine/docs/deploy-app-cluster [2] Troubleshooting storage in GKE | Google Kubernetes Engine (GKE) https://cloud.google.com/kubernetes-engine/docs/troubleshooting/troubleshooting-gke-storage [3] Provision and use Local SSD-backed ephemeral storage | Google Kubernetes Engine (GKE) https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd [4] Harden your cluster's security | Google Kubernetes Engine (GKE) https://cloud.google.com/kubernetes-engine/docs/how-to/hardening-your-cluster [5] Where to store files in GKE container? - kubernetes - Stack Overflow https://stackoverflow.com/questions/57244565/where-to-store-files-in-gke-container [6] About Local SSD for GKE | Google Kubernetes Engine (GKE) https://cloud.google.com/kubernetes-engine/docs/concepts/local-ssd [7] Process on GKE finishes and restarts by itself - Stack Overflow https://stackoverflow.com/questions/68626224/process-on-gke-finishes-and-restarts-by-itself [8] Temp directory in Cloud Run : r/googlecloud - Reddit https://www.reddit.com/r/googlecloud/comments/y33kh5/temp_directory_in_cloud_run/ [9] Recommended disk size for GKE nodes? - kubernetes - Server Fault https://serverfault.com/questions/977871/recommended-disk-size-for-gke-nodes [10] Securing Your GKE Deployments with Binary Authorization - Google Codelabs https://codelabs.developers.google.com/codelabs/cloud-binauthz-intro [11] tmp directory getting too large - Google Cloud Community https://www.googlecloudcommunity.com/gc/Technical-Tips-Tricks/tmp-directory-getting-too-large/td-p/584655?postid=47532 [12] Use SSD or local SSD in GKE cluster - kubernetes - Stack Overflow https://stackoverflow.com/questions/48153778/use-ssd-or-local-ssd-in-gke-cluster [13] Getting started with Google Kubernetes Engine (GKE) - Rafay https://rafay.co/the-kubernetes-current/getting-started-with-google-kubernetes-engine-gke-0/ [14] Saving files in /tmp/ in Cloud Composer - Google Groups https://groups.google.com/g/cloud-composer-discuss/c/MM4L0ngg2BQ [15] Managing local storage with "--local-ssd-count" when creating Kubernetes cluster https://groups.google.com/g/gce-discussion/c/8yF8qTfKy3E [16] Deploy on Google Kubernetes Engine (GKE) using YAML (local disk) | YugabyteDB Docs https://docs.yugabyte.com/preview/deploy/kubernetes/single-zone/gke/statefulset-yaml-local-ssd/ [17] How does the tmp folder work? It stores lots of junk files and takes space - Drupal Answers https://drupal.stackexchange.com/questions/65341/how-does-the-tmp-folder-work-it-stores-lots-of-junk-files-and-takes-space [18] Local SSD for High-Performance Storage on Google Kubernetes Engine https://www.storagenewsletter.com/2023/03/10/local-ssd-for-high-performance-storage-on-google-kubernetes-engine/ [19] How to deploy on GKE with Cloud Shell Editor - YouTube https://youtube.com/watch?v=gK2Voiuqyho [20] Google Cloud Storage vs Persistent Disks vs Local SSD vs Cloud Filestore - Tutorials Dojo https://tutorialsdojo.com/google-cloud-storage-vs-persistent-disks-vs-local-ssd-vs-cloud-filestore/ [21] Storage best practices for data analytics, GKE, and critical applications - YouTube https://youtube.com/watch?v=jl-2-wLW20Q

By Perplexity at https://www.perplexity.ai/search/7c2d8299-7587-4fae-894a-58c71baa046c

临时目录的空间大小主要与以下因素有关:

  1. 硬盘空间:临时目录通常位于硬盘上,因此其大小受到硬盘总空间的限制。

  2. 操作系统和文件系统:不同的操作系统和文件系统可能对目录大小有不同的限制。

  3. 系统策略和配置:系统管理员可能会设置临时目录的大小限制,以防止其占用过多硬盘空间。

  4. 应用程序需求:某些应用程序可能会在临时目录中创建大量文件或大文件,这也会影响临时目录的空间大小。

在云计算环境中,临时目录的空间大小可能还与所选的云服务类型和配置有关。例如,在使用Google Cloud TPU进行模型推断时,模型的大小和批处理大小可能会影响临时目录的空间需求[1][2]。

Sources [1] Cloud TPU v5e 推断转换器简介 https://cloud.google.com/tpu/docs/v5e-inference-converter?hl=zh-cn [2] TensorFlow - TPU 问题排查 - Google Cloud https://cloud.google.com/tpu/docs/troubleshooting/trouble-tf?hl=zh-cn [3] k8s架构及服务详解- 姚红 - 博客园 https://www.cnblogs.com/yaohong/p/11361784.html [4] [PDF] NetBackup™ Snapshot Manager 安装和升级指南 https://sort.veritas.com/DocPortal/pdf/141377490-158461487-1 [5] Kubernetes · Issue #64 · WangShuXian6/blog - GitHub https://github.com/WangShuXian6/blog/issues/64 [6] Kubernetes学习笔记 - 绿色记忆 https://blog.gmem.cc/kubernetes-study-note [7] Kubernetes学习(一)之认识Kubernetes - 一只病猫 https://dinghuang.github.io/2019/01/12/Kubernetes%E5%AD%A6%E4%B9%A0%EF%BC%88%E4%B8%80%EF%BC%89%E4%B9%8B%E8%AE%A4%E8%AF%86Kubernetes/ [8] 操作Red Hat Advanced Cluster Security for Kubernetes 4.2 https://access.redhat.com/documentation/zh-cn/red_hat_advanced_cluster_security_for_kubernetes/4.2/html-single/operating/index

By Perplexity at https://www.perplexity.ai/search/7c2d8299-7587-4fae-894a-58c71baa046c