Caching Question

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
cuhlcannon
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 22, 2005 8:02 am

Caching Question

Post by cuhlcannon »

I have cmsms installed on a hosted shared server for a client, which we were having problems with on a transfer from our development server. I have worked with the ISP some and they sent me this:
I've spent the last while trawling though your hosting account log files. It appears that one or two of the changes you have made to the product have resulted in the required cache memory jumping from approximatly 4MB to well over 10 MB. Servers restrict the amount of physical memeory a php file is allowed to use to prevent run away scripts eating into the resources of the server, and resulting in a crash.

We've increased the memory allocation for php scripts on your hosting account to 16M, which appears to resolve the issue at hand.

However, we are quite curious what parts of the product you actually changed to increase the requirements of the product so dramatically.

Prehaps you could shed some light on this for us.
I am using some modules to the system, but have not modified anything within this setup. The modules I am using are:
  • bookmarks
  • cms mailer
  • feedback form
  • statistics
  • news
I am wondering is there anything out of the ordinary that I should be looking for? Can I turn something off to make this not hit the limits? I am a bit baffled by it tbh.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Caching Question

Post by calguy1000 »

No, we recommend that you have 16Mb of RAM for php scripts in CMS.  CMS made simple is quite memory intensive.  All of the modules installed in the modules directory are loaded into RAM, as well as plugins, user defined tags, etc, etc.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cyberman

Re: Caching Question

Post by cyberman »

calguy1000 wrote: No, we recommend that you have 16Mb of RAM for php scripts in CMS.  CMS made simple is quite memory intensive.  All of the modules installed in the modules directory are loaded into RAM, as well as plugins, user defined tags, etc, etc.
IMHO that's not the right way. In Europe / Germany 8 MB RAM is the default which can't changed easily.

Modules should only loaded in RAM , if they are installed. I'm sure that needs only some simple code changes  ;). Much bigger CMS can work with 8 MB limit.

Would be a good option for release 1.0 ...
Last edited by cyberman on Wed Jul 05, 2006 1:50 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Caching Question

Post by calguy1000 »

Yes, on the frontend they're  only loaded if installed, the only time all modules are loaded is on the backend, in the listmodules stuff. 

but in addition, there's user defined tags, plugins, and global content blocks that have to be loaded and registered with smarty, etc.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Caching Question

Post by Ted »

Also, the module developers need to make sure they're using the action files in their modules.  This offloads a lot of ram usage so that only the action that is getting called is loaded.  As it stands, CMSMS in it's default state (w/ default modules) needs roughly 6 megs on an uncached page, 5 on a cached.  PHP's memory usage for compiled code is terrible at best and can easily take a 10k source file and use 100k of memory for it once compiled.  We do our best to make sure we're using references and other bits, but you can only do so much...

At some point, I'll make it more of a lazy loaded system of trying to only load the bare minimum of what is needed when necessary, but it's a LOT of work and requires a ton of code changes.  It would almost require a rewrite of most of the bootstrapping code we have now to do it "right".  And yes, it needs to be done, but there's only so many hours in a day.  :)
cyberman

Re: Caching Question

Post by cyberman »

calguy1000 wrote: but in addition, there's user defined tags, plugins, and global content blocks that have to be loaded and registered with smarty, etc.
Hmm, but newbies on CMSms can't know which plugins are needed from it per default. Perhaps this should be better documented in information at default install content ::) ...
Ted wrote: At some point, I'll make it more of a lazy loaded system of trying to only load the bare minimum of what is needed when necessary,
O.K. this needs a lot more of work  :) ...
Post Reply

Return to “Developers Discussion”