[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Cloud Profiler overview\n=======================\n\nUnderstanding the performance of production systems is notoriously difficult.\nAttempting to measure performance in test environments usually fails to\nreplicate the pressures on a production system. Microbenchmarking parts\nof your application is sometimes feasible, but it also typically fails to\nreplicate the workload and behavior of a production system.\n\nContinuous profiling of production systems is an effective way to discover\nwhere resources like CPU cycles and memory are consumed as a service operates\nin its working environment. But profiling adds an additional load on the\nproduction system: in order to be an acceptable way to discover patterns\nof resource consumption, the additional load of profiling must be small.\n\nCloud Profiler is a statistical, low-overhead profiler that\ncontinuously gathers CPU usage and memory-allocation information from your\nproduction applications. It attributes that information to the source code\nthat generated it, helping you identify the parts of your application that are\nconsuming the most resources, and otherwise illuminating your applications\nperformance characteristics.\n\nTypes of profiling available\n----------------------------\n\nCloud Profiler supports different types of profiling based on\nthe language in which a program is written. The following table summarizes\nthe supported profile types by language:\n\nFor complete information on the language requirements and any restrictions,\nsee the language's how-to page.\nFor more information about these profile types, see\n[Profiling concepts](/profiler/docs/concepts-profiling).\n\nSupported configurations\n------------------------\n\nWhen you instrument your application to capture profile data, you include a\nlanguage-specific\n[profiling agent](/profiler/docs/about-profiler#profiling_agent).\nThe following table summarizes the supported environments:\n\n\u003cbr /\u003e\n\nThe following table summarizes the supported operating systems:\n\n\u003cbr /\u003e\n\nPerformance impact\n------------------\n\nCloud Profiler creates a single **profile** by collecting profiling data,\nusually for 10 seconds, every 1 minute for a single instance of the configured\nservice in a single Compute Engine zone. If, for example, your\nGKE\nservice runs 10 replicas of a pod, then, in a 10-minute period,\nroughly 10 profiles are created, and each pod is profiled\napproximately once. The profiling period is randomized, so there is\nvariation. See [Profile collection](/profiler/docs/concepts-profiling#collection) for more information.\n\nThe overhead of the CPU and heap allocation profiling at the time of the\ndata collection is less than 5 percent. Amortized over the execution time\nand across multiple replicas of a service, the overhead is commonly less\nthan 0.5 percent, making it an affordable option for always-on profiling\nin production systems.\n\nComponents\n----------\n\nCloud Profiler consists of the profiling agent, which collects\nthe data, and a console interface on Google Cloud, which lets you\nview and analyze the data collected by the agent.\n\n### Profiling agent\n\nYou install the agent on the virtual machines where your application\nruns. The agent typically comes as a library that you attach to your\napplication when you run it. The agent collects profiling data as the app runs.\nFor information on running the Cloud Profiler agent, see:\n\n- [Profiling Go applications](/profiler/docs/profiling-go)\n- [Profiling Java applications](/profiler/docs/profiling-java)\n- [Profiling Node.js applications](/profiler/docs/profiling-nodejs)\n- [Profiling Python applications](/profiler/docs/profiling-python)\n- [Profiling applications running outside Google Cloud](/profiler/docs/profiling-external)\n\n### Profiler interface\n\nAfter the agent has collected some profiling data, you can use the\nProfiler interface to see how the statistics for CPU and memory\nusage correlate with areas of your application.\n\nThe profile data is retained for 30 days, so you\ncan analyze performance data for periods up to the last\n30 days. Profiles can be downloaded for long-term\nstorage.\n\nQuotas and limits\n-----------------\n\nFor information on viewing and managing your Profiler quotas,\nsee [Quotas and limits](/profiler/quotas).\n\nData security\n-------------\n\nCloud Profiler is a VPC Service Controls supported service. For more\ninformation, see\n[VPC Service Controls documentation](/vpc-service-controls/docs)."]]