| User Manual: Simple tests |
|---|
| Web Polygraph |
The examples below are synchronized with Polygraph version 1.0p5. If you find any inconsistencies with later versions, please e-mail us.
Polygraph distribution includes a client and server simulators called
polyclt and polysrv. In most cases, you will have to
run both of the programs to simulate a desired workload. The server(s) should
be launched first. We will show the command line for polysrv (polyclt)
followed by the polysrv (polyclt) output generated in our environment.
By default, Polyclt connects to 127.0.0.1:8080. For
simplicity, we will start both simulators on one machine. Your machine must be
allowed to connect to itself (via 127.0.0.1 IP address) to run
the tests below. If you start Polysrv on a different port or host, you must
tell Polyclt where the server is using the --origin option.
The tests described here are not meant to be used for production
benchmarking! They are just to illustrate basic Polygraph usage.
2. Hello, World!
This simple run will test connectivity between the client and the server. We simulate 10 robots submitting a ``Best Effort'' request stream of 100 replies total.
pail> ./polysrv --port 8080 --verb_lvl 3
920576416.286958| Command: ./polysrv --port 8080 --verb_lvl 3
920576416.286958| Configuration:
verb_lvl: 3
prn_reqs: off
prn_reps: off
fd_limit: 3962
console: -
log: <none>
log_size: 10240
linger_tout: <none>
nagle: on
xact_think: <none>
goal: -1:<none>:-1
rng_seed: 1
port: 8080
accept_lmt: -1
idle_tout: <none>
rep_sz: exp(13312.00)
920576416.286958| FDs: 4096 out of 4096 FDs can be used; safeguard limit: 3962
920576416.286958| run-id: 8230738.651844390:2 pid: 23334
920576416.294696| waiting for requests; goal: -1:<none>:-1
920576418.640624| i-warm 0 0.00 -1.00 0 2
920576419.640649| i-warm 40 40.00 -1.00 0 11
920576420.640691| i-warm 90 50.00 -1.00 0 11
920576420.682249| 1/1 (258) premature end of transmission
920576420.682249| 2/2 (258) premature end of transmission
920576420.682249| 3/3 (258) premature end of transmission
920576420.711335| 1/5 (22) Invalid argument
920576420.711335| 2/6 (22) Invalid argument
920576420.711335| 3/7 (22) Invalid argument
^C
920576420.712787| got shutdown signal (2)
920576420.712787| server closing listen socket 3 on port 8080
920576485.017274| got 100 xactions and 10 errors
920576485.017274| shutdown reason: got shutdown signal
920576485.017274| p-warm 100 1.45 -1.00 10
And here is the client options/output:
pail> ./polyclt --robots 10 --goal 100 --verb_lvl 3
920576418.633391| Command: ./polyclt --robots 10 --goal 100 --verb_lvl 3
920576418.633391| Configuration:
verb_lvl: 3
prn_reqs: off
prn_reps: off
fd_limit: 3962
console: -
log: <none>
log_size: 10240
linger_tout: <none>
nagle: on
xact_think: <none>
goal: 100:<none>:-1
rng_seed: 1
origin: localhost:8080
proxy: 127.0.0.1:8080
abs_urls: on
ports: <none>
conn_pool: -1
conn_pool_dyn: off
launch_win: <none>
cool_phase: <none>
robots: 10
req_rate: -1.00/sec
ign_false_hits: off
prn_false_misses: off
do_ios: yes
world_type: Polygraph
world_id: 8230740.616127271:2
world_urls: <none>
unique_urls: -1
rep_cachable: -1.00
dhr: -1.00
pop_model: zipf()
tmp_loc: <none>
tmp_loc_delta: 1
tmp_loc_depth: 500000
prefilled_cnt: -1
920576418.633391| FDs: 4096 out of 4096 FDs can be used; safeguard limit: 3962
920576418.633391| run-id: 8230740.1742953255:2 pid: 23335
920576418.638494| waiting for replies; goal: 100:<none>:-1
920576418.851049| p-warm 10 45.94 0.00 0
920576419.642209| i-meas 40 39.85 0.00 0 10
920576420.642712| i-meas 91 50.97 0.00 0 10
920576420.656397| p-meas 100 49.85 0.00 0
920576420.656397| progress: 100:2.017 sec:0; goal: 100:<none>:-1
920576420.682606| got 100 xactions and 0 errors
920576420.682606| shutdown reason: goal is satisfied
920576420.682606| p-cool 100 0.00 -1.00 0
Note that we had to manually terminate the server because we did not specify a goal on the server side.
The errors at the end of the polysrv output are normal for this kind of
experiment. Polyclients do not wait for all requests to finish before they
terminate, causing connections to be reset on the server side.
3. Constant Request Rate
Here is a more complex example featuring a ``Constant Request Rate'' stream of 100 req/sec. We run the test for 30 seconds and log the results into binary logs.
pail> ./polysrv --idle_tout 10sec --port 8080 --verb_lvl 3 -log /tmp/ts
920577911.124044| Command: ./polysrv --idle_tout 10sec --port 8080 --verb_lvl 3 -log /tmp/ts
920577911.124044| Configuration:
verb_lvl: 3
prn_reqs: off
prn_reps: off
fd_limit: 3962
console: -
log: /tmp/ts
log_size: 10485760
linger_tout: <none>
nagle: on
xact_think: <none>
goal: -1:<none>:-1
rng_seed: 1
port: 8080
accept_lmt: -1
idle_tout: 10.000 sec
rep_sz: exp(13312.00)
920577911.124044| FDs: 4096 out of 4096 FDs can be used; safeguard limit: 3962
920577911.124044| run-id: 8232233.574708573:2 pid: 23389
920577911.171373| waiting for requests; goal: -1:<none>:-1
920577914.071563| i-warm 0 0.00 -1.00 0 2
920577915.082015| i-warm 37 36.62 -1.00 0 14
920577916.084734| i-warm 95 57.84 -1.00 0 3
920577917.085527| i-warm 148 52.96 -1.00 0 3
920577918.088631| i-warm 188 39.88 -1.00 0 6
920577919.096392| i-warm 250 61.52 -1.00 0 6
920577920.099315| i-warm 307 56.83 -1.00 0 3
920577921.120005| i-warm 361 52.91 -1.00 0 6
920577922.120463| i-warm 413 51.98 -1.00 0 3
920577923.170283| i-warm 458 42.86 -1.00 0 4
920577924.219982| i-warm 505 44.77 -1.00 0 6
920577925.250005| i-warm 554 47.57 -1.00 0 11
920577926.281487| i-warm 620 63.99 -1.00 0 12
920577927.281743| i-warm 671 50.99 -1.00 0 9
920577928.283166| i-warm 717 45.93 -1.00 0 16
920577929.291038| i-warm 788 70.45 -1.00 0 4
920577930.291387| i-warm 844 55.98 -1.00 0 1
920577931.310172| i-warm 898 53.00 -1.00 0 3
920577932.330343| i-warm 952 52.93 -1.00 0 2
920577933.340290| i-warm 1001 48.52 -1.00 0 2
920577934.370021| i-warm 1045 42.73 -1.00 0 7
920577935.370037| i-warm 1102 57.00 -1.00 0 7
920577936.481894| i-warm 1156 48.57 -1.00 0 4
920577937.487286| i-warm 1204 47.74 -1.00 0 4
920577938.488181| i-warm 1249 44.96 -1.00 0 7
920577939.489089| i-warm 1299 49.95 -1.00 0 3
920577940.491603| i-warm 1358 58.85 -1.00 0 6
920577941.560595| i-warm 1410 48.64 -1.00 0 2
920577942.660601| i-warm 1454 40.00 -1.00 0 7
920577943.661225| i-warm 1502 47.97 -1.00 0 11
920577944.087602| was idle for at least 10.000 sec
920577944.087602| server closing listen socket 4 on port 8080
920577954.091854| got 1540 xactions and 0 errors
920577954.091854| shutdown reason: inactivity timeout
920577954.091854| p-warm 1540 35.84 -1.00 0
And here is the client options/output:
pail> ./polyclt --robots 1 --req_rate 50/sec --goal 0.5min --verb_lvl 3 -log /tmp/tc
920577914.041128| Command: ./polyclt --robots 1 --req_rate 50/sec --goal 0.5min --verb_lvl 3 -log /tmp/tc
920577914.041128| Configuration:
verb_lvl: 3
prn_reqs: off
prn_reps: off
fd_limit: 3962
console: -
log: /tmp/tc
log_size: 10485760
linger_tout: <none>
nagle: on
xact_think: <none>
goal: -1:30.000 sec:-1
rng_seed: 1
origin: localhost:8080
proxy: 127.0.0.1:8080
abs_urls: on
ports: <none>
conn_pool: -1
conn_pool_dyn: off
launch_win: <none>
cool_phase: <none>
robots: 1
req_rate: 50.00/sec
ign_false_hits: off
prn_false_misses: off
do_ios: yes
world_type: Polygraph
world_id: 8232236.1083202398:2
world_urls: <none>
unique_urls: -1
rep_cachable: -1.00
dhr: -1.00
pop_model: zipf()
tmp_loc: <none>
tmp_loc_delta: 1
tmp_loc_depth: 500000
prefilled_cnt: -1
920577914.041128| FDs: 4096 out of 4096 FDs can be used; safeguard limit: 3962
920577914.041128| run-id: 8232236.379673438:2 pid: 23390
920577914.051641| waiting for replies; goal: -1:30.000 sec:-1
920577915.059358| i-warm 37 36.72 0.00 0 13
920577916.081335| i-warm 91 52.84 0.00 0 6
920577917.081532| i-warm 141 49.99 0.00 0 9
920577917.081532| p-warm 142 46.70 0.00 0
920577918.082085| i-meas 179 37.98 0.00 0 15
920577919.082600| i-meas 239 59.97 0.00 0 17
920577920.083680| i-meas 292 52.94 0.00 0 17
920577921.084100| i-meas 353 60.97 0.00 0 10
920577922.084297| i-meas 404 50.99 0.00 0 10
920577923.084833| i-meas 449 44.98 0.00 0 11
920577924.085020| i-meas 495 45.99 0.00 0 11
920577925.085227| i-meas 547 51.99 0.00 0 8
920577926.089791| i-meas 613 65.70 0.00 0 9
920577927.092433| i-meas 665 51.86 0.00 0 9
920577928.099356| i-meas 717 51.64 0.00 0 3
920577929.149378| i-meas 782 61.90 0.00 0 4
920577930.152517| i-meas 833 50.84 0.00 0 5
920577931.199354| i-meas 888 52.54 0.00 0 5
920577932.209356| i-meas 938 49.50 0.00 0 10
920577933.249356| i-meas 993 52.88 0.00 0 8
920577934.250358| i-meas 1034 40.96 0.00 0 11
920577935.259358| i-meas 1090 55.50 0.00 0 12
920577936.261172| i-meas 1145 54.90 0.00 0 11
920577937.282163| i-meas 1188 42.12 0.00 0 13
920577938.289496| i-meas 1232 43.68 0.00 0 13
920577939.289699| i-meas 1289 56.99 0.00 0 6
920577940.290005| i-meas 1338 48.99 0.00 0 14
920577941.309364| i-meas 1401 61.80 0.00 0 3
920577942.329360| i-meas 1446 44.12 0.00 0 2
920577943.349359| i-meas 1496 49.02 0.00 0 3
920577944.069353| progress: 1528:30.017 sec:0; goal: -1:30.000 sec:-1
920577944.074835| got 1528 xactions and 0 errors
920577944.074835| shutdown reason: goal is satisfied
920577944.074835| p-meas 1528 51.35 0.00 0
Note that this time the server terminated after a specified inactivity timeout.
The binary logs created during the last test can be viewed with the
lr or ``Log Reader'' tool included in the Poly distribution.
$Id: simple.sml,v 1.5 1999/07/25 20:32:56 rousskov Exp $