PHP memory usage

What’s would you consider the maximum amount of memory a php script should use on a forum or community website?

What’s would you consider a good amount of memory a php script should use on a forum or community website?

How much memory do most php scripts use on a forum or community website?

using memory_get_usage(true).

Thanks :smiley:

What’s would you consider the maximum amount of memory a php script should use on a forum or community website?

Does the forum have 100, 1000 or 1 000 000 active members?
What database is being used?
What’s the HDD / CPU of the server?
What’s the server load? What process is using up the most resources?

What’s would you consider a good amount of memory a php script should use on a forum or community website?

What forum software is being used?
How busy do you expect the site to be?

How much memory do most php scripts use on a forum or community website?

There are community websites ranging from 10 members to size of facebook. Not really easy question to answer since there’s no statistical data about such things.

Thanks

No problem :slight_smile:

It all depends on what’s going on in the pages.

I’ve seen scripts requiring 100+ MB to render a forum, and scripts requiring 1.5 MBb to render a forum.

I don’t think there’s a generally accepted ‘this is how much memory you should use’ rule, except: keep it low.

In the end, it all depends on what kind of hardware you’re running on. If you have 2 GB memory available, then there’s nothing wrong with allowing PHP to use 256 MB. If you only have 8 MB, that’s another matter.

Lastly, worry about this kind of stuff when it’s needed, not beforehand. It’s a waste of your time, which you can better spend building awesome stuff :slight_smile:

Thanks all.

worry about this kind of stuff when it’s needed, not beforehand.

I think I’ll do that :D.