Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Sqlite cache file size vs. server response time Rate Topic   - - - - -

 
  • chris102
  • Member
  • Members
  • Join Date: 17-Sep 11
  • 49 posts

Posted 27 July 2013 - 10:01 AM #1

Hi Guys,

I turned on the SQLite cache method in config.local.php
Everything works fine until the cache database file var/cache/registry/cache.db gets as big as 300-400 MB

Then when checking site performance with gtmetrix I get the server response time of 5 to 9s! from which most of the time is "waiting". It seems that server reads the cache file every time the page is loaded or refreshed. In this case theoretically worse "file" cashing method works better for me than recommended by most of you SQLite method.

Do you have any ideas what might be wrong? Is it insufficient server RAM?
Does SQLite cache file get so heavy in your stores, too?

Is there any way to limit the size of the cache file?
I set @ini_set('memory_limit', '128M'); but it doesn't help.

Thanx,

Chris

4.5.1


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11358 posts

Posted 28 July 2013 - 12:50 AM #2

That's pretty big. How many languages do you have active? How many filters/features? These all contribute, but 3-400MB is pretty big for the cache. You might try clearing it periodically to get a fresh start.

Also, what version?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • chris102
  • Member
  • Members
  • Join Date: 17-Sep 11
  • 49 posts

Posted 28 July 2013 - 09:52 AM #3

We have 3 languages in 2 storefronts.
44 features, 14 filters, but we actually intend to have much more.
Version as in the signature 3.0.6 ULT.

I turned back to "file" caching method couple of days ago and it seems to work much better than SQLite.
Pages are loading much faster and the server response time is at most 1s and not 6-12s.

4.5.1


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11358 posts

Posted 28 July 2013 - 05:33 PM #4

"file" type caching has been greatly improved with distribution among various sub-directories for different objects. Be curious what the total size of your cache directory is for the registry is after a bit of runtime like in:
# du -bs var/cache/registry

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • chris102
  • Member
  • Members
  • Join Date: 17-Sep 11
  • 49 posts

Posted 30 July 2013 - 03:40 PM #5

After couple of days 104 824 directories in var/cache/registry !!!
Filters: 104 782
Others: 42

Each directory has at least two subdirectories store 1 and store 2.

4.5.1


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11358 posts

Posted 30 July 2013 - 06:58 PM #6

So I'm guessing performance has been maintained. Number of directories is not important, but total size of the var/cache/registry would be the comparison with SQLITE.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • profs77
  • Member
  • Members
  • Join Date: 26-Sep 12
  • 21 posts

Posted 09 August 2013 - 04:22 PM #7

The number of directories or files in a single directory is important. Thats why the images are stored in different folders 1, 2, 3, 4, etc with a maximum of 1000 or whatever you set it to. With so many files/folders in one directory the index becomes very large.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11358 posts

Posted 09 August 2013 - 07:24 PM #8

My point was that dispersing the info across multiple directories when using the file cache improves performance from the way it used to be where the whole registry cache was one giant file. What "index" are you talking about?

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 28 August 2013 - 08:25 AM #9

The "file cache" method is the fastest since the version 3.x.

CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider