Chris Muench
Chris Muench

Reputation: 18318

PHP codeigniter Memory usage around 4mb

I made the mistake of getting into the habit of autoloading a bunch of libraries, models..etc, when I don't need to. It is too hard to trace down all the cases to make sure everything is available and not broken. I am estimating the autoloading is causing 1-2 MB of extra resources per script. The total memory usage for my script is around 4Mb. (I used the profiler and disabled autoloading and saw that it dropped 1-2mb)

Is this something to worry about? The server I am running this on has 1gb of ram and doesn't ever seem to be under heady load.

Is this a bad thing? Am I worrying too much?

Upvotes: 0

Views: 1313

Answers (1)

Aurel
Aurel

Reputation: 3740

Is always better to load what you needs.
But 4MB is a normal PHP app memory usage.
I read somewhere, in case of a php optimized app to worry when you exceed 9MB.

Memory usage become important when your server have to respond many requests. So the goal become to use less server ressource as possible to pay less.

Sorry for my poor english.

Upvotes: 2

Related Questions