Jump to content
You are viewing a curated collection of the most significant posts in this topic.

Featured Replies

Posted

Hi Everyone,

We are a new user of Invision, and have setup a private (no guest access) community that will serve a few thousand people.

I have been doing Apache Bench testing while trying to optimise our configuration. What I have noticed is that when I setup Redis (locally on the server) that our benchmark tests actually were consistently slower. Now I did expect there to be overhead of adding another component and caching calls into the mix, but my assumption was that the benefit of caching would surely outweigh this overhead.

This makes me think - is there a trick to getting Redis to work correctly? Have others found if there's even a benefit to running caching for a private community? I can see some of the caching settings are geared towards reducing the load of guests - maybe since we won't have any guests then the majority of caching won't serve any benefit to us?

The environment runs Ubuntu Linux with 16 GB RAM and 4 virtual CPUs. The environment is using Nginx with PHP 7.4 FPM. What I saw in my testing was that without caching, we were bottlenecked by the 4x CPU cores, and after enabling Redis we were _still_ bottle necked by CPU of the FPM processes, with the addition of Redis now using some of that CPU but not offering any real benefit, hence the slowdown.

For what it's worth, I did confirm Redis was storing _some_ data, though not much (see below). Any advice on how to get some benefit from caching in a private community would be appreciated.

When doing my benchmark I was doing a test against the front page of the forum, with a summary of all the forum posts on it figuring this was a reasonably intensive workload to benchmark against (I built a request using Chrome dev tools to make sure my AB requests would be authenticated).  

 

127.0.0.1:6379> KEYS *
 1) "XXXXXXXX_redisStore_lastAccess"
 2) "XXXXXXXX_YYYYYYYYYYY_str__modules"
 3) "XXXXXXXX_redisKey_store"
 4) "XXXXXXXX_YYYYYYYYYYY_str__bannedIpAddresses"
 5) "XXXXXXXX_YYYYYYYYYYY_str__javascript_file_map"
 6) "XXXXXXXX_YYYYYYYYYYY_str__settings"
 7) "XXXXXXXX_YYYYYYYYYYY_str__themes"
 8) "XXXXXXXX_YYYYYYYYYYY_str__javascript_map"
 9) "XXXXXXXX_YYYYYYYYYYY_str__languages"
10) "XXXXXXXX_YYYYYYYYYYY_str__acpNotifications"
11) "XXXXXXXX_YYYYYYYYYYY_str__applications"
12) "XXXXXXXX_YYYYYYYYYYY_str__furl_configuration"
13) "XXXXXXXX_YYYYYYYYYYY_str__rssFeeds"
14) "XXXXXXXX_YYYYYYYYYYY_str__cms_databases"
15) "XXXXXXXX_YYYYYYYYYYY_str__groups"
16) "XXXXXXXX_YYYYYYYYYYY_str__storageConfigurations"
17) "XXXXXXXX_YYYYYYYYYYY_str__cms_fieldids_1"
127.0.0.1:6379> quit

Thanks,

Rhys.

  • 3 weeks later...
  • Replies 55
  • Views 3.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • It's always fun to read through 1,400 lines of code to find hidden settings. Ever thought of making simple check boxes for these options, with the explanations, in the Admin CP? I guess I'm just old f

  • Yes

  • sadams101
    sadams101

    I don't use Nginx or a cloud server, but why bother even caching it if you only cache it for 1 minute, or 30 seconds? What is the point? The cache output for guests is to reduce resources. I assume th

Posted Images

My ACP view with Redis on looks like this...not sure why cache says 0

image.thumb.png.126cd1294c60b2e77e5e4137c37dbfcc.png

 

My settings are like this:

image.thumb.png.3a1622a050a346b3ec40d939cca20a46.png

I don't use Nginx or a cloud server, but why bother even caching it if you only cache it for 1 minute, or 30 seconds? What is the point? The cache output for guests is to reduce resources. I assume the cached pages are created, for example, when bots crawl pages, or user do. When other request a page that has been visited in the last 15 minutes, in my case, they will get a cached version. I this is set to only 1 minute, the likely hood of serving a cached page is pretty small I think.

@sadams101, how big/active is your community? Mine is medium size, but the amount used by redis look really small. 

image.thumb.png.4df9ba02f8d32fcb3c85acfa5d44cf7e.png

500k posts ,200 online at active hours.

 

  • 2 weeks later...

I am still running redis, but have turned off the "Cache page output for guests" feature (mine was set to 15 minutes) due to a bug with it that still exists. My site speed consultant @Adlago has also experienced the bug, and warned me not to use this feature. What happens is that the cache gets corrupted, for example it will cache a desktop version of the site with zero CSS, so the user experience is horrible, at least for that 15 minutes.

I was hoping the bug was fixed, but while I was running some speed tests I found proof that it still exists. In screen 1 is a normal speed test, and if you look at the test there is a screen shot of the page as it should look, and in screen 2 if you look at the screen shot it took of my site you will see a view of it without any CSS. Clearing my cache in the ACP: Support > Something isn't working right, made this go back to normal, and verify that it is indeed an issue.

Although it did speed my site up by ~10%, it is not worth the trade off. It's sad that a bug like this, one that I reported to IPB years ago, still makes this feature unusable.

Screen 1 speed test with normal screen shot view:

image.thumb.png.1f7ee5fda2636bdd42bf46e56bce6045.png

 

Screen 2 of a test on the exact same page, but in this one there is no CSS that got cached, and the screenshot reflects this:

image.thumb.png.1a659def1260f46e315c61cd97c3b106.png

PS - If google's spider is indexing a site without CSS, those pages are excluded from search results. Lot's of pages on your site could get indexed while this issue is occurring.

Edited by sadams101

  • 3 weeks later...
 

@bfarber is this in the bug tracking for a fix?

I haven't seen any specific bug reported here so I'm not sure how to answer the question.

Is IPB ready for php 7.4?  I thought a few things needed to be updated to utilize it correctly and was waiting for 4.5 before moving from 7.3.  If that is the case, maybe that has something to do with it?

Full PHP 7.4 support will be available with 4.5

  • 2 weeks later...

Did an upgrade from Redis v6.0.1 to v6.0.4, now it looks different:

Datastore: 106 - Enabled
Cache: 9119 - Enabled
Sessions: 2564 - Enabled
Topic Views: 35 - Enabled

Expired Keys: 40,894
Keyspace Hits: 1,469,442
Keyspace Misses: 53,760

I am not sure if this has to do with the upgrade or the new install, but now it works better imo.

  • 4 months later...
 

Because it's not an option from the AdminCP, but is an option at the software level. You can review init.php and see all the available constants there with comments explaining what they do.

It's always fun to read through 1,400 lines of code to find hidden settings. Ever thought of making simple check boxes for these options, with the explanations, in the Admin CP? I guess I'm just old fashioned...

  • 4 months later...

Recently Browsing 0

  • No registered users viewing this page.