GPR Wait Time
The GPR wait time is calculated based on the current GPU availability and the requested GPU resources. If the requested GPU resources are not immediately available, EGS estimates the wait time based on the current queue of GPU requests and their priorities.
Get Wait Time For a GPU Request
Use this API to get the estimated wait time for a GPU request.
Method and URL
POST /api/v1/gpr/waittime
Parameters
Parameter | Parameter Type | Description | Required |
---|---|---|---|
requestName | String | The unique name for the GPU provisioning request. The maximum length is 40 characters. | Mandatory |
sliceName | String | The name of the workspace (slice) where the GPU resources are requested. | Mandatory |
preferredClusters | Array of strings | The list of preferred clusters where the GPU resources can be provisioned. This field is required only when enableAutoClusterSelection is false . If enableAutoClusterSelection is true , this field must be empty. | Optional |
enableAutoClusterSelection | Boolean | This is the parameter to enable or disable automatic cluster selection. If set to true , EGS automatically selects the best cluster based on resource availability and preferredClusters values must be empty. If set to false , EGS uses the preferredClusters list to select clusters. | Mandatory |
enableAutoGpuSelection | Boolean | This is the parameter to enable or disable automatic GPU selection. If set to true , EGS automatically selects the best GPU shape based on resource availability. If set to false , EGS uses the instanceType parameter to select the GPU shape. | Mandatory |
numberOfGPUs | Integer | Total number of GPUs required for the GPU request. The value must be greater than or equal to 1. | Mandatory |
numberOfGPUNodes | Integer | Number of nodes required for the GPU request. The value must be greater than or equal to 1. | Mandatory |
instanceType | String | The type of GPU instance requested. This parameter is required if the enableAutoGpuSelection is set to false . | Optional |
exitDuration | String | The duration for which the GPU resources are required. The format is XdYhZm, where X is days, Y is hours, and Z is minutes. The value must be greater than zero. For example, the duration is 1d2h30m . | Mandatory |
memoryPerGpu | Integer | The amount of memory (in GB) required per GPU. The value must be greater than or equal to 1 . | Mandatory |
priority | Integer | The priority of the request. You can change the priority of a GPR in the queue. You can select a GPR and increase the priority number (low: 1-100, medium: 101-200, high: 201-300) to move a GPR higher in the queue. The maximum priority is 300. The default priority is 1 (low). | Mandatory |
enableEviction | Boolean | This is the parameter to enable or disable eviction of lower priority GPU requests to accommodate GPU request. If set totrue , lower priority requests may be evicted to free up resources. If set to false , the request will only be fulfilled if sufficient resources are available without evicting other requests. | Optional |
Example Scenarios
Example 1: Get Wait Time for a GPR with Cluster and GPU Auto-Selection Enabled
When both the enableAutoClusterSelection and enableAutoGpuSelection parameters are set to true
, EGS automatically selects the
best cluster and GPU shape based on the resource availability. During GPR creation, the user cannot select any options obtained from
waittime API request. All cluster and GPU-related fields are automatically handled by the GPR Manager.
Example Request
curl --location --globoff '{{host}}/api/v1/gpr/waittime' \
--data '{
"requestName": "tesla-workload",
"sliceName": "dashboard",
"numberOfGPUs": 2,
"numberOfGPUNodes": 1,
"exitDuration": "00d06h00m",
"memoryPerGpu": 15,
"priority": 1,
"enableEviction": true,
"enableAutoClusterSelection": true,
"enableAutoGpuSelection": true
}'
Example Responses
Response: Success
{
"message": "Wait time fetched successfully",
"status": "success",
"data": {
"items": [
{
"cluster": "worker-3",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:04:36Z",
"evictableGPRs": []
},
{
"cluster": "worker-4",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:04:36Z",
"evictableGPRs": [
{
"requestName": "tesla-workload",
"requestId": "gpr-e318186c-15dc",
"clusterName": "worker-4",
"sliceName": "dashboard",
"gpuReq": {
"numberOfGPUs": 1,
"numberOfGPUNodes": 1,
"instanceType": "n1-highcpu-2"
},
"priority": 1,
"exitDuration": "6h0m0s",
"expectedStartTime": "",
"creationTime": "2025-09-25 14:01:24 +0000 UTC",
"autoEvictionEnabled": true
}
]
},
{
"cluster": "worker-1",
"instanceType": "VM.GPU.A10.2",
"gpuShape": "NVIDIA-A10",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:04:36Z",
"evictableGPRs": []
}
]
}
}
Response: Bad Request
{
"statusCode": 422,
"status": "Error",
"message": "Bad Request",
"data": null,
"error": {
"errorKey": "",
"message": "Bad Request",
"data": "{\"error\":{\"Message\":\"Error while fetching GPR wait time\",\"Status\":422,\"DetailedError\":{\"Errormessage\":\"Could not find any cluster which satisfies the GPR requirements. Errors: Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-4, instance type: n1-highcpu-2; Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-3, instance type: n1-highcpu-2\",\"Reason\":\"\",\"Details\":\"\"},\"StatusCode\":422,\"ReferenceDocumentation\":\"NA\"}}"
}
}
Example 2: Get Wait Time for a GPR with Only Cluster Auto-Selection Enabled
When the enableAutoClusterSelection parameter is set to true
, the preferredClusters parameter values must be empty.
EGS automatically selects the best cluster based on resource availability. During GPR creation, the user cannot select any options obtained from the waittime API request. All cluster and GPU-related
fields are automatically handled by the GPR Manager.
Example Request
curl --location --globoff '{{host}}/api/v1/gpr/waittime' \
--data '{
"requestName": "tesla-workload",
"sliceName": "dashboard",
"numberOfGPUs": 2,
"numberOfGPUNodes": 1,
"instanceType": "n1-highcpu-2",
"exitDuration": "00d06h00m",
"memoryPerGpu": 15,
"priority": 101,
"enableEviction": true,
"enableAutoClusterSelection": true,
"enableAutoGpuSelection": false
}'
Example Response
Response: Success
{
"message": "Wait time fetched successfully",
"status": "success",
"data": {
"items": [
{
"cluster": "worker-3",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:12:44Z",
"evictableGPRs": []
},
{
"cluster": "worker-4",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:12:44Z",
"evictableGPRs": [
{
"requestName": "tesla-workload",
"requestId": "gpr-e318186c-15dc",
"clusterName": "worker-4",
"sliceName": "dashboard",
"gpuReq": {
"numberOfGPUs": 1,
"numberOfGPUNodes": 1,
"instanceType": "n1-highcpu-2"
},
"priority": 1,
"exitDuration": "6h0m0s",
"expectedStartTime": "",
"creationTime": "2025-09-25 14:01:24 +0000 UTC",
"autoEvictionEnabled": true
}
]
}
]
}
}
Response: Bad Request
{
"statusCode": 422,
"status": "Error",
"message": "Bad Request",
"data": null,
"error": {
"errorKey": "",
"message": "Bad Request",
"data": "{\"error\":{\"Message\":\"Error while fetching GPR wait time\",\"Status\":422,\"DetailedError\":{\"Errormessage\":\"Could not find any cluster which satisfies the GPR requirements. Errors: Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-4, instance type: n1-highcpu-2; Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-3, instance type: n1-highcpu-2\",\"Reason\":\"\",\"Details\":\"\"},\"StatusCode\":422,\"ReferenceDocumentation\":\"NA\"}}"
}
}
Example 3: Get Wait Time for a GPR with Only GPU Auto-Selection Enabled
When you set the enableAutoGpuSelection parameter to true
, skip providing the gpuShape and instanceType parameters values.
EGS automatically selects the best GPU shape based on resource availability.
During GPR creation, the user cannot select any options obtained from the waittime API request. All cluster and GPU-related fields
are automatically handled by the GPR Manager.
Example Request
curl --location --globoff '{{host}}/api/v1/gpr/waittime' \
--data '{
"requestName": "tesla-workload",
"sliceName": "dashboard",
"preferredClusters": [
"worker-4",
"worker-3"
],
"numberOfGPUs": 2,
"numberOfGPUNodes": 1,
"exitDuration": "00d06h00m",
"memoryPerGpu": 15,
"priority": 1,
"enableEviction": true,
"enableAutoClusterSelection": false,
"enableAutoGpuSelection": true
}'
Example Responses
Response: Success
{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"items": [
{
"cluster": "worker-4",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:25:44Z",
"evictableGPRs": []
},
{
"cluster": "worker-1",
"instanceType": "VM.GPU.A10.2",
"gpuShape": "NVIDIA-A10",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:25:43Z",
"evictableGPRs": []
}
]
}
}
Response: Error
{
"statusCode": 422,
"status": "Error",
"message": "Bad Request",
"data": null,
"error": {
"errorKey": "",
"message": "Bad Request",
"data": "{\"error\":{\"Message\":\"Error while fetching GPR wait time\",\"Status\":422,\"DetailedError\":{\"Errormessage\":\"Could not find any cluster which satisfies the GPR requirements. Errors: Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-4, instance type: n1-highcpu-2; Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-3, instance type: n1-highcpu-2\",\"Reason\":\"\",\"Details\":\"\"},\"StatusCode\":422,\"ReferenceDocumentation\":\"NA\"}}"
}
}
Example 4: Get Wait Time for a GPR with No Auto-Selection Enabled
If the enableAutoClusterSelection and enableAutoGpuSelection parameters are set to false
. The preferredClusters,
gpuShape and instanceType parameters are required. During GPR creation, the user has to select one of options obtained from
the waittime API request.
Example Request
{
"requestName": "tesla-workload",
"sliceName": "dashboard",
"preferredClusters": [
"worker-4",
"worker-3"
],
"numberOfGPUs": 2,
"numberOfGPUNodes": 1,
"instanceType": "n1-highcpu-2",
"exitDuration": "00d02h00m",
"memoryPerGpu": 15,
"priority": 1,
"enableEviction": true,
"enableAutoClusterSelection": false,
"enableAutoGpuSelection": false
}
Example Responses
Response: Success
{
"message": "Wait time fetched successfully",
"status": "success",
"data": {
"items": [
{
"cluster": "worker-4",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d5h26m52s",
"expectedStartTime": "2025-09-25T20:01:39Z",
"evictableGPRs": []
},
{
"cluster": "worker-3",
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"waitduration": "0d0h0m0s",
"expectedStartTime": "2025-09-25T14:34:46Z",
"evictableGPRs": []
}
]
}
}
Response: Bad Request
{
"statusCode": 422,
"status": "Error",
"message": "Bad Request",
"data": null,
"error": {
"errorKey": "",
"message": "Bad Request",
"data": "{\"error\":{\"Message\":\"Error while fetching GPR wait time\",\"Status\":422,\"DetailedError\":{\"Errormessage\":\"Could not find any cluster which satisfies the GPR requirements. Errors: Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-4, instance type: n1-highcpu-2; Number of GPUs requested (3) is exceeding the available GPUs (2) for cluster: worker-3, instance type: n1-highcpu-2\",\"Reason\":\"\",\"Details\":\"\"},\"StatusCode\":422,\"ReferenceDocumentation\":\"NA\"}}"
}
}