Keyword

K2 performace and optimization

  • Klaus Veliu
  • Klaus Veliu's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 6 months ago #152131 by Klaus Veliu
K2 performace and optimization was created by Klaus Veliu
Hello to everyone,

Till now I have been using K2 and I loved it at a point that I have never used the Joomla articles since 4 years.
I don't even know how Joomla articles works...

K2 was working very good with all of my sites, but not after I had to deal with websites that have
a lot of traffic. An article can reach 80K hits in two days. At once the site can have about 4K online users.

I am using the Enterprice server of Siteground + Cloudflare Plus and still the site crashes so many times
during one day.
On the siteground support they have send me some slow queries that were causing this problem,
I went further asking help to other people and someone warned me that K2 makes to many
checks in the media/k2/items/cache folder. <?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
The issue in this case is that k2 makes a file exist check in this path, but that action generates a scandir() functions.
If this its true my server its being killed by every pageview in one article!

I tried to get help in 'a' Joomla forum but as they hate k2 there I got not to much there.

I was wondering if this ugly things are true how can I optimize them?!
In my case 99.99% of the articles has a main image.
So there is not need for that check, what should I do to optimize this issue?!
What other optimization procedures should I do to optimize further more the server load caused by k2?!
If I switch from apache to nginx will I have better performance and stability?!

Thank you for your time, any suggestion its appreciated.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152138 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 performace and optimization
The checks are being made, to make sure that the item has an image.
Without these checks broken images might be displayed.

Switching to nginx will surely benefit since nginx can handle waaaay more concurrent connections.

I would recommend caching your site. This will stop K2 from checking for images, and querying the DB on each page load. Using APC cache or even File cache will really boost up your site.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Klaus Veliu
  • Klaus Veliu's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 6 months ago #152159 by Klaus Veliu
Replied by Klaus Veliu on topic K2 performace and optimization
Thank you for the reply Krikor.
I am trying to give some kind of response of each paragraph that you wrote.

1) On my case the Articles has always an image, so I am removing this check.
2) The nginx its giving me some issue by configuring it so I can't say nothing about it.
3) On my website at one moment I was using MaxCDN + Cloudflare + Siteground Joomla Booster(Supercacher & Memcache)
The site went down even on that case.(I had a Dedicated "Power Server" plan of Siteground)

Can you tell me if there are known slow k2 checks/procedures that can be optimized maybe some tips or an good
tutorial article to make some changes to k2?!

Maybe a good suggestion for you its in the future updates of k2 to include some optimization features in the config area
so the user can decide how they are going to use the k2 features.
I think that the issue that I am facing now with k2 has caused many people to not use it anymore...

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152167 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 performace and optimization
1) Yes you can do this.
2) It will really benefit your site so it is worth looking into it.
3) Yeah, it shouldn't have but you need to contact Siteground about the specifics.
Although having your site scanned by 2 CDNs can potentially crash it.

I would stick to only one CDN which not only serves static content but it serves the entire site as well.
Hence you wont have 4k concurrent requests on the server. Apache won't handle this many requests from what I know.

To be honest I have seen K2 sites with half a million of items and millions of visitors which have no issue whatsoever.
A file_exists check which K2 uses will not kill your site, unless there is an issue in your setup.
If K2 had issues like that people would not use it, or continue doing so.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum