Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb. 08, 2012, 06:00:49 AM
55065 Posts in 12346 Topics by 65558 Members
Latest Member: gentle_dental
News:
 
The PRADO Community » Prado v3.x » General Discussion » Some words about caching, especially TOuputCache « previous next »
Pages: [1] Print
Author Topic: Some words about caching, especially TOuputCache  (Read 1300 times)
schmunk
PRADO Supporter
Platinum Member
*

Karma: 17
Offline Offline

Posts: 505


Google Ron Paul


View Profile WWW
« on: Sep. 07, 2007, 11:14:08 AM »

Hi all,

I just wanted to share my experience about caching with you.

We've a dedicated server with several websites, serving a total of about 150-200 GB a month and we made extensive use of TOuputCache.

First our cache-module was SQLite, which worked fine while developing, but when it came to traffic peaks our whole server screwed up - the last thing I saw before a manual reset was a load of 162(!) Shocked The problem is that SQLite locks the database (file) for every read or write access to the database, whichs results in a, let's say, permanently locked database.

Then we switched to TMySQLCache. Seemed fine for a few minutes, but then MySQL had a problem with "Too many connections ...". Pretty much the same problem like with SQLite.

After that we used TAPCCache, but our cache size was too small, we had a cache-hit-ratio below 50%. APC was very busy writing into the cache and right afterwards deleting it Sad This caused a lot segmentation faults.

The solution was to raise the APC cache limit from 30 MB to 90 MB which resultet in a 99% cache-hit-ratio and no further problems.

IMHO, it's not possible to run a high traffic website with TOuputCache with anything other than a great enough byte-code or memory cache.

Anyone made the same experiences?

Best regards,
schmunk
Logged

lithron & phundament - components for PRADO 3
http://sourceforge.net/projects/lithron
http://www.phundament.com
Qiang
PRADO Team Leader
Administrator
Diamond Member
*****

Karma: 99
Offline Offline

Posts: 3241



View Profile
« Reply #1 on: Sep. 07, 2007, 11:48:49 AM »

Thank you very much for sharing this precious experience. I will add this to quickstart.

What is RPS of your sever?
Logged
schmunk
PRADO Supporter
Platinum Member
*

Karma: 17
Offline Offline

Posts: 505


Google Ron Paul


View Profile WWW
« Reply #2 on: Sep. 07, 2007, 02:10:34 PM »

Our Server is a AMD Athlon 64 3700+ with 1 GB RAM, APC enabled

with ab -n 100~200 -c 5~10

http://snowball.centurion.de/Home 3.5-5 req/sec
http://www2.merida-bikes.com/de_DE/DE 2-3 req/sec

Thanks for not testing our server again  Wink

[edit] Both pages built on top of phundament, PRADO & propel, using SQLite and MySQL Databases.
« Last Edit: Sep. 07, 2007, 02:12:19 PM by schmunk » Logged

lithron & phundament - components for PRADO 3
http://sourceforge.net/projects/lithron
http://www.phundament.com
Pages: [1] Print 
« previous next »
Jump to: