인스턴스에 데이터 캐시를 사용 설정하면 Cloud SQL이 읽기 및 쓰기 요청을 다음과 같이 처리합니다.
읽기 요청: Cloud SQL은 데이터 읽기 우선순위를 기본 메모리, 데이터 캐시, 인스턴스의 스토리지 순으로 지정합니다.
따라서 읽기 작업을 처리할 때 지연 시간이 최소화됩니다.
쓰기 요청: Cloud SQL에서 데이터를 인스턴스의 스토리지에 커밋하는 동시에 데이터 캐시에 씁니다.
추천
데이터 캐시는 특정 워크로드 유형에서 성능 이점을 제공합니다.
다음 워크로드 유형에는 데이터 캐시를 사용 설정하는 것이 좋습니다.
워크로드의 작업 데이터 세트가 기본 메모리에서 넘치는 경우.
전체 작업 데이터 세트가 인스턴스의 기본 메모리에서 넘칠 때 데이터 캐시를 사용하면 성능 이점을 최대화할 수 있습니다.
이 시나리오에서 Cloud SQL는 기본 메모리 및 데이터 캐시에 작업 데이터 세트를 저장합니다.
작업 데이터 세트는 일반적으로 전체 데이터 세트보다 작습니다.
워크로드의 vCPU가 16개 이상인 경우.
일반적으로 vCPU가 16개 이상인 워크로드에서 데이터 캐시를 사용하면 성능 이점이 더 커집니다.
워크로드에서 쓰기 작업보다 읽기 작업이 더 많은 경우.
주로 읽기 작업으로 구성된 워크로드에 데이터 캐시를 사용하세요.
제한사항
데이터 캐시가 가득 차면 후속 업데이트가 데이터 캐시에 수용될 수 있도록 최근 사용 시간 분석을 기준으로 저장된 데이터가 삭제됩니다.
사용자 또는 시스템에서 트리거된 종료 또는 재시작이 수행될 때 데이터 캐시의 콘텐츠가 재시작 시 제공됩니다. 하지만 기본 인스턴스에서 유지보수를 수행하거나 장애 조치 작업에서와 같은 예기치 않은 종료가 발생할 경우에는 데이터 캐시 콘텐츠가 손실됩니다.
이 경우 데이터 캐시가 다시 채워지는 동안 성능 저하로 이어질 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-13(UTC)"],[],[],null,["# Data cache overview\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/data-cache \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/data-cache \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\n\n| **Note:** This page contains features related to Cloud SQL editions. For more information about Cloud SQL editions, see [Introduction to Cloud SQL editions](/sql/docs/mysql/editions-intro).\n\n\u003cbr /\u003e\n\nThis page provides an overview of data cache, our recommendations on choosing workloads on which to enable data cache,\nand the limitations of using a data cache.\n\nData cache is an optional feature that stores data pages on high-speed local solid state drives (SSD) to accelerate query processing. Data cache extends the MySQL buffer pool to use both the memory and the local SSD.\n\nYou can enable data cache when you [create an instance](/sql/docs/mysql/create-instance).\n\nYou can also enable or disable data cache on an existing instance with\n[near-zero downtime](/sql/docs/mysql/availability#enterprise-plus-availability).\n\nTo change the data cache setting on your instance,\nsee [edit an instance](/sql/docs/mysql/edit-instance) and\n\n[instance settings](/sql/docs/mysql/instance-settings#data-cache).\n\n\nWhen you enable data cache on your instance, this is how Cloud SQL\nprocesses read and write requests:\n\n- Read request: Cloud SQL prioritizes reading data from the main memory,\n followed by the data cache, and then the instance's storage.\n This allows for the read operations to be processed with the lowest possible latency.\n\n- Write request: Cloud SQL commits the data to the instance's\n storage and simultaneously writes it to the data cache.\n\nRecommendations\n---------------\n\nData cache provides performance benefits for certain workload types.\nWe recommend that you enable data cache for the following workload types:\n\n- Workloads where the working dataset doesn't fit in the main memory. Using a data cache delivers maximum performance benefits when the entire working dataset can't fit in the instance's main memory.\n In this scenario, Cloud SQL stores the working dataset in the main memory and the data cache.\n The working dataset is generally smaller than the full dataset.\n\n- Workloads with 16 or more vCPUs. Using a data cache generally provides more performance benefits for workloads with 16 or more vCPUs.\n\n- Workloads with more read operations than write operations. Use a data cache for workloads that are predominantly made up of read operations.\n\n| **Note:** When you switch an instance from Cloud SQL Enterprise Plus edition to Cloud SQL Enterprise edition, data cache is automatically disabled. Switching an instance to Cloud SQL Enterprise edition incurs some downtime.\n\nLimitations\n-----------\n\n- When a data cache becomes full, it removes the stored data based on the least recently used analysis to accommodate subsequent updates to the data cache.\n\n\u003c!-- --\u003e\n\n- If there's a user- or system-triggered shutdown or restart, then the contents of the data cache are available on restart. However, if the primary instance performs maintenance or encounters an unexpected shutdown, such as in a failover operation, then the contents of the data cache are lost. This can lead to reduced performance while the data cache is repopulated."]]