Utilizzare le prenotazioni Compute Engine con Dataflow
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Per assicurarti che le risorse VM siano disponibili quando i job Dataflow ne hanno bisogno, puoi utilizzare le prenotazioni di Compute Engine. Le prenotazioni offrono un elevato
livello di garanzia per l'ottenimento di capacità per le risorse di zona di Compute Engine.
Per utilizzare le prenotazioni Compute Engine con Dataflow, segui questi passaggi:
Crea una prenotazione Compute Engine. Può trattarsi di una prenotazione per un singolo progetto o di una prenotazione condivisa. Per saperne di più, consulta i seguenti
documenti:
La prenotazione può includere acceleratori GPU o TPU.
Quando invii il job Dataflow, passa una delle seguenti opzioni di servizio, a seconda della versione dell'SDK Beam che stai utilizzando:
Beam versione < 2.29: --experiments=skip_gce_quota_verification
Versione di Beam >= 2.29: --dataflow_service_options=automatically_use_created_reservation
Per evitare che i workload a bassa priorità nello stesso progetto competano per le prenotazioni con Dataflow, imposta l'affinità di prenotazione su none quando crei VM per questi workload. Per saperne di più, consulta Utilizzo delle istanze riservate.
Per utilizzare la prenotazione, i worker Dataflow devono corrispondere
alla configurazione della prenotazione. Potresti dover impostare il tipo di macchina worker per
il job. Per saperne di più, vedi
Worker.
Limitazioni
Tutte le limitazioni delle prenotazioni di Compute Engine si applicano quando
i worker Dataflow utilizzano le prenotazioni. Consulta
Come funzionano le prenotazioni.
Dataflow si basa sull'ordine di consumo predefinito in Compute Engine. Di conseguenza, si applicano le seguenti limitazioni:
Altri workload nello stesso progetto o organizzazione che non specificano il
flag --reservation potrebbero competere con i workload Dataflow per
prenotazioni specifiche del progetto o condivise.
I job Dataflow Prime non utilizzano le prenotazioni di Compute Engine.
Prenotazioni e acceleratori
Dataflow supporta le prenotazioni specificamente mirateper le pipeline che utilizzano acceleratori (GPU o TPU). Questa funzionalità è generalmente
disponibile con una lista consentita. Per istruzioni sull'utilizzo degli
acceleratori Dataflow con prenotazioni specifiche, contatta il team dedicato al tuo account.
Prezzi
Dataflow ti addebita le VM dalle prenotazioni consumate automaticamente durante l'esecuzione del job Dataflow. Quando
Dataflow non utilizza le VM, Compute Engine ti addebita i costi.
Modello di prezzi di Compute Engine
Se il tuo utilizzo di Dataflow include VM provenienti da prenotazioni specificamente mirate che dispongono di GPU o TPU, le risorse di calcolo di queste VM prenotate vengono fatturate in base ai prezzi di Compute Engine. Se le prenotazioni con target specifico sono
collegate a un impegno basato sulle risorse di Compute Engine, ricevi anche gli sconti per impegno di utilizzo (CUD) basati sulle risorse applicabili per il tuo utilizzo. Ti viene addebitato anche un premio di gestione per le risorse di computing
utilizzate in Dataflow. Per ulteriori dettagli sui prezzi, consulta
Prezzi di Dataflow.
Modello di prezzi di Dataflow
Per qualsiasi altro tipo di prenotazione di Compute Engine che utilizzi con
Dataflow, l'utilizzo viene fatturato utilizzando il
modello di prezzi di Dataflow. L'utilizzo di Dataflow
da queste prenotazioni non è idoneo per i CUD basati sulle risorse, anche se
queste prenotazioni sono collegate a un impegno basato sulle risorse. Ciò vale per le seguenti prenotazioni di Compute Engine:
Prenotazioni con target specifico che non dispongono di GPU o TPU
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-10 UTC."],[[["\u003cp\u003eCompute Engine reservations can be used to ensure VM resources are available for Dataflow jobs.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize reservations, create a Compute Engine reservation and pass the appropriate service option when submitting a Dataflow job, dependent on the Beam SDK version used.\u003c/p\u003e\n"],["\u003cp\u003eSetting the reservation affinity to \u003ccode\u003enone\u003c/code\u003e for low-priority workloads prevents competition for reservations with Dataflow jobs.\u003c/p\u003e\n"],["\u003cp\u003eDataflow worker configurations must match the reservation's configuration to successfully consume the reserved resources, which may require adjustments to the worker machine type.\u003c/p\u003e\n"],["\u003cp\u003eCompute Engine reservations used with Dataflow are billed by Dataflow while the job runs and by Compute Engine when idle, and they are not eligible for Compute Engine committed use discounts.\u003c/p\u003e\n"]]],[],null,["To ensure that VM resources are available when your Dataflow jobs need\nthem, you can use Compute Engine reservations. Reservations provide a high\nlevel of assurance in obtaining capacity for Compute Engine zonal\nresources.\n\nTo use Compute Engine reservations with Dataflow, perform the\nfollowing steps:\n\n1. Create a Compute Engine reservation. It can be a single-project\n reservation or a shared reservation. For more information, see the following\n documents:\n\n - [Create a reservation for a single project](/compute/docs/instances/reservations-single-project)\n - [Create a shared reservation](/compute/docs/instances/reservations-shared)\n\n The reservation can include GPU or TPU accelerators.\n2. When you submit your Dataflow job, pass one of the following\n service options, depending on which version of the Beam SDK you are using:\n\n - Beam version \\\u003c 2.29: `--experiments=skip_gce_quota_verification`\n - Beam version \\\u003e= 2.29: `--dataflow_service_options=automatically_use_created_reservation`\n\nTo prevent low-priority workloads in the same project from competing for\nreservations with Dataflow, set the reservation affinity to\n`none` when you create VMs for those workloads. For more information, see\n[Consuming reserved instances](/compute/docs/instances/reserving-zonal-resources#consuming_reserved_instances).\n\nIn order to use the reservation, the Dataflow workers must match\nthe reservation configuration. You might need to set the worker machine type for\nthe job. For more information, see\n[Workers](/dataflow/docs/request-quotas#workers).\n\nLimitations\n\n- All limitations of Compute Engine reservations apply when\n Dataflow workers consume reservations. See\n [How reservations work](/compute/docs/instances/reservations-overview#how-reservations-work).\n\n- Dataflow relies on the\n [default consumption order](/compute/docs/instances/reservations-overview#consumption-order)\n in Compute Engine. As a result, the following limitations apply:\n\n - Other workloads in the same project or Organization that don't specify the `--reservation` flag might compete with Dataflow workloads for project-specific or shared reservations.\n- Dataflow Prime jobs don't consume Compute Engine reservations.\n\nReservations and accelerators\n\nDataflow supports [*specifically targeted*\nreservations](/compute/docs/instances/reservations-consume#consuming_instances_from_a_specific_reservation)\nfor pipelines using accelerators (GPUs or TPUs). This functionality is generally\navailable with an allowlist. For instructions on using Dataflow\naccelerators with specific reservations, contact your account team.\n\nPricing\n\nDataflow bills you for VMs from *automatically consumed*\nreservations while your Dataflow job runs. When\nDataflow isn't using the VMs, Compute Engine bills you.\n\nCompute Engine pricing model\n\nIf your Dataflow usage includes VMs from [*specifically targeted*\nreservations](/compute/docs/instances/reservations-overview#consumption-type)\nthat have GPUs or TPUs, then compute resources from those reserved VMs are\nbilled according to [Compute Engine\nPricing](/compute/all-pricing). If your *specifically targeted* reservations are\nattached to a [Compute Engine resource-based\ncommitment](/compute/docs/instances/signing-up-committed-use-discounts), then\nyou also receive applicable resource-based committed use discounts (CUDs) for\nyour usage. You're also billed a management premium for compute resources\nconsumed in Dataflow. For more pricing details, see [Dataflow Pricing](/dataflow/pricing).\n\nDataflow pricing model\n\nFor any other type of Compute Engine reservations that you use with\nDataflow, your usage is billed by using the\n[Dataflow pricing model](/dataflow/pricing). Dataflow\nusage from those reservations isn't eligible for resource-based CUDs, even if\nthose reservations are attached to a resource-based commitment. This applies to\nthe following Compute Engine reservations:\n\n- *Specifically targeted* reservations that don't have GPUs or TPUs\n- All *automatically consumed* reservations\n\nWhat's next\n\nTo learn more about Compute Engine reservations, see\n[Reservations of Compute Engine zonal resources](/compute/docs/instances/reservations-overview)."]]