Moment Video Server
Stress Testing

Moment VS includes a tool for performing stress tests, rtmptool, which can imitate thousands of simultaneously connected RTMP clients. Command line parameters for rtmptool:

-n --num-clients <number> — Simulate N simultaneous clients. Default: 1

-s --server-addr <address> — Server address, IP:Port. Default: localhost:1935

-a --app <string> — Application name. Default: oflaDemo

-c --channel <string> — Name of the channel to subscribe to. Default: red5StreamDemo

-t --num-threads <number> — Number of threads to spawn. Default: 0, use a single thread.

-r --report-interval <number> — Interval between video frame reports. Default: 0, no reports.

--nonfatal-errors — Do not exit on the first error.

-h --help — Show help message.

Another stress testing tool is mod_test module, which generates pseudo video stream — a sequence of frames with a certain frame rate and size, filled with random data. Using mod_test and rtmptool one can assess how characteritics of a video stream affect server's throughput when a large number of clients is connected.

mod_test module configuration parameters:

mod_test/enable — enable mod_test module (yes/no). Default: "no".

mod_test/stream_name — name of the generated video stream. Default: "test".

mod_test/frame_duration — Duration of a single frame in milliseconds. Default: 40 milliseconds (25 frames per second).

mod_test/frame_size — frame size in bytes. Default: 2500 bytes.

mod_test/start_timestamp — timestamp of the first generated video message. Default: 0.

mod_test/keyframe_interval — distance between keyframes in the pseudo video stream, in frames. Default: 10 frames.

mod_test/burst_width — Number of frames to generate in a single iteration (doesn't affect average frame rate). Default: 1.

mod_test/prechunk_size — RTMP chunk size in bytes. Video messages are divided into chunks before being sent to clients. If prechunk_size is set to 0, then division of messages into chunks of default length will happen separately for every client. Default: 65536 bytes.

mod_test/same_pages — if enabled, then all video frames are represented by the same set of pages, which does not change. If disabled, then every frame is generated separately in a new set of pages. Default: "on" (enabled).



Back to Contents