Upgrading from Drupal to Pressflow - performance

I have drupal based website (Drupal version is 6.19), it is very heavy content website (about 400K articles in it).
By following Rule one of using Drupal, I didnt make any change on the core. but i have a lot of enabled modules and some of them were customized.
Now, I am suffering of the performace and I need to enhance it. I never used Pressflow before, but I have read some articles saying that pressflow is better than Drupal. is it safe to upgrade from Drupal to Pressflow? and if so, how to do it?
Thanks for your help

Pressflow adds the following features to Drupal.
Support for database replication
Support for Squid and Varnish reverse proxy caching
Optimization for MySQL
Optimization for PHP 5
Pressflow is a 100% api-compliant replacement for your standard Drupal Core. There are no database schema changes. So long as you are running a normal Drupal core and meet the other system requirements (PHP5.x, MySQL 5.x), Pressflow is a "drop in" replacement.

Short answer: probably not. Especially since you state that you "have a lot of enabled modules and some of them were customized."
Longer answer: Pressflow's changes are relatively small, and hardly break the APIs. However, there are some incompatibilities, most in the area of database-access and caching. Especially modules that knowingly or unknowingly don't play by Drupals coding guidelines, will probably break. My suggestion: just try, if a module breaks: fix it (and file a patch).
But the real question is: are you going to benefit from Pressflow? It is not simply "better". It allows database-replication, such as load-balancing or master-slaves. Do you intend to use that?
It introduces better support for caching proxies. Are you planning to run a squid or some other caching proxy?
It has some small changes in, for example, the area of caching, that may (but may not) help you; depending on your current usage.
My suggestion: first see how to improve performance without Pressflow. Then, once you come across an area where Drupal is of little help, but which is "fixed" in Pressflow, consider changing.

Few modules have issues with Pressflow and if they do, someone else probably found them. Try searching if any of you modules is incompatible.

Its actually slowed out websites down. This is due to too many modules setup and no caching of our blocks. I am working through things now trying to setup caching and memcache. The issue I have though is that our editors want to see changes now. So some of this might be training. The other issue I have is that we have the fimage module setup and it does not work with the minimum cache lifetime setting so we do not get that benifit at all. In theory it should speed up your site but just let it be known it might do the opposite.

Related

