vBulletin Guest Cache with LiteSpeed

eva2000

Well-Known Member
#21
Update trying this on my local test install vB 3.8.6 PL1 at 192.168.56.101/index.php where user prefix cookie in config.php changed from bb to zz.

Installed product-boostv1.xml‎ from vbulletin.com blog

.htaccess

Code:
RewriteEngine on
#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule /forum/(.*)$ http://www.domain.com/forum/$1 [R=301,L]

RewriteCond %{HTTP_COOKIE} !zzimloggedin=yes
RewriteCond %{HTTP_COOKIE} !zzuserid=
RewriteCond %{HTTP_COOKIE} !zzpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteRule /(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
litespeed 4.0.19 cache policy

Code:
Enable Cache:No
Cache Request with Query String:Yes
Cache Request with Cookie:Yes
Cache Response with Cookie:Yes
Ignore Request Cache-Control:Yes
Ignore Response Cache-Control:Yes
apache httpd.conf contains

Code:
#disk cache
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheRoot /lscache/   
#CacheEnable disk /  
</IfModule>
</IfModule>
unfortunately not seeing any caching being done ?

index.php

Code:
curl -I 192.168.56.101/index.php
HTTP/1.1 200 OK
Date: Tue, 25 Jan 2011 14:20:25 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
X-Powered-By: PHP/5.3.5
Cache-Control: private
Pragma: private
Content-Type: text/html; charset=ISO-8859-1
X-UA-Compatible: IE=7
Set-Cookie: zzlastvisit=1295965225; expires=Wed, 25-Jan-2012 14:20:25 GMT; path=/
Set-Cookie: zzlastactivity=0; expires=Wed, 25-Jan-2012 14:20:25 GMT; path=/
Set-Cookie: zzimloggedin=deleted; expires=Mon, 25-Jan-2010 14:20:24 GMT; path=/
calendar.php

Code:
curl -I 192.168.56.101/calendar.php
HTTP/1.1 200 OK
Date: Tue, 25 Jan 2011 14:23:08 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
X-Powered-By: PHP/5.3.5
Cache-Control: private
Pragma: private
Content-Type: text/html; charset=ISO-8859-1
X-UA-Compatible: IE=7
Set-Cookie: zzlastvisit=1295965388; expires=Wed, 25-Jan-2012 14:23:08 GMT; path=/
Set-Cookie: zzlastactivity=0; expires=Wed, 25-Jan-2012 14:23:08 GMT; path=/
Set-Cookie: zzimloggedin=deleted; expires=Mon, 25-Jan-2010 14:23:07 GMT; path=/
Set-Cookie: zzcalendar=73b76532bddaadc3d4641a679a7a864d54659493a-1-%7Bs-7-.calyear._i-2011_%7D; path=/
Set-Cookie: zzcalendar=a8c9af9110b7d9bdc2ae7d1b37fbcf3dd53a84bfa-2-%7Bs-7-.calyear._i-2011_s-8-.calmonth._i-1_%7D; path=/
Set-Cookie: zzcalendar=5c26fff35c941f4c0da6757b2b77682c241d1d2aa-3-%7Bs-7-.calyear._i-2011_s-8-.calmonth._i-1_s-8-.calview1._s-12-.displaymonth._%7D; path=/
Code:
[root@localhost lscache]# ls -alhR
.:
total 12K
drwxrwxrwx  2 nobody nobody 4.0K Jan 25 00:09 .
drwxr-xr-x 28 root   root   4.0K Jan 25 21:58 ..
Not sure if xml plugin code and vB 3.8.6 PL1 has anything different from litespeed testing this on this forum vB 3.8.4.
 
#22
Not sure if xml plugin code and vB 3.8.6 PL1 has anything different
please login your vBulletin, see if cookie "zzimloggedin=yes" exist. then logout, check it again.

"curl -I" won't trigger lsws to generate cache. please pull out its content using browser or wget/curl.
 

eva2000

Well-Known Member
#23
please login your vBulletin, see if cookie "zzimloggedin=yes" exist. then logout, check it again.

"curl -I" won't trigger lsws to generate cache. please pull out its content using browser or wget/curl.
Yes same in firefox browser logged in zzimloggedin=yes exists. The /lscache isn't populated even for guest viewing via browser. Will try again and see.
 

eva2000

Well-Known Member
#25
Okay as NiteWave requested i tried removing CacheRoot /lscache/ from httpd.conf and only use litespeed admin console set /lscache for cache path and now ndex.php isn't cached but test.php is still cached.

logged out of forums with cookies deleted

index.php firefox firebug reported headers for

index.php

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Transfer-Encoding	chunked
Date	Wed, 26 Jan 2011 14:02:32 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-Powered-By	PHP/5.3.5
Content-Type	text/html; charset=ISO-8859-1
Cache-Control	private
Pragma	private
Set-Cookie	zzlastactivity=0; expires=Thu, 26-Jan-2012 14:02:32 GMT; path=/ zzimloggedin=deleted; expires=Tue, 26-Jan-2010 14:02:31 GMT; path=/

for test.php

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Date	Wed, 26 Jan 2011 14:27:05 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-LiteSpeed-Cache	hit
Content-Length	79
X-Powered-By	PHP/5.3.5
CurrentTime	Wed, 26 Jan 2011 14:26:59 GMT
Content-Type	text/html; charset=UTF-8
headers reported from curl in ssh

Code:
curl -I 192.168.56.101/index.php
HTTP/1.1 200 OK
Date: Wed, 26 Jan 2011 14:01:51 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
X-Powered-By: PHP/5.3.5
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: private
Pragma: private
Set-Cookie: zzlastvisit=1296050511; expires=Thu, 26-Jan-2012 14:01:51 GMT; path=/
Set-Cookie: zzlastactivity=0; expires=Thu, 26-Jan-2012 14:01:51 GMT; path=/
Set-Cookie: zzimloggedin=deleted; expires=Tue, 26-Jan-2010 14:01:50 GMT; path=/
Code:
curl -I 192.168.56.101/test.php
HTTP/1.1 200 OK
Date: Wed, 26 Jan 2011 14:27:37 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Transfer-Encoding: chunked
X-LiteSpeed-Cache: hit
X-Powered-By: PHP/5.3.5
CurrentTime: Wed, 26 Jan 2011 14:26:59 GMT
Content-Type: text/html; charset=UTF-8
and .htaccess used

Code:
RewriteEngine on

RewriteRule test.php - [E=Cache-Control:max-age=45]
RewriteRule hello.php - [E=Cache-Control:max-age=45]

#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule /forum/(.*)$ http://www.domain.com/forum/$1 [R=301,L]

RewriteCond %{HTTP_COOKIE} !zzimloggedin=yes
RewriteCond %{HTTP_COOKIE} !zzuserid=
RewriteCond %{HTTP_COOKIE} !zzpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteRule /(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
cache empty for index.php tests
Code:
[root@localhost html]# ls -alhR /lscache
/lscache:
total 12K
drwxrwxrwx  2 nobody nobody 4.0K Jan 25 00:09 .
drwxr-xr-x 28 root   root   4.0K Jan 26 23:28 ..
headers when logged into index.php

from browser

Code:
Content-Encoding	gzip
Vary	Accept-Encoding
Transfer-Encoding	chunked
Date	Wed, 26 Jan 2011 14:09:18 GMT
Server	LiteSpeed
Connection	Keep-Alive
Keep-Alive	timeout=5, max=100
X-Powered-By	PHP/5.3.5
Content-Type	text/html; charset=ISO-8859-1
Cache-Control	private
Pragma	private
Set-Cookie	zzimloggedin=yes; path=/; HttpOnly
where do you enable rewrite logging ? the server logs have something though

Code:
2011-01-26 23:49:47.363	ERROR	[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:49:47.363	ERROR	[[HTAccess]] rewrite: invalid rewrite condition while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:57:17.880	INFO	[HTAccess] Updating configuration from [/var/www/html/.htaccess]
2011-01-26 23:57:17.892	ERROR	[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
2011-01-26 23:57:17.892	ERROR	[[HTAccess]] rewrite: invalid rewrite condition while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
 
Last edited:

eva2000

Well-Known Member
#26
test both test.php vs testnocache.php and hello.php vs hellonocache.php and litespeed cache/rewrite works fine

Code:
ab -k -n 10000 -c 10 192.168.56.101/hello.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /hello.php
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   0.379329 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9907
Total transferred:      2516559 bytes
HTML transferred:       120000 bytes
Requests per second:    26362.34 [#/sec] (mean)
Time per request:       0.379 [ms] (mean)
Time per request:       0.038 [ms] (mean, across all concurrent requests)
Transfer rate:          6477.23 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   1.1      0      20
Waiting:        0    0   1.1      0      20
Total:          0    0   1.1      0      20

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      4
  99%      6
 100%     20 (longest request)

[root@localhost html]# ab -k -n 10000 -c 10 192.168.56.101/hellonocache.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /hellonocache.php
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   1.56971 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9904
Total transferred:      2276676 bytes
HTML transferred:       120012 bytes
Requests per second:    9461.00 [#/sec] (mean)
Time per request:       1.057 [ms] (mean)
Time per request:       0.106 [ms] (mean, across all concurrent requests)
Transfer rate:          2103.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     0    0   2.4      0      76
Waiting:        0    0   2.4      0      76
Total:          0    0   2.4      0      76

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      1
  80%      1
  90%      1
  95%      2
  98%      4
  99%      8
 100%     76 (longest request)
[root@localhost html]# ab -k -n 10000 -c 10 192.168.56.101/test.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /test.php
Document Length:        63 bytes

Concurrency Level:      10
Time taken for tests:   0.372096 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9905
Total transferred:      3466245 bytes
HTML transferred:       630000 bytes
Requests per second:    26874.79 [#/sec] (mean)
Time per request:       0.372 [ms] (mean)
Time per request:       0.037 [ms] (mean, across all concurrent requests)
Transfer rate:          9097.11 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   1.2      0      22
Waiting:        0    0   1.2      0      22
Total:          0    0   1.2      0      22

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      3
  99%      6
 100%     22 (longest request)
[root@localhost html]# ab -k -n 10000 -c 10 192.168.56.101/testnocache.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /testnocache.php
Document Length:        63 bytes

Concurrency Level:      10
Time taken for tests:   1.56831 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9905
Total transferred:      3226485 bytes
HTML transferred:       630000 bytes
Requests per second:    9462.25 [#/sec] (mean)
Time per request:       1.057 [ms] (mean)
Time per request:       0.106 [ms] (mean, across all concurrent requests)
Transfer rate:          2980.61 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   1.3      0      19
Waiting:        0    0   1.3      0      19
Total:          0    0   1.3      0      19

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      1
  80%      1
  90%      1
  95%      2
  98%      4
  99%      5
 100%     19 (longest request)
 
#27
Code:
2011-01-26 23:49:47.363	ERROR	[[HTAccess]] rewrite: '[' is expected while parsing: RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$
there is an extra space(before \.php$) in the rewrite rule.
 

eva2000

Well-Known Member
#28
thanks fixed.. but still index.php ain't caching on my vB 3.8.6 PL1 install

i commented out

Code:
#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule /forum/(.*)$ http://www.domain.com/forum/$1 [R=301,L]
is that okay ? accessing via 192.168.56.101 ?
 
#29
Code:
RewriteRule /(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
since rewrite rule in .htaccess (not in httpd.conf), leading / should be removed. i.e.,
Code:
RewriteRule ^(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
is that okay ? accessing via 192.168.56.101 ?
no problem.
 
Last edited:

eva2000

Well-Known Member
#30
changed it to below seems to be working!

Code:
RewriteEngine on

RewriteRule test.php - [E=Cache-Control:max-age=45]
RewriteRule hello.php - [E=Cache-Control:max-age=45]

#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule /forum/(.*)$ http://www.domain.com/forum/$1 [R=301,L]


RewriteCond %{HTTP_COOKIE} !zzimloggedin=yes
RewriteCond %{HTTP_COOKIE} !zzuserid=
RewriteCond %{HTTP_COOKIE} !zzpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^(login|register|usercp|private|profile|cron|image)\.php$
RewriteCond %{REQUEST_URI} !^admincp
RewriteRule ^(.*\.php)?$ - [L,E=Cache-Control:max-age=120]
Apachebench test of vB 3.8.6 PL1 front page index.php with litespeed cache enabled resulted in a boost from 256.63 rps to 4,334 rps with litespeed cache! Showthread page boost from 183 rps to 22,695 rps. That's >16x times faster for index.php and >123x times faster for showthread page :D

Litespeed cache looking very good for guest visitor caching at least :)

vB 3.8.6 PL1 index.php page - no cache vs cached

  • without litespeed cache = 256.63.68 rps
  • with litespeed cache = 4,334.46 >16x times faster!

Code:
 ab -k -n 10000 -c 10 192.168.56.101/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /index.php
Document Length:        18978 bytes

Concurrency Level:      10
Time taken for tests:   38.966230 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      194240000 bytes
HTML transferred:       189780000 bytes
Requests per second:    256.63 [#/sec] (mean)
Time per request:       38.966 [ms] (mean)
Time per request:       3.897 [ms] (mean, across all concurrent requests)
Transfer rate:          4867.98 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     6   38  29.1     30     231
Waiting:        5   37  29.2     30     230
Total:          6   38  29.1     30     231

Percentage of the requests served within a certain time (ms)
  50%     30
  66%     43
  75%     53
  80%     60
  90%     79
  95%     97
  98%    118
  99%    133
 100%    231 (longest request)

ab -k -n 10000 -c 10 192.168.56.101/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /index.php
Document Length:        21566 bytes

Concurrency Level:      10
Time taken for tests:   2.307090 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      218320000 bytes
HTML transferred:       215660000 bytes
Requests per second:    4334.46 [#/sec] (mean)
Time per request:       2.307 [ms] (mean)
Time per request:       0.231 [ms] (mean, across all concurrent requests)
Transfer rate:          92412.09 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    1   1.5      1      10
Waiting:        0    1   1.4      1      10
Total:          0    1   1.5      1      10

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      2
  75%      2
  80%      3
  90%      3
  95%      4
  98%      5
  99%      6
 100%     10 (longest request)
Testing for showthread.php?t=1 page - no cache vs cached

  • without litespeed cache = 183.68 rps
  • with litespeed cache = 22,695.19 >123x times faster! :cool: :eek:

Code:
ab -k -n 10000 -c 10 192.168.56.101/showthread.php?t=1
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /showthread.php?t=1
Document Length:        24615 bytes

Concurrency Level:      10
Time taken for tests:   54.443197 seconds
Complete requests:      10000
Failed requests:        7912
   (Connect: 0, Length: 7912, Exceptions: 0)
Write errors:           0
Keep-Alive requests:    0
Total transferred:      251393444 bytes
HTML transferred:       246933288 bytes
Requests per second:    183.68 [#/sec] (mean)
Time per request:       54.443 [ms] (mean)
Time per request:       5.444 [ms] (mean, across all concurrent requests)
Transfer rate:          4509.31 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     9   53  36.3     46     335
Waiting:        8   53  36.3     46     334
Total:          9   53  36.3     46     335

Percentage of the requests served within a certain time (ms)
  50%     46
  66%     61
  75%     72
  80%     80
  90%    102
  95%    124
  98%    150
  99%    167
 100%    335 (longest request)
[root@localhost html]# mv lscache.htaccess .htaccess
[root@localhost html]# ab -k -n 10000 -c 10 192.168.56.101/showthread.php?t=1
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests
Code:
ab -k -n 10000 -c 10 192.168.56.101/showthread.php?t=1
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.56.101 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        LiteSpeed
Server Hostname:        192.168.56.101
Server Port:            80

Document Path:          /showthread.php?t=1
Document Length:        24714 bytes

Concurrency Level:      10
Time taken for tests:   0.440622 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9906
Total transferred:      250026522 bytes
HTML transferred:       247140000 bytes
Requests per second:    22695.19 [#/sec] (mean)
Time per request:       0.441 [ms] (mean)
Time per request:       0.044 [ms] (mean, across all concurrent requests)
Transfer rate:          554139.38 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   1.4      0      28
Waiting:        0    0   1.4      0      28
Total:          0    0   1.4      0      28

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      4
  99%      8
 100%     28 (longest request)
 
Last edited:

eva2000

Well-Known Member
#33
not entirely sure but tried vbseo last line like this ?

Code:
RewriteRule ^(.+)$ vbseo.php [L,QSA,E=Cache-Control:max-age=120]
 

eva2000

Well-Known Member
#35
Use firefox browser + firebug addon + firecookie addon, to view your site you are testing. On the cookie tab in firebug check to see you don't have any cookies set on the page you are trying to cache/test/check for cache hit header. If you have cookies set use firecookie to remove all cookies and retest.

Sometimes you'll have cookies set on the domain after you've logged into admincp/vbseo etc.
 

dihuta

Well-Known Member
#37
I did it.
The VBSEO staff said that VBSEO don't use htaccess to rewrite. So there is not really any page was cached. All request will go through vbseo.php.
 

mistwang

LiteSpeed Staff
#38
When I visit vbseo.com, the request header is like
Host: www.vbseo.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://www.vbseo.com/f2/mentions-tab-profiles-47830/
Cookie: bb_languageid=1; bb_; bb_lastvisit=1296797127; bb_lastactivity=0; bb_forum_view=8073b662581c2e2a78176a8f79dfe2138d748bd8a-1-%7Bi-2_i-1296797127_%7D; grvinsights=a431d28d7506cdd1eb9892ffbabce626; __utma=145073395.787512770.1296797132.1296797132.1296797132.1; __utmb=145073395.10.10.1296797132; __utmc=145073395; __utmz=145073395.1296797132.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmv=145073395.usergroup-1-Unregistered%20%2F%20Not%20Logged%20In
If-Modified-Since: Fri, 21 Jan 2011 16:49:40 GMT
If-None-Match: "19aa97f-1c56-49a5e09459100"
cookie value
usergroup-1-Unregistered%20%2F%20Not%20Logged%20In
is interesting, could be used as signature for guest user if all vbseo enabled forums have this cookie.

The rewrite rule should only test request cookies indicating a guest visitor,then mark it as cacheable.
 

dihuta

Well-Known Member
#39
When I visit vbseo.com, the request header is like

cookie value
is interesting, could be used as signature for guest user if all vbseo enabled forums have this cookie.

The rewrite rule should only test request cookies indicating a guest visitor,then mark it as cacheable.
Could you explain in more detail?
Thanks.
 
Top