lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Apr 1, 2009 at 7:28 PM, Jorge <xxopxe@gmail.com> wrote:
> Hi list.
>
> I wonder how to profile memory usage. I have this application, a
> content-based router that moves notifications and subscriptions trough a
> p2p network. It's based around a socket server (LuaSocket based), and
> keeps lots of tables for peer lists, loop detection, subscription
> filters, and assorted stuff. The memory consumption fluctuates a lot
> with usage patterns, and there are a few configuration parameters that
> have a serious impact.
> It's intended to be run on plain consumer-grade wireless routers
> (WRT54GL's and such), so RAM consumption is an issue.
> I've googled around and only found stuff related to pre-5.1 lua,and
> wonder if there's an easy way to see what tables are consuming what.
>

I have exactly the same problem with not having enough tools to view
memory usage (also in a server).

I found this a while ago, but have yet to try it:
http://jan.kneschke.de/projects/profiling-lua-with-kcachegrind

It might be worth a try, it looks good.

Matthew.