Display Memory request in sizing tool. (#8326)

pull/8363/head
Karsten Jeschkies 3 years ago committed by GitHub
parent 0ccd69c0ed
commit e269759f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/sources/installation/sizing/index.md
  2. 8
      pkg/sizing/algorithm.go

@ -50,12 +50,14 @@ This tool helps to generate a Helm Charts `values.yaml` file based on specified
<th>Write Replicas</th>
<th>Nodes</th>
<th>Cores</th>
<th>Memory</th>
</tr>
<tr>
<td>{{ clusterSize.TotalReadReplicas }}</td>
<td>{{ clusterSize.TotalWriteReplicas }}</td>
<td>{{ clusterSize.TotalNodes}}</td>
<td>{{ clusterSize.TotalCoresRequest}}</td>
<td>{{ clusterSize.TotalMemoryRequest}} GB</td>
</tr>
</table>
</div>

@ -9,6 +9,7 @@ type ClusterSize struct {
TotalReadReplicas int
TotalWriteReplicas int
TotalCoresRequest float64
TotalMemoryRequest int
expectedMaxReadThroughputBytesSec float64
expectedMaxIngestBytesDay float64
@ -71,12 +72,15 @@ func calculateClusterSize(nt NodeType, bytesDayIngest float64, qperf QueryPerf)
totalReadThroughputBytesSec := totalReadReplicas * nt.readPod.rateBytesSecond
totalNodesNeeded := nodesNeededForWrites + actualNodesAddedForReads
totalCoresLimit := numWriteReplicasNeeded*nt.writePod.cpuRequest + totalReadReplicas*nt.readPod.cpuRequest
totalCoresRequest := numWriteReplicasNeeded*nt.writePod.cpuRequest + totalReadReplicas*nt.readPod.cpuRequest
totalMemoryRequest := numWriteReplicasNeeded*float64(nt.writePod.memoryRequest) + totalReadReplicas*float64(nt.readPod.memoryRequest)
return ClusterSize{
TotalNodes: int(totalNodesNeeded),
TotalReadReplicas: int(totalReadReplicas),
TotalWriteReplicas: int(numWriteReplicasNeeded),
TotalCoresRequest: totalCoresLimit,
TotalCoresRequest: totalCoresRequest,
TotalMemoryRequest: int(totalMemoryRequest),
expectedMaxReadThroughputBytesSec: totalReadThroughputBytesSec,
expectedMaxIngestBytesDay: (nt.writePod.rateBytesSecond * numWriteReplicasNeeded) * 86400,

Loading…
Cancel
Save