thoughts on memory

0 views
Skip to first unread message

Nathan Smith

unread,
Aug 1, 2016, 4:07:21 PM8/1/16
to MOO Talk
hello everyone
it's your favorite newb here, heh.
Anyway, I'm running a moo on a dedicated 8 GB ram server and something is seriously eating up the memory

So I have a few questions of which I know the answers to, but would like an expert to back up my knowledge on the matter:
1. Is 8 GB enough for a MOO?
2. What uses more, forks or whiles
3. What are the absolute do nots for forks, i.e, I know that this is a massive don't:
fork(0)
insert verb code
this:(verb)();
endfork
But I assume there are a few others too.
4. What is best way to go about tracking memory usage within the moo. I've no custom builtins so there's no leaks there...


Thoughts?
thanks for reading.
Nate

Josh Benner

unread,
Aug 1, 2016, 4:12:34 PM8/1/16
to Nathan Smith, MOO Talk
We’ve run an active MOO for nearly two decades. We have hundreds of thousands of objects and our memory footprint is about 400MB. Much of that is years of in-game mail, room descriptions, and MOO databases (player DB and friends).

Running long-running processes does not have much direct impact on memory usage in a practical manner on its own. It’s all about what you’re loading into memory. All the objects and all their data are loaded into memory. All the data in variables in running tasks are loaded into memory.

I’d start by running object_bytes() on everything in the game and sorting it to see where all your RAM is going. Then try killing all tasks and restarting as a shotgun attempt to determine if your long-running tasks are gobbling up RAM. If neither of those things suggests what’s taking RAM, then you have some sort of leak.

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at https://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.

Tim van Dijen

unread,
Aug 1, 2016, 4:21:40 PM8/1/16
to MOO-...@googlegroups.com
On 1-8-2016 at 22:04 Nathan Smith wrote:
hello everyone
it's your favorite newb here, heh.
Anyway, I'm running a moo on a dedicated 8 GB ram server and something is seriously eating up the memory

So I have a few questions of which I know the answers to, but would like an expert to back up my knowledge on the matter:
1. Is 8 GB enough for a MOO?
It's about 25 times too much.. Completely useless.. Rule of thumb used to be 2,5-3 times the size of your database.


2. What uses more, forks or whiles
They don't compare in that way

3. What are the absolute do nots for forks, i.e, I know that this is a massive don't:
fork(0)
insert verb code
this:(verb)();
endfork
Why would that be a no go?? Al that does is spawn a new process every time, which is not a bad thing to do.. Depending on your use-case.

But I assume there are a few others too.
4. What is best way to go about tracking memory usage within the moo. I've no custom builtins so there's no leaks there...
If your MOO-process in Unix/Linux is growing endlessly, you might want to run it through Valgrind.. But if it's true that you haven't made any changes to the MOO-server, it's quite unlikely that you're going to find any leaks. I have already volounteered to you to help you with that..


Thoughts?

Forks and whiles are potentials for wasting ticks / cpu, but have little to do with memory usage... Other than that.. Your problems a week or two ago were server crashes... It makes me wonder what really is going on, because all this just doesn't happen when running a stock MOO-server.. (GammaMOO was it, right?)
Reply all
Reply to author
Forward
0 new messages