Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/theoretical-max-tps.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To run the test, first [set up an EKS cluster](eks.md). Accepting the default
settings will produce a topology identical to what we use in our test setup.
Then, run a `MaxTPSClassic` mission with the following template:
```bash
dotnet run --project src/App/App.fsproj --configuration Release -- mission MaxTPSClassic --image=<core-image> --pubnet-data=<path-to-repo>/topologies/theoretical-max-tps.json --tx-rate=<min-tx-rate> --max-tx-rate=<max-tx-rate> --namespace default --ingress-internal-domain=<domain> --ingress-class=nginx --run-for-max-tps=classic
dotnet run --project src/App/App.fsproj --configuration Release -- mission MaxTPSClassic --image=<core-image> --pubnet-data=<path-to-repo>/topologies/theoretical-max-tps.json --tx-rate=<min-tx-rate> --max-tx-rate=<max-tx-rate> --namespace default --ingress-internal-domain=<domain> --ingress-class=nginx --run-for-max-tps=classic --enable-tcp-tuning
```
For more information about how to set the parameters in the above command, see
[Measuring Transaction Throughput](measuring-transaction-throughput.md).
Expand Down
53 changes: 47 additions & 6 deletions src/App/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ type MissionOptions
enableInMemoryBuckets: bool,
peerFloodCapacity: int option,
peerFloodCapacityBytes: int option,
flowControlSendMoreBatchSizeBytes: int option,
outboundByteLimit: int option,
sleepMainThread: int option,
flowControlSendMoreBatchSize: int option,
flowControlSendMoreBatchSizeBytes: int option,
outboundByteLimit: int option,
simulateApplyDuration: seq<string>,
simulateApplyWeight: seq<string>,
networkSizeLimit: int,
Expand All @@ -123,7 +123,11 @@ type MissionOptions
runForMaxTps: string option,
requireNodeLabelsPcV2: seq<string>,
avoidNodeLabelsPcV2: seq<string>,
tolerateNodeTaintsPcV2: seq<string>
tolerateNodeTaintsPcV2: seq<string>,
benchmarkInfrastructure: bool,
benchmarkOnly: bool,
benchmarkDurationSeconds: int,
enableTcpTuning: bool
) =

[<Option('k', "kubeconfig", HelpText = "Kubernetes config file", Required = false, Default = "~/.kube/config")>]
Expand Down Expand Up @@ -543,6 +547,30 @@ type MissionOptions
Required = false)>]
member self.TolerateNodeTaintsPcV2 = tolerateNodeTaintsPcV2

[<Option("benchmark-infra",
HelpText = "Run network infrastructure benchmark in addition to stellar-core tests",
Required = false,
Default = false)>]
member self.BenchmarkInfrastructure = benchmarkInfrastructure

[<Option("benchmark-only",
HelpText = "Run ONLY the network infrastructure benchmark, skip stellar-core tests (requires --benchmark-infra)",
Required = false,
Default = false)>]
member self.BenchmarkOnly = benchmarkOnly

[<Option("benchmark-duration-seconds",
HelpText = "Duration of network benchmark tests in seconds",
Required = false,
Default = 30)>]
member self.BenchmarkDurationSeconds = benchmarkDurationSeconds

[<Option("enable-tcp-tuning",
HelpText = "Enable TCP tuning for improved network performance",
Required = false,
Default = false)>]
member self.EnableTcpTuning = enableTcpTuning

let splitLabel (lab: string) : (string * string option) =
match lab.Split ':' with
| [| x |] -> (x, None)
Expand Down Expand Up @@ -670,10 +698,14 @@ let main argv =
runForMaxTps = None
requireNodeLabelsPcV2 = []
avoidNodeLabelsPcV2 = []
tolerateNodeTaintsPcV2 = [] }
tolerateNodeTaintsPcV2 = []
benchmarkInfrastructure = Some false
benchmarkInfrastructureOnly = Some false
benchmarkDurationSeconds = Some 30
enableTcpTuning = false }

let nCfg = MakeNetworkCfg ctx [] None
use formation = kube.MakeEmptyFormation nCfg
use formation = kube.MakeEmptyFormation(nCfg, skipTcpConfig = true)
formation.CleanNamespace()
0

Expand Down Expand Up @@ -721,6 +753,11 @@ let main argv =
let processInputSeq s = if Seq.isEmpty s then None else Some((Seq.map int) s)

try
// Validate benchmark flag combinations
match mission.BenchmarkOnly, mission.BenchmarkInfrastructure with
| true, false -> failwith "Error: --benchmark-only requires --benchmark-infra to be set"
| _ -> ()

let missionContext =
{ MissionContext.kube = kube
kubeCfg = mission.KubeConfig
Expand Down Expand Up @@ -821,7 +858,11 @@ let main argv =
runForMaxTps = mission.RunForMaxTps
requireNodeLabelsPcV2 = List.map splitLabel (List.ofSeq mission.RequireNodeLabelsPcV2)
avoidNodeLabelsPcV2 = List.map splitLabel (List.ofSeq mission.AvoidNodeLabelsPcV2)
tolerateNodeTaintsPcV2 = List.map splitLabel (List.ofSeq mission.TolerateNodeTaintsPcV2) }
tolerateNodeTaintsPcV2 = List.map splitLabel (List.ofSeq mission.TolerateNodeTaintsPcV2)
benchmarkInfrastructure = Some mission.BenchmarkInfrastructure
benchmarkInfrastructureOnly = Some mission.BenchmarkOnly
benchmarkDurationSeconds = Some mission.BenchmarkDurationSeconds
enableTcpTuning = mission.EnableTcpTuning }

allMissions.[m] missionContext

Expand Down
6 changes: 5 additions & 1 deletion src/FSLibrary.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ let ctx : MissionContext =
runForMaxTps = None
requireNodeLabelsPcV2 = []
avoidNodeLabelsPcV2 = []
tolerateNodeTaintsPcV2 = [] }
tolerateNodeTaintsPcV2 = []
benchmarkInfrastructure = None
benchmarkInfrastructureOnly = None
benchmarkDurationSeconds = None
enableTcpTuning = false }

let netdata = __SOURCE_DIRECTORY__ + "/../../../data/public-network-data-2024-08-01.json"
let pubkeys = __SOURCE_DIRECTORY__ + "/../../../data/tier1keys.json"
Expand Down
Loading