I have used Drupal 6 for my multilingual website. I am getting issue of site performance I have enabled the cache setting of drupal but it still going slow when move from one page to other.
I have also used boost module but it’s not comfortable for multilingual website.
Please tell me any other way so I will improve performance. Thanks in advance.
your question has a whole host of answers, instead of listing all (which i would have to copy from several sites), here are a few main ones, and some resources i'd recommend:
-> Turn off all modules you are not using
-> Turn on caching
-> Try using the memcache module
-> Enable drupal JS and CSS aggregation, so we would have less files to load, meaning less HTTP requests
-> Use a CDN
-> GZIP contents
-> Minify Javascript
-> Avoid Redirects
-> Reduce Duplicate Scripts
Some Resources I would Recommend
http://wimleers.com/article/improving-drupals-page-loading-performance
http://drupal.org/node/326504
http://groups.drupal.org/node/85979
http://groups.drupal.org/node/195218
http://www.bootstrappingindependence.com/technology/how-to-improve-website-performance-with-drupal-php-mysql-and-apache/
http://www.vmirgorod.name/blog/tuning-drupal-performance
http://pronovix.com/blog/my-favorite-drupal-performance-hacks
http://fenix-solutions.com/blog/2009/12/09/tips-for-improving-drupal-performance/
http://drupalst.com/blog/improving-drupal-performance
The same issue I have faced in one of my application, I have worked on the following steps and it increases the performance which I verified through YSlow and GooglePageSpeed.
If you are using Apache, Replace Apache with NGINX as the web server for your Drupal site. This improves performance and reduces memory utilization when thousands of connections run concurrently. (Apache allocates memory to every additional connection, so it tends to start swapping to disk as concurrent connections increase)
Implementation of reverse proxy server. NGINX is a very popular reverse proxy server for Drupal sites. Implementing a reverse proxy server removes the burden of handling Internet traffic from your application server and allows other performance‑enhancing steps: caching of static files and the use of multiple load‑balanced application servers.
Implementation of CDN (Content Distribution Network)
Implementation of browser level caching at server level
Should enable Compression of images, CSS and Javascript files.
You can use Akamai for node/page level caching as a result it will increase the performance.
Use image sprites (css3embed), avoid iframes if you are using
Index database tables (use dbtuner)
Use of adding an Expires header
Disable DbLog module if not in use.
Move your assets at bottom
Reduce DNS lookups
Hope it would help.
Thanks
you need realy fast hosting, i recommend use nginx with phpfpm. without any var or opcode cacher your perfomance will be just incredible. im my vps i have speed up big drupal site to 200ms per page
and of course you must to audit your site for slow queries (big views, many blocks or php code).
Related
I noticed DJI Store website uses multiple CDN domains to server static elements.
Web page:
https://store.dji.com/?site=brandsite&from=nav
CDNs:
https://asset2.djicdn.com/assets/v2/common/14292283_1302296159810439_4324228009709332653_n.jpg
https://asset4.djicdn.com/assets/v2/build/app-0f0a05d6b0cd030cf68ca92e67816241.css
https://product2.djicdn.com/uploads/sku/covers/31314/small_55e19eff-2d6a-4d75-8e63-b9b5822fd298.png
Just wondering what is the purpose of using more than 1 CDN domain, more parallel downloads?
If so, how many domains I should use?
This is no longer a recommended way to load assets from CDN. Its better to use a single CDN and load as many resources using it as possible so that the HTTP/2 connection can be reused and the page has to create less connections.
Back in the HTTP/1.1 times, it was a common practice to load resources over multiple hosts to parallelize their download. This was a helpful practice at that time and could significantly speed up rich webpages for users with more bandwidth. This technique was called Domain Sharding.
But after HTTP/2, it is no longer required and seen as a bad practice. The above store seems to be built in the HTTP/1.1 era and optimized for the browser of that time.
There is another term "Incidental Domain Sharding" which means web development practices have resulted in developers unnecessarily relying on more and more hosts to deliver their content. For example, sites these days load fonts from Google Fonts, public libraries from some javascript CDN, and host their private content on a private CDN. This requires the browser to open several unnecessary connections that can otherwise be avoided, and prevents browser to avail the HTTP/2 multiplexing. But there are possible solutions like PageCDN and EasyFonts that collectively can help achieve maximum performance out of the available technologies since they load all the page resources over single CDN.
If you want to see Incidental Domain Sharding in action, have a look at source code of http://www.piston.rs/dyon-tutorial/ They are loading resources over 5 CDNs, and their private content (website CSS and JS files) still need a private CDN.
Haven't found many resources for this - If I wanted to use jQuery in my app, for example, would it be more beneficial to download jQuery into my project's directory, or to link the google CDN for use?
CDN -
Less Latency
Using a CDN: Using a CDN helps bring resources closer to the user by
caching them in multiple locations around the world. Once those
resources are cached, a user’s request only needs to travel to the
closest Point of Presence to retrieve that data instead of going back
to the origin server each time.
Without CDN - Offline test localhost
You can test your website on your local machine without network
connectivity if you serve your libraries locally while in development.
Without CDN Monkey Patching
You can modify and fix certain issues in a library that create
breaking issues in your software and host these. If you use a CDN you
will have to use the original library's code instead thus losing these
fixes.
Besides serving static files directly, does mechanic expose any commands/tools for adding in caching in nginx? Additionally, are there any gotchas with using nginx's built-in caching with Apostrophe or specific configurations I should use to make sure I'm not borking up core functionality?
I'm the lead architect of Apostrophe at P'unk Avenue.
Mechanic doesn't specifically expose any caching options. You should be able to set up caching via the /etc/nginx/mechanic-overrides folder though, which provides places to insert custom rules at various points in the nginx configuration file that mechanic builds.
As for Apostrophe, there is definitely an issue for administrators editing the site. If you cache the pages, then logging in won't change the appearance of the site to include editing controls. If you make an edit and the edit is cached, you won't see your work. This kind of thing would lead to inconsistent and confusing behavior.
So what I would recommend is using mechanic to set up a separate subdomain of your site just for editing purposes, pointing to the same backend port. The only difference will be that you will not enable caching for it.
This works well but you do have to be careful not to paste any absolute links to the editing subdomain when editing links with the rich text editor.
Then you can cache to your heart's content for the primary domain, as long as you are comfortable with the caching rules you're setting.
Naturally, if you cache the home page for up to a day and then edit the home page, that change will not be immediately reflected on the primary domain.
However, also keep in mind that mechanic is already set up to deliver static files such as media and CSS/JS/font assets directly via nginx, bypassing the backend node process for these. So it's really only necessary to consider caching at the nginx level if you are concerned about the performance of the pages themselves under heavy load.
Speaking of which, you should definitely be running Apostrophe in our multicore configuration, to improve both scalability and reliability:
Running Apostrophe on multiple cores and/or servers
Hope this is helpful!
I am needing to host media files on one server (with a different domain name) and have my website (files) on the other. I have all Wordpress base websites and am needing all current files to be moved to the other domain/server. I cannot do this manually as there are over 10,000 media files all up. Is there any plugin that allows to do this? Or any other way to do this? I am doing this to reduce the average CPU load / memory requirement. Thanks
If you are having performance issues with WordPress, my first recommendation would be to make sure you are using a caching plugin such as WP Super Cache or W3 Total Cache (I happen to use the latter). You will need to use a persistent caching option as well for the best performance, such as Memcached.
I can only speak to W3TC, but it does have an option to server your static content via a CDN such as RackSpace CloudFiles. When configured properly it will move files from your media library to the CDN, and replace the links in your content to the proper URL.
If performance is your main interest, you should also look at serving your site via Nginx and php-cgi, managed through something like spawn-fcgi. There are some caveats to using Nginx vs Apache, but once tuned the performance is far superior. You can find a guide for the configuration on the WordPress site.
Lastly you can set up a reverse proxy from your front end server to point to static files hosted on a different server - the content just passes through your front end server. This can be accomplished using Apache or Nginx, but the performance will be better in the latter. Please see my site for an example of using an Nginx reverse proxy - you would just want to proxy requests for your static files location to a different back-end server.
I wanted to know that, is there some special requirement for a website to make use of CDN ?
i mean is there some special scheme(or atleast considerations) on which your website must be build right from the start to make use of CDN (Content delivery network).
is there anything that can stop a website from making use of CDN, for example the way it references the content files, static file paths or any other thing conceivable.
Thanks
It depends.
You have two kinds of CDN services:
Services like AWS Cloudfront that require you to upload the files in some special place that they read from (eg. AWS S3) - In this case you need have a step in your build process to correctly upload the files and handle the addresses somehow inside your application
Services like Akamai that just need you to change and tweak your DNS records so they will serve the request to your users instead of you - In this case you would have two domains (image.you.com and image2.you.com) and have the image.you.com pointing to Akamai and image2.you.com pointing to the original source of the file. Whenever a user requested an image in Akamai, they would come to you through the "back door", fetch it and starting serving that file always.
If you use the second approach it's really simple to have a CDN supporting your application.
There are a whole bunch of concerns when dealing with CDN solutions.
The first one is that a CDN can't serve a dynamic page - i.e. a page that is unique to every user. Typically, that includes PHP, ASPX, JSP, RubyOnRails etc. - so if you're hoping to support lots of users for a dynamic site, you have to come up with another solution. Some CDN providers support "Edge Side Includes" - this allows you to glue dynamic pages together with cached content on the CDN, but this creates quite a complex application.
Of course, even on a dynamic application, a CDN can still serve static files - images, stylesheets, javascript files, videos etc.
#Tucaz explains the two major options here (actually, Akamai also provides a "filestore" CDN option). If you select the second option - effectively, the CDN becomes a caching reverse proxy in front of your website - it makes sense to tweak the cache headers on your HTTP server, and tell the CDN to honour those. Make sure you set your .ASPX files to not cache!