Re: Performance tuning

Splash Forums Rewrite Users Performance tuning Re: Performance tuning

#22995

pavel.arnost
Participant

Time per request drops from 25 ms to 22 ms, so improvement is there.

To test “link” performance, just add 10 links to the top <h:body> in /task/list.html file:

<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name1" />
<f:param name="categoryName" value="category-name1" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name2" />
<f:param name="categoryName" value="category-name2" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name3" />
<f:param name="categoryName" value="category-name3" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name4" />
<f:param name="categoryName" value="category-name4" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name5" />
<f:param name="categoryName" value="category-name5" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name6" />
<f:param name="categoryName" value="category-name6" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name7" />
<f:param name="categoryName" value="category-name7" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name8" />
<f:param name="categoryName" value="category-name8" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name9" />
<f:param name="categoryName" value="category-name9" />
</h:link>
<h:link value="link" outcome="/task/list.html">
<f:param name="regionName" value="region-name10" />
<f:param name="categoryName" value="category-name10" />
</h:link>

Without rewrite I get:

ab -n 1000 -c 30 -k http://localhost/rewritetest/task/list.html?regionName=region-name&categoryNam
e=category-name

Concurrency Level:      30
Time taken for tests: 0.891 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000
Total transferred: 6974000 bytes
HTML transferred: 6651000 bytes
Requests per second: 1122.81 [#/sec] (mean)
Time per request: 26.719 [ms] (mean)
Time per request: 0.891 [ms] (mean, across all concurrent requests)
Transfer rate: 7646.93 [Kbytes/sec] received

and with rewrite:

ab -n 1000 -c 30 -k http://localhost/rewritetest/region-name/category-name

Concurrency Level:      30
Time taken for tests: 5.891 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 1000
Total transferred: 6545000 bytes
HTML transferred: 6221000 bytes
Requests per second: 169.76 [#/sec] (mean)
Time per request: 176.719 [ms] (mean)
Time per request: 5.891 [ms] (mean, across all concurrent requests)
Transfer rate: 1085.05 [Kbytes/sec] received

It’s 27 ms without rewrite vs. 177 ms with rewrite.