Cyborgcow.NetCyborgcow.net SupportSupport & Help (Moderator: rayray)Topic: We're trying mod_disk_cache instead of mod_mem_cache
Pages: [1]   Go Down
Print
Author Topic: We're trying mod_disk_cache instead of mod_mem_cache  (Read 3298 times)
0 Members and 1 Guest are viewing this topic.
rayray
Administrator
Hathor the Cow God
*****

Karma: 2
Offline Offline

Posts: 946



View Profile WWW
« on: August 11, 2008, 05:41:58 PM »

Since mod_mem_cache is per process, its limited to having stale pages only as long as it is kept alive. Disk cache could have incredible performance increases, however it could make pages so stale that nothing is usable....

But for the name of science, lets give it a whirl!

http://www.ircache.net/cgi-bin/cacheability.py

http://www.opensourcetesting.org/performance.php

http://httpd.apache.org/docs/2.2/caching.html
http://httpd.apache.org/docs/2.2/mod/mod_mem_cache.html
http://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html

Logged

Moo, says I
rayray
Administrator
Hathor the Cow God
*****

Karma: 2
Offline Offline

Posts: 946



View Profile WWW
« Reply #1 on: August 11, 2008, 07:36:52 PM »

on hardcoredreamer.com only so far. pulling 10,000 random pages took 14.776363 seconds with mod_disk_cache.

without, pulling 1,000 pages (because it took so long to do, I dont want to try 10,000)  Time taken for tests:   2413.593134 seconds

Code:
<IfModule mod_disk_cache.c>
CacheDirLength 4
CacheDirLevels 5
CacheMaxFileSize 64000
CacheMinFileSize 64
CacheRoot /var/extra/modcache
</IfModule>

Server Software:        Apache
Server Hostname:        www.hardcoredreamer.com
Server Port:            80

Document Path:          /gallery/random?g2_albumId=7
Document Length:        16186 bytes

Concurrency Level:      1
Time taken for tests:   14.776363 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      164180000 bytes
HTML transferred:       161860000 bytes
Requests per second:    676.76 [#/sec] (mean)
Time per request:       1.478 [ms] (mean)
Time per request:       1.478 [ms] (mean, across all concurrent requests)
Transfer rate:          10850.57 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       7
Processing:     1    1   0.6      1      56
Waiting:        0    0   1.1      1      56
Total:          1    1   0.7      1      56

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      2
  98%      2
  99%      3
 100%     56 (longest request)

Code:
Server Software:        Apache
Server Hostname:        www.hardcoredreamer.com
Server Port:            80

Document Path:          /gallery/random?g2_albumId=7
Document Length:        16064 bytes

Concurrency Level:      1
Time taken for tests:   2413.593134 seconds
Complete requests:      1000
Failed requests:        997
   (Connect: 0, Length: 997, Exceptions: 0)
Write errors:           0
Total transferred:      16019399 bytes
HTML transferred:       15820399 bytes
Requests per second:    0.41 [#/sec] (mean)
Time per request:       2413.593 [ms] (mean)
Time per request:       2413.593 [ms] (mean, across all concurrent requests)
Transfer rate:          6.48 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:  1479 2413 650.9   2268    7380
Waiting:     1474 2404 648.5   2261    7368
Total:       1479 2413 650.9   2268    7380

Percentage of the requests served within a certain time (ms)
  50%   2268
  66%   2394
  75%   2486
  80%   2564
  90%   2928
  95%   3505
  98%   4916
  99%   5841
 100%   7380 (longest request)
Logged

Moo, says I
lucid
Cool Cows
Hathor the Cow God
*****

Karma: 0
Offline Offline

Posts: 898


beware the humbug


View Profile
« Reply #2 on: August 13, 2008, 01:35:30 AM »

So you made it a hundred times faster?
Logged

There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy
rayray
Administrator
Hathor the Cow God
*****

Karma: 2
Offline Offline

Posts: 946



View Profile WWW
« Reply #3 on: August 13, 2008, 03:42:10 AM »

well I'm only trying it for the hardcoredreamer gallery, and it made it about 2,500 times faster or better... I'm going to need to get reports back from people about any problems with stale pages before I implement it on a larger scale.

It will store php pages after they have been generated, so accessing the gallery bypasses mysql and php. Plus, the cache is on the second drive, which has less i/o
Logged

Moo, says I
lucid
Cool Cows
Hathor the Cow God
*****

Karma: 0
Offline Offline

Posts: 898


beware the humbug


View Profile
« Reply #4 on: August 13, 2008, 03:51:37 AM »

oh, hence the stale pages comment. I get it.  Grin
Logged

There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy
rayray
Administrator
Hathor the Cow God
*****

Karma: 2
Offline Offline

Posts: 946



View Profile WWW
« Reply #5 on: August 13, 2008, 04:16:03 AM »

I had mod_mem_cache working server-wide. I think it did improve pages quite a bit and I think I'll use it again, although it only cached the last few seconds of pages, it made browsing around where you've been super fast
Logged

Moo, says I
Pages: [1]   Go Up
Print
Cyborgcow.NetCyborgcow.net SupportSupport & Help (Moderator: rayray)Topic: We're trying mod_disk_cache instead of mod_mem_cache
Jump to: