MyBB Community Forums

Full Version: Very High Memory Usage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
If you're willing to give me full access I'd take a peek.

I'm always interested in big boards and optimizing them for MyBB. If I can find a bug or a method to improve performance it's benefit to the project. I'd be happy to take some time to review things.
What kind of access? I can give out ACP access without problems or show you an SQL dump, but I'll have to ask the CEO about host or database access. The company that bought the forums runs websites (e.g., tgn.tv), but they rely on us forum staff to run the forums. I'm not the guy that makes decisions--I'm just the guy that pushes buttons. :p
OP sent me a dump of the sql which I imported in to a default install of MyBB and I've determined the main problem to be the forumpermissions cache array.

Due to the high amount of forums and mods for each forum the permissions for these end up with a huge array. I'm trying it on different cache systems but I'm yet to see a significant improvement.

When I use file cache the forumpermissions.php cache file that is generated is ~15MB, thats a 15MB array and as soon as php loads it the memory usage shoots up, ~100-150MB with file cache, ~90-100MB with db cache.

I'm in the process of trying memcache, eaccelerator and xcache to compare the results.

Any pointers on how else to handle such a huge array or reduce it?
I know, that's what I said the last time this issue was bought up; last time I looked the forumpermissions cache had literally thousands of arrays of permissions in it, we had to run a query to increase the size of the cache column in the datacache table to fit it all in. You had 424 forums and 68 groups, most forums had custom permissions setup for most usergroups, it was having to store an enormous amount of data. It's just a bad forum setup. I think I said last time best solution was probably to just rewrite the code so it actually queries for the permissions rather than read them from the cache, adding some more queries to each page is probably more efficient than caching all this data.
There must be a way to do it, though. The 58 usergroups that we have now were cut down from over 100 when we were using vB3.7, but we didn't have slowness then.
I'm unsure how VB does their caching of permissions. It's more than likely more efficient than MyBB's current method.

Welp, I've had a couple folks volunteer to look at it, but so far no solution. My memory usage is 173.25 MB and its slowing down others sites on the server.

Any chance MyBB 2.0 will handle usergroups differently? Thiking I need to re-merge back to vB3.7 (boo!). :<

Not trying to be a downer. I really love MyBB (always will). Unfortunately, I have to think of the community.
And have you tried to install xcache?
xcache or memcache should try..
But, since MyBB 1.6, I dont use it..
Maybe later.. Smile

Quote:btw...a neat trick.

edit inc/init.php and add this line near the top.
define("NO_PLUGINS", "1");

This will run your forum with all plugins disabled. Do that and review the advanced statistics difference. If your mem usage lowers significantly then you know it's a plugin.

I see, thanks Wink
(2011-05-02, 01:47 AM)taylor_smith Wrote: [ -> ]Any chance MyBB 2.0 will handle usergroups differently?

As I said before, it's not the usergroups, it's the permissions. Are you 100% that you need every single one of the usergroups you have, and every single one of the custom permissions you've set for them??
Pages: 1 2 3 4 5 6 7 8