Hi,
i recently setup a revo 2.2.1. I needed to migrate the database form the old website. It is a website of events and the database starts at 2006. So up to now i have around 3000 resources and three times more TV values.
The problem now is that i am not happy with the performance of the install. The server is hosting several MODx Installs. But none of them is that large. I am using PHP5.3, mod_fastcgi and MySQL 5.1.
I played around with the supercache plugin. But i don't know wether that is a good solution.
There is a parent which has around 99% of the resources as child and i am using getResource and getResourceField to work with that data from there.
In the frontend of the website i have performance rates of 9 to 11 seconds up to the side is showing up. In the server stats i am seeing a tremendous amount of load (peaking ~1.5) at access.
Well, how can i tweak the caching? how can i tweak the data or even the system? I need to roll out the website soon. So the time is runing.
Some ideas? Do u need more informations?
thx & greetings
-
☆ A M B ☆
- 23 Posts
Hi,
Are you calling the snippets cached or uncached?
I am using getResourceField cached. By the way i am using it inside of getResource. Which i on the other hand have to use uncached.
The events of that website are changing every day. So i need to care for caching in that way.
where can i manipulate the caching time of resources by default?
thx
for testing i truncated the modx_site_tmplvar_contentvalues db table. It had about 4450 entries so far. but also with null entries it seems to a bad performance.
I ll test the templates in the next step.
I think its a better idea to store the events not in resources, but in a custom-table and cache all parse-results.
Clear or refresh the cache-files, every time modifications are done.
well, the data is in the database now. It is plenty of work to redistribute it. Coz there are also a lot of depencies. In my experience it is not a proplem from the matter of database to store a lot fo data in the database. I have some databases at this server which are filled with around 1.2G of BLOB and TEXT data and the performance is really better this database of modx with just 3Meg of TEXT data only.
Also i have a idea about the fastcgi. Might it be that modx is not runing well with that? I mean i am runing php as cgi. So i see a hug amount of memory load and cpu load when i am working at this project. Normaly that is not so much.
well, than.
what is time-consuming mostly is parsing and replacing of placeholders and snippet-tags, and if you have a lot of TVs, pulling and processing them all. sometimes unresolved output-filters and all that.
I still think you should cache the getresources-snippet somehow.
What does this getResourceField-tags do inside your getResources-tpl ?
How looks your getResources-tpls?
How looks your getResources-snippet-tags?
some Code?
-
☆ A M B ☆
- 3,141 Posts
Do you need to process the TVs? Ie &processTVs=`1` in the snippet call? That's very expensive in terms of processing and could very well bump performance up a ton, and I don't think I see anything that needs processing in that stuff you posted.
Now, you say you have it uncached because it's updated nearly daily, but the events are resources, right? In that case, it really wouldn't be needed to uncache them as a resource save means the cache is cleared

So you can have it generate it from cache only when something changed.
Well, you are right. I put away &processTVs. Actually I do not need it. But it still needs around 9 seconds to render the page and put it to the cache. I thing thats still a lot.
It might be that i do not understand something about the modx resource caching. But i have a lot of content which need to be up to date. At the front page for example are the next 8 events shown. And the for the next event is a content truncated comming up section. Isn't it that this will not been updated when i call it cached?
thx