단계별 작업자 필터링 목록에서 단계를 선택합니다. 진행률 그래프에는 해당 단계에서 감지된 낙오 항목이 표시됩니다. 낙오 항목이 처음 감지된 지점은 막대에서 음영이 어둡습니다.
작업자의 세부정보를 보려면 해당 작업자의 막대 위로 마우스를 가져갑니다.
스테이지 정보 패널의 낙오 항목 세부정보 섹션에는 페이지에 표시된 모든 작업자의 낙오 항목이 다음 정보와 함께 나열됩니다.
낙오 항목이 감지된 시작 시간
낙오 항목을 경험한 작업자
원인(알려진 경우)
일괄 작업의 낙오 항목 문제 해결
Dataflow는 일괄 파이프라인에서 다음과 같은 낙오 항목의 원인을 감지합니다.
핫키. 핫키는 동일한 PCollection의 다른 키보다 훨씬 더 많은 요소를 나타내는 키입니다. 자세한 내용은 이 문서의 핫키로 인한 낙오 항목 문제 해결을 참조하세요.
느린 작업자. 느린 작업자에서 작업 항목은 평소보다 느리게 실행됩니다. 느린 작업자의 처리 속도는 동일 스테이지에서 비슷한 작업을 수행하는 작업자의 처리 속도보다 느린 경우가 많습니다.
CPU 부족, 스래싱, 머신 아키텍처, 중단된 작업자 프로세스 등 여러 요인으로 인해 작업자 속도가 느려질 수 있습니다.
속도가 느려지면 Dataflow가 자동으로 문제 해결을 시도합니다. 자세한 내용은 이 문서에서 느린 작업자로 인한 낙오 항목 자동 해결을 참조하세요.
확인할 수 없는 원인. 원인이 확인되지 않은 낙오 항목의 경우 '느리거나 중단된 작업 문제 해결'에서 느린 일괄 작업의 일반적인 문제 해결 단계를 참조하세요.
핫키로 인한 낙오 항목 문제 해결
다양한 요인으로 인해 낙오 항목이 발생할 수 있지만 일반적인 원인 중 하나는 핫키의 존재입니다. 핫키는 동일한 PCollection에 있는 다른 키보다 훨씬 더 많은 요소를 나타내는 키입니다. 핫키는 Dataflow가 요소를 병렬로 처리하는 기능을 제한하므로 낙오 항목을 만들 수 있습니다.
Dataflow가 핫키로 인해 낙오 항목을 감지하면 낙오 항목 세부정보 패널에 Hot Key가 원인으로 표시됩니다.
기본적으로 Dataflow는 핫키의 키 값을 표시하지 않습니다. 키 값을 표시하려면 작업을 실행할 때 hotKeyLoggingEnabled 파이프라인 옵션을 true로 설정합니다.
이 문제를 해결하려면 데이터가 균등하게 분산되었는지 확인합니다. 키의 값이 불균형하다면 다음 조치 실행을 고려해 보세요.
느린 작업자는 Dataflow에서 일반적이지 않지만 작업 성능에 영향을 줄 수 있습니다. 성능 문제를 방지하기 위해 Dataflow는 느린 작업자가 발견되었을 때 작업자로 인해 낙오 항목이 발생하기 전에 문제를 해결하려고 시도합니다.
자동 해결을 시도할 때는 호스트 유지보수 이벤트를 시뮬레이션합니다.
이 이벤트는 정기적으로 수행되는 Compute Engine 유지보수 메커니즘입니다.
작업자의 호스트 유지보수 정책에 따라 작업자는 라이브 마이그레이션이 수행되거나 다시 시작됩니다. 라이브 마이그레이션이 수행될 때는 워크로드가 중단되지 않습니다.
작업자가 다시 시작된 경우에는 느린 작업자에서 진행 중인 작업이 손실되고 처리가 다시 시작됩니다.
느린 작업자가 감지되고 문제가 성공적으로 해결되면 job-message 로그에 다음 메시지가 표시됩니다.
Slow worker ... detected and automatically remediated ...
느린 작업자가 낙오 항목이 아니면 추가 조치를 수행할 필요가 없습니다.
해결이 실패하면 느린 작업자로 인해 Dataflow 모니터링 인터페이스에 낙오 항목이 표시될 수 있습니다.
유지보수 이벤트 시뮬레이션 요청과 같이 프로젝트에 할당량이 부족하면 자동 해결이 실패할 수 있습니다. 기본 할당량에 대한 자세한 내용은 '리소스 사용 할당량 및 권한 관리'의 리전 측정항목에 대한 API 비율 제한을 참조하세요.
더 높은 할당량 비율을 요청하려면 '할당량 보기 및 관리'의 더 높은 할당량 한도 요청을 참조하세요.
[[["이해하기 쉬움","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-04-21(UTC)"],[[["\u003cp\u003eStragglers are work items in Dataflow batch pipelines that take significantly longer to complete, reduce parallelism, and block new work, potentially causing overall job delays.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console allows users to view stragglers by stage or by worker, helping to identify which stages or workers are experiencing delays.\u003c/p\u003e\n"],["\u003cp\u003eDataflow can detect the causes of stragglers, including hot keys, which are keys with disproportionately more elements than others, and slow workers, where work items run more slowly than usual.\u003c/p\u003e\n"],["\u003cp\u003eDataflow automatically attempts to mitigate slow worker issues by simulating a host maintenance event, potentially live migrating or restarting the affected worker.\u003c/p\u003e\n"],["\u003cp\u003eHot keys can be addressed by rekeying data, utilizing specific combine transforms (Java/Python), or enabling Dataflow Shuffle.\u003c/p\u003e\n"]]],[],null,["*Stragglers* are work items that slow down your Dataflow jobs by\npreventing work from being done in parallel.\n\nFor batch pipelines, a straggler is defined as a work item with the\nfollowing characteristics:\n\n- It takes significantly longer to complete than other work items in the same stage.\n- It reduces parallelism within the stage.\n- It blocks new work from starting.\n\nIn the worst case, a straggler blocks a stage from completion because a small\npercentage of the work is in progress, causing overall delays in a job.\n\nDataflow detects stragglers that occur during batch jobs. If\nDataflow detects a straggler, it also tries to determine the cause\nof the straggler.\n| **Note:** For information about troubleshooting stragglers in streaming jobs, see [Troubleshoot stragglers in streaming jobs](/dataflow/docs/guides/troubleshoot-streaming-stragglers).\n\nView stragglers in the Google Cloud console\n\nAfter you start a Dataflow job, you can use the Google Cloud console\nto view any detected stragglers.\n\nYou can view stragglers either by stage or by worker. Use these views to find\nwhich stages have stragglers, and then pinpoint the workers where stragglers\noccurred within each stage.\n\nView stragglers by stage\n\nTo view stragglers by stage:\n\n1. In the Google Cloud console, go to the Dataflow **Jobs**\n page.\n\n Go to [Jobs](https://console.cloud.google.com/dataflow/jobs)\n2. Click the name of the job.\n\n3. In the job details page, click the **Execution details** tab.\n\n4. In the **Graph view** list, select **Stage progress**. The progress graph\n shows aggregated counts of all stragglers detected within each stage.\n\n5. To see details for a stage, hold the pointer over the bar for a stage. To\n view the workers for the stage, click **View workers** in the details panel.\n\nView stragglers by worker\n\nTo view stragglers by worker:\n\n1. In the Google Cloud console, go to the Dataflow **Jobs**\n page.\n\n Go to [Jobs](https://console.cloud.google.com/dataflow/jobs)\n2. Click the name of the job.\n\n3. In the job details page, click the **Execution details** tab.\n\n4. In the **Graph view** list, select **Worker progress**.\n\n5. In the **Filter workers by stage** list, select the stage. The progress graph\n shows any stragglers detected for that stage. The bar has darker shading at\n the point where the straggler was first detected.\n\n6. To see details for a worker, hold the pointer over the bar for that worker.\n\nIn the **Stage info** panel, the **Straggler details** section lists the\nstragglers for all workers shown on the page, with the following information:\n\n- The start time when the straggler was detected.\n- The worker that experienced the straggler.\n- The cause, if known.\n\nTroubleshoot batch stragglers\n\nDataflow detects the following causes of stragglers in batch\npipelines:\n\n- **Hot key** . A *hot key* is a key that represents significantly more elements\n than other keys in the same `PCollection`. For more information, see\n [Troubleshoot stragglers caused by hot keys](#troubleshoot_stragglers_caused_by_hot_keys)\n in this document.\n\n- **Slow Worker** . On a *slow worker* , work items run\n more slowly than usual. Often, the processing speed of a slow worker is\n less than the processing speed of workers doing similar work at the same stage.\n Many factors can cause worker slowness, including CPU starvation, thrashing,\n machine architecture, and stuck worker processes.\n When slowness occurs, Dataflow attempts to mitigate the issue\n automatically. For more information, see\n [Automatically mitigate stragglers caused by slow workers](#slow-workers) in this\n document.\n\n- **Undetermined cause** . For stragglers with undetermined cause, see the\n general troubleshooting steps for\n [slow batch jobs](/dataflow/docs/guides/troubleshoot-slow-batch-jobs)\n in \"Troubleshoot slow or stuck jobs.\"\n\nTroubleshoot stragglers caused by hot keys\n\nVarious factors can cause stragglers, but one common cause is the existence of\na *hot key* . A hot key is a key that represents significantly more elements than\nother keys in the same `PCollection`. Hot keys can create stragglers because\nthey limit Dataflow's ability to process elements in parallel.\n\nIf Dataflow detects a straggler caused by a hot key, the\n**Straggler Details** panel lists `Hot Key` as the cause.\n\nBy default, Dataflow does not display the key value of the\nhot key. To display the key value, set the\n[`hotKeyLoggingEnabled`](/dataflow/docs/reference/pipeline-options#debugging)\npipeline option to `true` when you run the job.\n\nTo resolve this issue, check that your data is evenly distributed. If a key has\ndisproportionately many values, consider the following courses of action:\n\n- Rekey your data. Apply a [`ParDo`](https://beam.apache.org/documentation/programming-guide/#pardo) transform to output new key-value pairs.\n- For Java jobs, use the [`Combine.PerKey.withHotKeyFanout`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Combine.PerKey.html) transform.\n- For Python jobs, use the [`CombinePerKey.with_hot_key_fanout`](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.core.html?#apache_beam.transforms.core.CombinePerKey.with_hot_key_fanout) transform.\n- Enable [Dataflow Shuffle](/dataflow/docs/shuffle-for-batch).\n\n| **Note:** Apache Beam SQL cannot reshuffle data that contains hotkeys during sub-transforms.\n\nFor example, if a pipeline performs a `JOIN` operation as part of a SQL\ntransform, then a given key is likely to contain a disproportionate amount of\ndata when it is fed into the `GroupByKey` that is performed as part of the\nexpanded `JOIN` operation.\n\nFor more information, see the following feature request:\n[beam-issue/28186](https://github.com/apache/beam/issues/28186).\n\nAutomatically mitigate stragglers caused by slow workers\n\nSlow workers are uncommon on Dataflow but can impact\njob performance. To prevent performance issues, when Dataflow detects\nslow workers, it tries to mitigate the problem before the workers cause\nstragglers.\n\nThe automatic mitigation\n[simulates a host maintenance event](/compute/docs/instances/simulating-host-maintenance).\nThe event is a Compute Engine maintenance mechanism that happens regularly.\nDepending on the worker's\n[host maintenance policy](/compute/docs/instances/host-maintenance-overview#schedulingoptions),\nthe worker is either live migrated or restarted. If a live migration occurs, the workload isn't interrupted.\nIf the worker is restarted, the ongoing work from the slow worker is lost,\nand processing restarts.\n\nIf a slow worker is detected and successfully mitigated,\nthe following message displays in the **job-message** logs: \n\n Slow worker ... detected and automatically remediated ...\n\nBecause slow workers are not stragglers, you don't need to take further action.\n\nIf mitigation is unsuccessful, the slow worker causes a straggler that\ndisplays in the Dataflow monitoring interface.\n\nAutomatic mitigation might fail if your project runs out of quota for\ninstance simulate maintenance event requests. For more information\nabout the default quota, see\n[API rate limits for regional metrics](/compute/resource-usage#api-rate-limits-regional)\nin \"Resource usage quotas and permission management.\"\nTo request a higher quota limit, see\n[Requesting a quota adjustment](/docs/quotas/help/request_increase)\nin \"View and manage quotas.\"\n\nWhat's next\n\n- Learn to use the [Dataflow monitoring interface](/dataflow/docs/guides/using-monitoring-intf).\n- Understand the [**Execution details**](/dataflow/docs/concepts/execution-details) tab in the monitoring interface."]]