Magento 1.x vs Magento 2.x [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm working on Magento 1.9.3.7 and I want to understand if is a good idea to migrate to Magento 2 or not.
I summarized this differences :
Magento 2.0 is faster then Magento 1.x
Some significant changes in the structure of directory which reduces
the complexity of structure
New technologies and latest versions (example Php, Jquery etc)
Allows developer to setup automated test easily
Many features are now integrate to Magento 2
Improvements to checkout and other stuff
My questions:
There is any index to look up to decide when is a good moment to migrate to Magento 2?
There are any hidden issue I have to know before?
Someone ever try this migration? If yes do you see this big improvement?
All my modules (third parts & hand-written) will be obsolete?
Why Magento 1.x is still releasing new security updates if there is Magento 2?
I hope to listen to different experencies or solution to understand if is the right way.
Please if I said something wrong tell me.
Docs on Internet (differences) : https://gauge.agency/articles/the-differences-between-magento-1-and-magento-2-and-which-is-better/
Having worked extensively with both platform, I have to say that Magento Inc's reasons for upgrading to m2 are just silly.
Magento 2.0 is faster then Magento 1.x
This is not really true, right? Reasons why they say that M2 is faster is that it supports php 7.x and runs Varnish. To this, I say, so what? M1 does as well.
Community efforts like this one work like a charm: https://github.com/Inchoo/Inchoo_PHP7 (I'm in no way affiliated with Inchoo).
Edit: This is now even less true since M1 (as of 1.9.4) supports 7.2 without third party modules.
On the other side M2 has a semi working asset precompiling system, which keeps causing issues on every turn. Further more, it slows the development to such degree that M1 feels like a blazing fast solution.
(If you think that this should be an outrageous exaggeration, which it should probably be, but sadly isn't, check out some of the GH issues.
Some significant changes in the structure of directory which reduces the complexity of structure
This was a great idea, but the actual result is terrible. How the hell did M2 end up with more configuration and more XMLs? What's with the XML heavy UI components?
Is this the example of the simplified module structure – https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/Catalog?
Yeah sure, M1 is not great here, but M2 did not improve here at all, just check out the amount of the xmls in a single module – https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/Catalog/etc
New technologies and latest versions (example Php, jQuery etc)
Sure, and stuff like ZF1, KnockoutJS and Fotorama.
Allows developer to setup automated test easily
I agree here. M2 has a proper support for automated testing, while M1 has almost none.
Many features are now integrate to Magento 2
I'm not sure what exactly you wanted to say here, but the problem I had is that they simply migrated features from M1 to M2, didn't improve them at all, slapped new interface on top of it and call it new platform.
While there's no problem here, I feel like this was a huge opportunity to improve the system, but they dropped the ball.
Improvements to checkout and other stuff
I disagree, checkout is now not as nearly flexible as it was. Working with KnockoutJs and UI Components is the last thing you want to do.
I'm fine with it being quirky and all, but the flexibility and possibility to improve checkout per particular shop is nowhere near M1.
There is any index to look up to decide when is a good moment to migrate to Magento 2?
Most of the Magento agencies are using this to promote their services and offer migrations to M2 as a way to make extra profit. So you'll always see companies talking about performance and feature improvements which aren't there.
This is the only case where someone says something differently: https://amasty.com/blog/magento-1-vs-magento-2-performance-comparison-speed-test-results/ (I'm in no way affiliated with Amasty).
There are any hidden issue I have to know before?
Platform is not stable enough, major bugs are still present. Just do a quick browse through issue reports on GH.
Why Magento 1.x is still releasing new security updates if there is Magento 2?
There are lots of businesses that will never migrate to M2. They have no option here.
Lastly, I want to say that I'm sorry for all the hate in this answer, really wasn't my intention. :D
There is any index to look up to decide when is a good moment to
migrate to Magento 2?
It depends on individual store environment (Big stores with own ESB may use M2 as storefront, small ones will have to wait until their ERP Provider releases a plugin or connector)
There are any hidden issue I have to know before?
M2 code architecture is nothing like M1. MVC has been dropped in favour of MVVM
Someone ever try this migration? If yes do you see this big
improvement?
yes. FPC has been improved alot and general ttfb response is a way better
All my modules (third parts & hand-written) will be obsolete?
yes, due different design patterns.
Why Magento 1.x is still releasing new security updates if there is
Magento 2?
Magento inc. has promised ongoing support for M1. There are too many enterprise customers I guess.
I have tried the Magento 1 to Magento 2 migration a few times before. But for me, there is only one reason I can think that stands out, to do such a major overhaul on a website, and that is security,
You should not just upgrade to Magento 2, but specifically 2.3 as it has a lot more invested in security and less prone to malware attacks. It also has new features that did not exist in Magento 2.2.
If you are still on Magento 1, then in theory, it's only a matter of time before malware finds your site.
A good practice would be to have a fork of this repository https://github.com/magento/magento2 and bring the latest fixes into your code periodically. This would of course give you another reason to upgrade to the latest version since Magento 1 is no longer maintained.
You will have to reproduce all of your modules for Magento 2, there is absolutely no other way, And if you use the Data Migration tool, you should have an easy time bringing the data over. And the next point is going to be to create the theme for your site once more, there is no easy way to bring your theme over from M1 either.
Good luck my friend =D

Joomla versus CodeIgniter/YII

A partner has a website that needs to be rebuild from scratch as it simply can't cope with the large number of visitors (currently build using SilverStripe). The site should be able to deal with 5 million or more members using 20+ languages.
We were considering using CodeIgniter or YII because from research both appear to be excellent performers. However several people advised that we should consider the latest version of Joomla for this. For small websites we are happy to use Joomla but for a heavy load website our feeling says that we have to stay away from that. We are however not able to find any comparison between both from a performance point of view but we do require good arguments why Joomla would or would not at all be a good candidate for this. One comparison can be found here: http://vschart.com/compare/yii/vs/joomla/vs/codeigniter however this doens't tell me what to expect when the number of visitors is really high.
Can some advise how Joomla compares to CodeIngitor or YII considering that the site will receive a very high number of vistors and will use a 20+ languages (for silverstripe we build a translator module as the build in CMS was not usefull when using so many translators).
When you're dealing with a site of that scale, it's probably best not to shift to Joomla. Joomla can handle a fair bit, but I'd suggest that it would be far easier to have a Joomla site that large when the site has been adapting as the traffic increases.
Part of what makes your question hard to answer is that we don't know much about what your current site does.
Is it mainly a CMS? If so, Drupal may be a decent fit for you.
Is it a custom web application? It sounds like it could be, based on the number of translations you're handling.
Is it somewhere in-between? This could also be what you're dealing with.
If you're looking at either of the bottom two options, yes, shifting away from SilverStripe (but not to Joomla) sounds like it might be a good thing.
Given the volume of traffic you're dealing with, it sounds like you probably already have a revenue stream and a development team. In that case, it might be worth having a few of your developers play with CodeIgniter and Yii and see what they think.
I wrote up a detailed answer to a question about what type of framework to choose a while ago, which you can look over here:
https://stackoverflow.com/questions/10095906/yii-or-zend-or-other-frameworks-under-the-following-requirements/10115678#10115678
I'm a Yii fan, having checked out a bunch of other frameworks. Regardless of which framework you use, I'd like to offer one piece of advice that I've found key on all projects I've worked on.
You want to work with objects, not data arrays
The reason for the above is that your models (and the objects they produce) can end up having your business logic built into them. Doing this makes life far, far easier in the long run. A great book on the subject, aimed at manager's and quite high-level (there is no code, although there might be a few lines of psuedo-code), is Object Technology: A Manager's Guide. I'd highly recommend it.
Framework thoughts
CakePHP
I started dabbling with CakePHP until I found out it didn't hand back objects (just arrays), at which point I ran screaming.
CodeIgniter
Looking at what CodeIgniter has for database model support, I think you would quickly hit its limitations with a site of your size, so would recommend against it. And having EllisLabs deciding to leave CodeIgniter behind (see their website for more details) is not a good sign. The signs say stay away.
Of the PHP frameworks out there, these are the ones I hear the most things about:
Symfony 2
Yii (disclosure: I work with this one daily)
Laravel
Symfony
From what I can see of it, has been a huge stimulus to the PHP community and many best practices have come out of that community. Unit testing, Composer, pushes for PSR-1/2, the ideal of modularity of code (some of their core code is ending up in Drupal 8) are all great things that have spurred the PHP community into writing code that's better than spaghetti code. With that said, it feels kind of heavy and enterprise-y and looked to have a pretty heavy learning curve.
Yii
When I was looking for a framework, I had a lot of legacy code that needed migration. Yii's way of handling things, although opinionated at times, has done a lot for me as far as exposing me to good practices that are used heavily on the web. Highly recommended as well.
Laravel
When I was looking for a framework (2+ years ago), Laravel didn't exist. It's apparently quite slick and cutting edge (haven't looked at it yet, I've been busy landing new work regularly in the Yii world), but I am interested in dabbling with it. That said, here's a thoughtful article about Laravel and couple of considerations that I've wondered about.
The main developer, Taylor Ortwell, seemed to be a dominant force. That's a great thing while he's making money doing this and enjoying it. Not sure what would happen to the framework if he decided to do something else.
The speed of development on the framework is an awesome thing and means that all sorts of creative juices are flowing. It's a great place to go look at cool new things. That said, you're going to want your developers to be able to easily find information about the framework they're working with, which in 3-6 months may be severely out of date in the Laravel community. The Ruby on Rails community has the same type of good/bad problem when I've looked around over there; there is so much information about the new stuff that sometimes it's hard to find information about the version of the framework you're dealing with.
That said, there are lots of cool choices out there :-) I should probably wrap up, as this has gone on far longer than I'd intended. Let us know what you end up deciding and how it ends up going.
How big is the site really? Bigger than joomla.org?
Are you talking about big in terms of the amount of content in the database or in terms of the number of visitors.
Joomla really does not have problems with scale unless you are on an older version of MySQL in which case it slows down.
It depends on what kind of application you want.
If you want a CMS, Joomla is the way to go. Because this is what it was build for.
If you are about to create a real "custom" application Yii/Codeigniter is the way to go. (This is what yii was build for)
Regarding performance, from my expericnece Yii is a lot faster, because it comes with way less overhead. You can build the application just as you need it.
Well it's like compare green and salty. Really joomla is CMS, and Yii and CI are frameworks. If you considering make highload on joomla - it's not your job.
If you have high frontend load - maybe watch on js frameworks? Yii+backbone.js or ext.js for frontend is awesome, since you'll move alot to clientside.
CI is dead. I honestly like it, but its dead already. No extensions, no namespaces in future, nothing.
I can say + of Yii:
*faster then CI;
*have great documentation and wiki articles;
*have great and active community and developers;
What else i can add? Active record is good for small databases, but not usable for highloads. Also as i said on yii you can easily make js framework+yii composition. Yii have good caching system. Long time support of stable versions.
I personally manage highload now, but its more backend/api/database. 150+ thousands database records daily, 300+ thousands requests to api, 50 milions records data table. It works like a clock for more then 2 months already.
Choose what you like, or write on native php if its really big system - best choice from practice.
Joomla is an award-winning content management system (CMS), which
enables you to build Web sites and powerful online applications. Many
aspects, including its ease-of-use and extensibility, have made Joomla
the most popular Web site software available. Best of all, Joomla is
an open source solution that is freely available to everyone.
CodeIgniter is an Application Development Framework - a toolkit - for
people who build web sites using PHP. Its goal is to enable you to
develop projects much faster than you could if you were writing code
from scratch, by providing a rich set of libraries for commonly needed
tasks, as well as a simple interface and logical structure to access
these libraries. CodeIgniter lets you creatively focus on your project
by minimizing the amount of code needed for a given task.
Yii is a free, open-source Web application development framework
written in PHP5 that promotes clean, DRY design and encourages rapid
development. It works to streamline your application development and
helps to ensure an extremely efficient, extensible, and maintainable
end product.
Joomla can't compare with CodeIgniter / Yii. But, If you need any CMS for your project, you can use Joomla (or maybe Wordpress). If you want to create any web application, then you need to decide for any PHP Framework. I use CodeIgniter for years, and I like it. They have a huge community, and the best user guide. Yii also has a great community and a lot of features. So, you can decide depending on you demand.

How can I figure out why my Wordpress pages load so slowly?

Yet my site pages load very slowly. Usually there's a 2-3 second lag before the page renders, and I cannot figure out why.
My site is powered by Wordpress v3.4.2.
I'm on a dedicated virtual server with plenty of resources and
bandwidth.
There are no huge images loading.
My CSS files load before JS scripts.
I've spent a lot of time trying to optimize the site within the constraints of the platform (Wordpress + plugins, etc). I don't expect my site to be SUPER fast, but I need it to not be SO slow.
I'm using Chrome's developer tools to audit my site but the suggestions do not appear to explain the long load time (unused CSS rules, etc). When I look at the timeline, I see a 2.7x second load time initially but I can't figure out why. Can anyone help me get to the bottom of this?
My site is located here. The homepage has some extra scripts, so it may be more helpful to look at this page.
I found this superb guide which really helped me fight through the mire of optimising Apache for use with WordPress:
http://thethemefoundry.com/blog/optimize-apache-wordpress/
You said you have a virtual server so chances are it's currently set up to load EVERY module - you'll find a great speed boost here if you eliminate unnecessary modules. Keep a backup of your config file in case you screw it up.
Also - use the TOP command through SSH to see how much memory PHP is using. Probably a lot currently. This will all be improved through eliminating modules as per above link. You don't mention how much memory you have on your VPS but there's a good chance your performance issues are coming from memory thrashing which will be mitigated significantly by reducing how much memory each PHP instance consumes using the link above.
Also, it matters to find out where your performance issues are actually coming from – a great little plugin called WP Tuner helps me locate performance bottlenecks. The original plugin is incompatible but someone else has written an upgrade:
http://www.wwvalue.com/tuts/tut-wp/wordpress-profiler-tuner-revised.html
That will help you identify which specific parts of the page are taking the longest to load so you will immediately find your performance bottleneck.
In addition, a cool plugin called Debug Queries is useful for tracking down performance issues although the wordpress profiler above actually does track queries too.
Finally – I can’t recommend highly enough this WordPress.org discussion on performance, and specifically on W3 Total Cache vs Super Cache (both are excellent).
It’s a fantastic read for anyone looking for split-second response times:
http://wordpress.org/support/topic/wp-super-cache-vs-w3-total-cache
I use W3 total cache on one of my sites and WP Super Cache on another. Both are great. I used both so I could learn about both. I would say use WP Super cache plus all the other tools the guy at the link above recommends if you're looking for extreme performance, but if you're looking to get immediate performance W3 total cache is more comprehensive in its initial setup.
Hope that helps.
use caching plugin,
put JS files at the bottom,
try different webhost (DB server may be slow sometimes)
minify css and JS,
make fewer HTTP requests
make sure external services (like FB and others) are not slowing down (remove
them and see if it helps)
run Yslow or similar test
try to use typekit or google font instead of cufon
Have you tried http://wordpress.org/extend/plugins/wp-super-cache/ or a similar caching plugin?

Best practice for hosting a large image library

I'm looking into setting up a fairly large scale image library site. I'm looking at CodeIgniter for the framework as I hear it's easy to work with and quick. What I'm looking for help on is the server set up. I've been speaking to a company about getting hosting set up as its's not something I've had much experience with.
I know a Content Delivey Network is worth thinking about, as is using something like Varnish, but don't want to start building anything only to have to redo it to take this into account.
So my question is this: What's the best way to go about setting this up? Start building the site as efficiently as possible and worry about speeding the server up later or is it something that needs sorting up before anything's built.
I recommend building a working site to meet your most basic requirements. Don't worry about features or requirements that are so far off they may never materialize. You can always refactor and improve performance, but requirements and priorities often change, especially once you have something to work with and people are actually using your site.
Having to constantly change/improve working code is often better than doing lots of planning up front, only to end up realizing later that you made a wrong assumption and have to make major changes on a code base that never worked. This is basically Agile vs Waterfall.
If you like PHP, CodeIgniter is a quick way to get started. The most important thing is to be sure to follow conventions and be consistent so that you can easily make major changes without worrying about breaking everything, or having to maintain lots of documentation.
I wouldn't worry about Varnish yet. CodeIgniter has lots of caching options built-in. You won't have millions of users over night, so if you find your growth trajectory going vertical, you can always re-align your priorities at that point. Also, explosive growth is usually tied with people giving you lots of money, so you have more options on solving that "problem".
I would start out with a CDN, as it seems like an essential part of your site. It will largely address image backup as well. Just be sure to comparison shop, because CDN services vary quite a bit. Also, for simplicity, you may want to look into origin-pull.

Editing content-types in Drupal at development mode takes for ever

While the site is in development mode, it takes for ever to edit content types and do various similar administrative tasks.
Is there a way to speed this up? What kind of hardware would I need?
Any specific MySQL optimization maybe?
Are you working on a local dev environment? That makes a huge difference. You shouldn't really need any big hardware as long as you're local. A new-ish $300 laptop with 4GB of RAM works fine for me.
However, no matter what you do, it's a lot of clicking, so the more you can learn to do that kind of stuff with code, the more efficient you can get.
This might help:
http://drupal.org/node/381668
Disable query log on all admin pages.
The devel module with performance logging is a great place to start to see where the problem is. You can see how many queries are being run per page and how long they take.
In my own experience of running Drupal on a netbook, the database was pretty insignificant in contributing to the page load times. The database was in fact considerably faster on my local machine than on the shared hosting environment I started out with (50-100ms vs. 1000-1500ms, as I recall). Due to the lack of processing power of the Atom CPU however, page loading times were about the same (~2-4 seconds).
If you're using something like XAMPP on a local machine, the default configuration is pretty lean. There are included configurations for larger servers, but beware of turning on the binary log.
Turning on the query cache can also be helpful, but to what degree is variable. It's the biggest boost for complex, often repeated queries; Drupal has some complex queries, but there is more so a lot of pretty simple ones. When you're developing you'll probably also invalidate the cache frequently. Regardless, on a local machine there isn't really any downside to enabling it other than some extra RAM usage. 32 MB could be quite reasonable to work with; I use more because I know I have plenty of available (even on a netbook).
Enabling a PHP opcode cache may also provide a boost in serving pages from your local machine. XAMPP includes the eAccelerator extension, though I would pick APC instead for a linux system.
The only other suggestions I have are trying to reduce the number of clicks you have to perform by using modules like Administration Menu, and make sure you're using a fast browser (e.g., firefox or chrome) since many of the administration pages use javascript.

Resources