Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay slow due to multiple sites created to harness multi tenancy
hi All,
How can improve the performance of Liferay which is slow due to multiple sites created to harness multi tenancy?
One way is using database shards ,are there other ways to improve performance
How can improve the performance of Liferay which is slow due to multiple sites created to harness multi tenancy?
One way is using database shards ,are there other ways to improve performance
Do not use the DB shards, they are no longer supported under 7.x and if you ever want to upgrade you'll be stuck trying to figure out how to undo the shards.
Performance can be improved by a number of different methods:
Add more nodes to the cluster. Offload gzip and ssl to httpd. Add external tools (ghostscript, imagemagick, xuggler and openoffice) to offload work. General performance tuning (jvm tuning, disable filters not being used, etc.). Add intermediate caching using Varnish or another appliance.
Performance can be improved by a number of different methods:
David H Nebinger:
Performance can be improved by a number of different methods:
...until here I agree, then I'll go in a different direction:
1. Measure. Check what is the actual bottleneck in your installation
2. Fix exactly that bottleneck
3. Check if this fix improved performance enough so that you can move on
4. If it doesn't improve performance enough: Continue at 1
The techniques that David mentioned are good, but measuring will make sure that you don't introduce more complexity for 2% more performance as your first activity. Instead you might start with the 50% elephant in the room (numbers made up, of course)
The tunings I suggested are no-brainers and low hanging fruit, they can be done w/o measurement and provide a known result.
But Olaf is right for that last mile; you shouldn't guess and apply tweaks w/o knowing if there is an actual need for improvement and what the change might cost in terms of development and maintenance (i.e. if you get only a 100 ms benefit from your change but you have to develop it and figure out how to maintain it against future Liferay releases, the cost/benefit ratio might be so skewed that the 100 ms is worse for you in the long run).
But Olaf is right for that last mile; you shouldn't guess and apply tweaks w/o knowing if there is an actual need for improvement and what the change might cost in terms of development and maintenance (i.e. if you get only a 100 ms benefit from your change but you have to develop it and figure out how to maintain it against future Liferay releases, the cost/benefit ratio might be so skewed that the 100 ms is worse for you in the long run).
The interesting aspect of this: Your (David's) suggestions are good ones for generally tuning the performance, and none of them address the (IMHO probably incorrect) assumption made by the subject of this thread: "due to multiple sites...".
I can't think of an aspect of multiple sites to cause performance problems, unless it's just so much active data that caches are constantly overflowing, but that could happen in a single site as well. So: I'm back at: Measure first, before introducing additional complexity.
I can't think of an aspect of multiple sites to cause performance problems, unless it's just so much active data that caches are constantly overflowing, but that could happen in a single site as well. So: I'm back at: Measure first, before introducing additional complexity.
I assumed that, because they are using multitenancy, that the biggest concern there is going to be concurrent users.
If you expect 2k concurrent users on one site, your setup may be fine. But if that multiplies by the number of sites you have, well that's when multitenancy can be a concern.
So my suggestions, while not backed by direct measurement initially, position your nodes to maximize concurrency.
If you expect 2k concurrent users on one site, your setup may be fine. But if that multiplies by the number of sites you have, well that's when multitenancy can be a concern.
So my suggestions, while not backed by direct measurement initially, position your nodes to maximize concurrency.
...that's still rather "due to too many concurrent users" than "due to multiple sites" ;)
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™