Documentation
¶
Overview ¶
Command loadtest measures how a gundb relay copes with many connected users. It starts the relay in a child process, so its CPU and memory are measured apart from the load generator. It then connects N simulated users and runs these phases:
idle N users connected and doing nothing: memory and goroutines per user write every user puts to its own node and waits for the ack, in a loop read every user gets a random existing node, in a loop fanout every user subscribes to one node; one writer updates it at -rate/s
Users are lightweight WebSocket clients that speak GUN's wire protocol, the way a browser does, so the numbers describe the relay, not N client DBs.
go run ./loadtest -users 100,1000,10000 go run ./loadtest -users 1000 -store pebble -duration 20s