Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Os jobs em lote usam o Dataflow Shuffle por padrão.
O Dataflow Shuffle
move a operação de embaralhamento das VMs de worker para o
back-end do serviço do Dataflow.
Sobre o Dataflow Shuffle
O Dataflow Shuffle é a operação básica por trás
das transformações do Dataflow, como GroupByKey, CoGroupByKey e
Combine.
Essa operação particiona e agrupa os dados por chave de maneira escalonável, eficiente e tolerante a falhas.
Benefícios do Dataflow Shuffle
O Dataflow Shuffle baseado em serviços oferece estes benefícios:
Tempo de execução mais rápido em pipelines em lote para a maioria dos tipos de jobs de
pipeline.
Redução no consumo dos recursos de CPU, memória e armazenamento em disco permanente
nas VMs de worker.
Melhor tolerância a falhas, porque uma VM não íntegra com dados do Dataflow Shuffle não causa falha em todo o job.
Suporte e limitações
O Dataflow Shuffle não está disponível para jobs de streaming.
Esse recurso está disponível em todas as regiões em que o Dataflow é compatível. Para ver os territórios disponíveis, consulte Locais do Dataflow. Pode haver diferenças de performance entre as regiões.
Os workers precisam ser implantados na mesma região que o job do Dataflow.
Não especifique a opção de pipeline zone. Em vez disso, especifique region e defina o valor como uma das regiões disponíveis. O Dataflow vai selecionar automaticamente a zona na região especificada.
Se você especificar a opção de pipeline zone
e defini-la como uma zona fora das regiões disponíveis, o
job do Dataflow vai retornar um erro. Se você definir uma combinação incompatível
entre region e zone, o job não vai poder usar o Dataflow Shuffle.
Para Python, o Dataflow Shuffle exige o SDK do Apache Beam
para Python versão 2.1.0 ou posterior.
Considerações sobre o tamanho do disco
O tamanho padrão do disco de inicialização para cada job em lote é de 25 GB. Em alguns jobs em lote,
talvez seja necessário modificar o tamanho do disco. Considere o seguinte:
Uma VM de worker usa parte dos 25 GB de espaço em disco para o sistema operacional,
binários, registros e contêineres. Quando você usa o Dataflow Shuffle, os jobs que usam uma quantidade significativa de disco e
excedem a capacidade restante
podem falhar.
Os jobs que usam muita E/S de disco podem ser lentos devido ao desempenho do
disco pequeno. Para mais informações sobre as diferenças de desempenho entre tamanhos de disco, consulte Desempenho do Persistent Disk no Compute Engine.
Para especificar um tamanho de disco maior para um job do Dataflow Shuffle,
use o parâmetro
--disk_size_gb.
Preços
A maior parte da redução nos recursos do worker é motivada pela transferência do trabalho de embaralhamento
para o serviço Dataflow. Por isso, há uma
cobrança associada ao uso do Dataflow
Shuffle. No entanto, os tempos de execução podem variar. Se você estiver executando
um pipeline com prazos importantes, recomendamos alocar tempo de buffer
suficiente antes do prazo final.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-04-22 UTC."],[[["\u003cp\u003eDataflow shuffle, which is used by default for batch jobs, moves shuffle operations to the Dataflow service backend, improving efficiency.\u003c/p\u003e\n"],["\u003cp\u003eDataflow shuffle is the foundational operation for Dataflow transforms like \u003ccode\u003eGroupByKey\u003c/code\u003e, \u003ccode\u003eCoGroupByKey\u003c/code\u003e, and \u003ccode\u003eCombine\u003c/code\u003e, enabling scalable and fault-tolerant data partitioning and grouping.\u003c/p\u003e\n"],["\u003cp\u003eBenefits of Dataflow shuffle include faster batch pipeline execution, reduced worker VM resource consumption, improved horizontal autoscaling, and better fault tolerance.\u003c/p\u003e\n"],["\u003cp\u003eDataflow shuffle is not available for streaming jobs and requires worker VMs to be deployed in the same region as the Dataflow job, avoiding the specification of a \u003ccode\u003ezone\u003c/code\u003e pipeline option.\u003c/p\u003e\n"],["\u003cp\u003eDataflow shuffle charges apply, and the default 25 GB boot disk size may need to be increased for jobs with heavy disk I/O to ensure optimal performance.\u003c/p\u003e\n"]]],[],null,["# Dataflow shuffle for batch jobs\n\nBatch jobs use Dataflow shuffle by default.\nDataflow shuffle\nmoves the shuffle operation out of the worker VMs and into the\nDataflow service backend.\n\nThe information on this page applies to batch jobs. Streaming jobs use a\ndifferent shuffle mechanism, called\n[streaming shuffle](/dataflow/docs/concepts/exactly-once#streaming-shuffle).\n\nAbout Dataflow shuffle\n----------------------\n\n- Dataflow shuffle is the base operation behind Dataflow transforms such as `GroupByKey`, `CoGroupByKey`, and `Combine`.\n- The Dataflow shuffle operation partitions and groups data by key in a scalable, efficient, fault-tolerant manner.\n\nBenefits of Dataflow shuffle\n----------------------------\n\nThe service-based Dataflow shuffle has the following benefits:\n\n- Faster execution time of batch pipelines for the majority of pipeline job types.\n- A reduction in consumed CPU, memory, and Persistent Disk storage resources on the worker VMs.\n- Better [Horizontal Autoscaling](/dataflow/docs/horizontal-autoscaling), because VMs don't hold any shuffle data and can therefore be scaled down earlier.\n- Better fault tolerance, because an unhealthy VM holding Dataflow shuffle data doesn't cause the entire job to fail.\n\nSupport and limitations\n-----------------------\n\n- This feature is available in all regions where Dataflow is supported. To see available locations, read [Dataflow locations](/dataflow/docs/resources/locations). There might be performance differences between regions.\n- Workers must be deployed in the same region as the Dataflow job.\n- Don't specify the `zone` pipeline option. Instead, specify the `region`, and\n set the value to one of the available regions. Dataflow\n automatically selects the zone in the region you specified.\n\n If you specify the `zone`\n pipeline option and set it to a zone outside of the available regions, the\n Dataflow job returns an error. If you set an incompatible combination\n of `region` and `zone`, your job can't use Dataflow shuffle.\n- For Python, Dataflow shuffle requires Apache Beam SDK\n for Python version 2.1.0 or later.\n\nDisk size considerations\n------------------------\n\nThe default boot disk size for each batch job is 25 GB. For some batch jobs,\nyou might be required to modify the size of the disk. Consider the following:\n\n- A worker VM uses part of the 25 GB of disk space for the operating system, binaries, logs, and containers. Jobs that use a significant amount of disk and exceed the remaining disk capacity may fail when you use Dataflow shuffle.\n- Jobs that use a lot of disk I/O may be slow due to the performance of the small disk. For more information about performance differences between disk sizes, see [Compute Engine Persistent Disk Performance](/compute/docs/disks/performance).\n\nTo specify a larger disk size for a Dataflow shuffle job, you can\nuse the [`--disk_size_gb`](/dataflow/pipelines/specifying-exec-params#setting-other-cloud-pipeline-options)\nparameter.\n\nPricing\n-------\n\nMost of the reduction in worker resources comes from offloading the shuffle work\nto the Dataflow service. For that reason, there is a\n[charge](/dataflow/pricing) associated with the use of Dataflow\nshuffle. The execution times might vary from run to run. If you are running\na pipeline that has important deadlines, we recommend allocating sufficient\nbuffer time before the deadline."]]