Commit 8e3bcecf authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Try to test the object alloc / LRU / Nuke / beresp.storage hinting

parent d244202b
varnishtest "Object/LRU/Stevedores"
server s1 {
rxreq
txresp -bodylen 1048100
rxreq
txresp -bodylen 1048101
rxreq
txresp -bodylen 1048102
rxreq
txresp -bodylen 1048103
rxreq
txresp -bodylen 1048104
} -start
varnish v1 -storage "-smalloc,1m -smalloc,1m, -smalloc,1m" -vcl+backend {
sub vcl_fetch {
set beresp.storage = "invalid";
}
} -start
client c1 {
txreq -url /foo
rxresp
expect resp.status == 200
expect resp.bodylen == 1048100
} -run
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes == 0
varnish v1 -expect SMA.s0.g_space > 1000000
varnish v1 -expect SMA.s1.g_bytes > 1000000
varnish v1 -expect SMA.s1.g_space < 100
varnish v1 -expect SMA.s2.g_bytes == 0
varnish v1 -expect SMA.s2.g_space > 1000000
client c1 {
txreq -url /bar
rxresp
expect resp.status == 200
expect resp.bodylen == 1048101
} -run
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes == 0
varnish v1 -expect SMA.s0.g_space > 1000000
varnish v1 -expect SMA.s1.g_bytes > 1000000
varnish v1 -expect SMA.s1.g_space < 100
varnish v1 -expect SMA.s2.g_bytes > 1000000
varnish v1 -expect SMA.s2.g_space < 100
client c1 {
txreq -url /burp
rxresp
expect resp.status == 200
expect resp.bodylen == 1048102
} -run
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes > 1000000
varnish v1 -expect SMA.s0.g_space < 100
varnish v1 -expect SMA.s1.g_bytes > 1000000
varnish v1 -expect SMA.s1.g_space < 100
varnish v1 -expect SMA.s2.g_bytes > 1000000
varnish v1 -expect SMA.s2.g_space < 100
client c1 {
txreq -url /foo1
rxresp
expect resp.status == 200
expect resp.bodylen == 1048103
} -run
varnish v1 -expect n_lru_nuked == 1
client c1 {
txreq -url /foo
rxresp
expect resp.status == 200
expect resp.bodylen == 1048104
} -run
varnish v1 -expect n_lru_nuked == 2
varnishtest "Object/LRU/Stevedores with hinting"
server s1 {
rxreq
txresp -bodylen 1048100
rxreq
txresp -bodylen 1048101
rxreq
txresp -bodylen 1048102
} -start
varnish v1 -storage "-smalloc,1m -smalloc,1m, -smalloc,1m" -vcl+backend {
sub vcl_fetch {
set beresp.storage = "s0";
}
} -start
client c1 {
txreq -url /foo
rxresp
expect resp.status == 200
expect resp.bodylen == 1048100
} -run
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes > 1000000
varnish v1 -expect SMA.s0.g_space < 100
varnish v1 -expect SMA.s1.g_bytes == 0
varnish v1 -expect SMA.s1.g_space > 1000000
varnish v1 -expect SMA.s2.g_bytes == 0
varnish v1 -expect SMA.s2.g_space > 1000000
client c1 {
txreq -url /bar
rxresp
expect resp.status == 200
expect resp.bodylen == 1048101
} -run
varnish v1 -expect n_lru_nuked == 1
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes > 1000000
varnish v1 -expect SMA.s0.g_space < 100
varnish v1 -expect SMA.s1.g_bytes == 0
varnish v1 -expect SMA.s1.g_space > 1000000
varnish v1 -expect SMA.s2.g_bytes == 0
varnish v1 -expect SMA.s2.g_space > 1000000
client c1 {
txreq -url /foo
rxresp
expect resp.status == 200
expect resp.bodylen == 1048102
} -run
varnish v1 -expect n_lru_nuked == 2
varnish v1 -expect SMA.Transient.g_bytes == 0
varnish v1 -expect SMA.s0.g_bytes > 1000000
varnish v1 -expect SMA.s0.g_space < 100
varnish v1 -expect SMA.s1.g_bytes == 0
varnish v1 -expect SMA.s1.g_space > 1000000
varnish v1 -expect SMA.s2.g_bytes == 0
varnish v1 -expect SMA.s2.g_space > 1000000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment