Hi,
Please tell me which module I can use as cache system for authenticated users but not Authcache (it doesn't work cause the problems with phpbbforum module)?
For anonymous user I use Boost, but it seems not be recommended to enable the normal Drupal caching with Boost, is this right?
At the moment I installed:
Pressflow
Cache Router (via Memcache)
Path alias cache
Locale Cache
Authcache - not working
Another thing, it is good idea to replace Cache Router with Memcache API http://drupal.org/project/memcache?
http://drupal.org/node/1131468
For sessions caching it says:
Note you MUST have a session and a users server set up for memcached sessions to work.
'Localhost: 11215' => 'session',
'Localhost: 11216' => 'users',
I installed Memcache with standard port: 11211. For the sessions and the users I must open the other ports? Or do some specific installation?
Thank you!

Comments
As far as I know, Authcache
As far as I know, Authcache is the only module that works out-of-the-box for authenticated caching. I think there are ways to modify Varnish or even Boost to cache authenticated but my guess is that whatever trouble you experienced with Authcache and phpbbforum would also be experienced with other authenticated caching methods.
Perhaps you could go into more detail about what problems you are having with authcache?
Our website has mainly authenticated users and our setup is quite similar to yours. We have found that memcache does wonders for authenticated traffic. We use pressflow with memcached API.
Here are a couple more tips:
-- Do you have APC installed on your server? This is a must.
-- This may sound too basic but have you set up your .htaccess to serve compressed static files?
-- Are you using a CDN? Drupal's CDN module works out-of-the-box with Pressflow and you can get a pretty affordable package through CDN's like MAXCDN.
As far as your questions regarding cacherouter vs. memcache API -- In the past cacherouter was more configurable than Memcache was (I don't think that Memcache API used to support sessions) but now they seem to do about the same thing. However, if you want to mix in other caches (like caching user variables with APC), then I think you have to use cacherouter to do that. We use Memcache API and it works fine.
We have set up separate ports in memcache for sessions and users. I believe this is what you are supposed to do.
mrwhizkid, You mention that
mrwhizkid,
You mention that your site is mostly authenticated traffic and that memcached has improved the performance of your site.
Do you have any benchmarks available or could give me an idea of requests per second possible?
2000-4000 requests per second is easy with anonymous users, but not many people talk about the dynamic/authenticated experience.
With APC/Memcached I'm only pulling 10-12rps on a mid-level VPS. I saw on a Lullabot video where they got it up to 25 on a beefier computer with naked pressflow. Whats your experience?
Where is the bottleneck and how can this be optimized?
Xdebug/xhprof is the only way to know for sure
Looking at a cache grind from xdebug/xhprof is the only sure way to know what code is slow on your setup. These are some of the more important patches and modules used to speed up logged in users on OUR setup; your experiences will most likely be different. .
Core
Cache module_implements() - On our front page, it cut 300ms off of the page generation time.
Advanced CSS/JS Aggregation - Replace cores aggregation.
File System
use lock.inc instead of a file lock - We are on a NFS so this helped to reduce the load on the NFS drives.
Imageinfo Cache - Gave us a 50% reduction in front page generation time due to NFS issues we had at the time.
Views
Views Optimized() - API module for rewriting certain views queries so they run faster. http://groups.drupal.org/node/154564
views_get_default_view() - race conditions and memory usage - Speed up views a little bit.
Persistent caching for unpack_options() calls from building displays - Cut around 400ms off of our front page time.
With these changes we are currently OK with our back end performance for logged in users, thus my work has recently shifted to front end performance and improving the workflow for our users (ImageField Zip/HTML5 Bulk Upload).
Awesome info mikeytown2.
Awesome info mikeytown2. Thanks for sharing!
Thank you!Perhaps you could
Thank you!
Yes:
http://drupal.org/node/1056726
http://drupal.org/node/918884
But maybe my Authcache doesn't work for another reason, I don't see any "authcacheFooter" JSON object when I save my webpage (from user not admin account). How can I verify that? Maybe something wrong with Pressflow 6 and php 5.3? http://drupal.org/node/967972#comment-3692568 - I saw this solution but I don't know where to add it :( Maybe to misc/drupal.js? I add it but still no see javascript from autcache...
Yes.
No, some drupal modules compress js and css files. It is enough?
No, CDN module has a bad seo problem: http://drupal.org/node/1060358
Just that? No other configuration is required? OK, I found info: http://drupal.org/node/1160830#comment-4484656
Another question about Memcache API, what is memcache_bins? Do I need it?
This is my actual config:
$conf = array(
// The path to wherever memcache.inc is. The easiest is to simply point it
// to the copy in your module's directory.
'cache_inc' => './sites/all/modules/authcache/authcache.inc',
'memcache_servers' => array('localhost:11211' => 'default'),
'memcache_key_prefix' => 'madf_',
);
Thanks
Hi again. We have used
Hi again.
We have used authcache with Pressflow before and not had that problem. It looks like that fix should go in the drupal.js file, though. You should be able to view the source of your pages and see that Authcache is working. Did you also use the authcache debugging tool? It puts something on your site that shows how fast pages are being served up, etc. I know you have to turn that on in authcache somewhere.
But we don't use authcache anymore because for authenticated traffic, it ended up causing lots of trouble. For one thing, if a user edited a comment or updated a node, they couldn't see the changes right away which was really confusing. For sites like ours which have lots of dynamic information (lots of updates) it just wasn't worth it...
We have found that block caching and views caching can really be big performance boosters. By the way, I'm all not familiar with phpbbforum but doesn't it come with its own caching mechanism?
Compressing JS and CSS is great but you can also compress HTML and text. Consider using something like this in your .htaccess file. But you need to make sure that your server has compression turned on.
# compress text, html, javascript, css, xml:AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Something like this can make a huge difference for page load times we have noticed.
About CDN problem --
I read through that thread but I don't see what the big deal is. We have been using CDN for a long time now and we have never noticed any negative search engine effect. Also, if you are using a custom setup like cdn.yourwebsite.com, you should be able to block search engines from using that domain through robots.txt. I am fairly certain that Google (and other search engines) can tell the difference...especially if you are using a well known CDN.
About memcache --
As I understand it, bins are basically for different Drupal database tables. In the above snippet that you provided, all of your bins are being handled by the 11211 port. This should be okay for now. In the past, we have seen that memcached doesn't always play well with some bins...like filters for example...and we have had to specify database or file caching for these problem bins. But for the most part, this default setting should be ok.
In the future though, if you decide to run your site from more than one server (or you want to cache from more than one server), you may have to separate out the bins. But you always need to have that default setting...
AND, if you want to cache sessions and users, you will have to add those bins to your settings. Ours looks something like this using memcache API:
$conf = array('session_inc' => './sites/all/modules/memcache/memcache-session.inc',
'lock_inc' => './sites/all/modules/memcache/memcache-lock.inc',
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
'memcache_servers' => array(
'127.0.0.1:11211' => 'default',
'127.0.0.1:11212' => 'users',
'127.0.0.1:11225' => 'session',
),
'memcache_bins' => array(
'cache' => 'default',
'users' => 'users',
'session' => 'session',
),
);
Hi,Did you also use the
Hi,
No idea why, but I don't have that block anymore... It's just disappeared (maybe you know what is the name of that block?). Maybe I must uninstall authcache and install it again...
Nope, but I use phpbbforum only for the same user base.
Do I realy need to hack the core for Alter Cache Block?
Ok, ill try it. I already use Nginx for static files.
Not realy, I already saw the link like: cnd2.mysite.com/myarticle
ill try use it with robots.txt, but it will affect indexing of images. It's not a big deal, but.
I think it was changed since version 1.5:
http://drupal.org/node/1160830#comment-4484656
What is the 'lock_inc' => './sites/all/modules/memcache/memcache-lock.inc'? Do I need it?
Thanks you for the answers.
ESI
Also check out ESI: http://drupal.org/project/esi
And Advanced CSS+JS Aggregation: http://drupal.org/project/advagg
See BOA for reference
BOA project has built-in Boost-like caching for logged in users (separate cache per user). It is using native Nginx caching: http://groups.drupal.org/node/157779#speed
BOA + Cacherouter + Pressflow entity cache (load_cache)
In addition to Cacherouter (using large xcache bins), I use the Pressflow D6.22 entity cache patch; see: https://code.launchpad.net/~catch-drupal/pressflow/load_cache/+merge/39241 on a fairly large D6 site, with good results. The results are probably more dramatic in D6 as 'default' D6 lacks some D7 caching.
The BOA projects 'built-in Boost-like caching for logged in users' works quite well at the Nginx level (instead of slow PHP), and defaults to 5 minutes cache time for authenticated users (50 minutes for anonymous users). The plus side of this method, is the simplicity and the fast cache speed, thanks to Nginx being written in performant C and its good use of Native Linux I/O and APIs. In a clustered environment, I would use memcache[d]. In a single server situation, I find memcache[d] slower than xcache+cacherouter.
--
Linux: Web Developer
Peter Bowey Computer Solutions
Australia: GMT+9:30
(¯`·..·[ Peter ]·..·´¯)