News for hackers. Stuff that matters.
Re:Show HN: Rbkit – a low-pause profiler for ruby by thinkbohemian on Friday January 16, 2015 @10:30AM (#8899454)
This is really really cool. Thanks for posting. I'm especially interested in memory usage right now. I wrote a way to generate load and measure memory impact on your app: https://github.com/schneems/derailed_benchmarks

Comparing the two, it looks like this app only uses heap size for memory and doesn't take into account memory that isn't being used but hasn't been freed. https://www.dropbox.com/s/679sd83gqlkligk/Screenshot%202015-...

From `ps` i'm seeing about ~ 200mb RSS usage where rbkit is only showing ~50mb. I wonder what we could do to increase the accuracy here without having to shell out (very slow).

Also as a note if the gem install fails, on a mac I needed to run this:

    $ brew install msgpack
    $ brew install zeromq
Then it worked fine. Thanks again! Projects like this get me really excited for a future with faster applications and better informed developers.
Re:Show HN: Rbkit – a low-pause profiler for ruby by gnufied on Friday January 16, 2015 @10:40AM (#8899528)
I think, we have some work to document what those values mean. RES in graph - is not total RSS memory usage, it is memory ruby has allocated on C heap via `malloc` calls.

If you are familiar with Ruby internals, ruby heap can store small sized objects (such as smaller strings, smaller arrays etc) in its own heap, but for larger objects ruby uses `malloc` and the ruby heap itself just keeps a pointer to memory allocated. The RES size in graph is approximately that value.

Total RSS size of ruby process is lot bigger, it is combination of C heap, Ruby heap and other allocations which ruby is not even aware of (such as a C extension using `malloc` calls).

Re:Show HN: Rbkit – a low-pause profiler for ruby by gnufied on Friday January 16, 2015 @10:56AM (#8899655)
Sorry for replying here again. So yeah - we plan to report RSS memory as well, but we obviously don't want to shell out.

But - we can do this in C though via the rbkit library. A quick google search returns something like - http://nadeausoftware.com/articles/2012/07/c_c_tip_how_get_p...

Happy to merge a PR that reports this data to the desktop app (from then on it is trivial to actually display or plot it on desktop app).

Re:Show HN: Rbkit – a low-pause profiler for ruby by nateberkopec on Friday January 16, 2015 @08:33AM (#8898741)
The Ruby community has gotten very serious about speed in the last year or so. This bodes well for the entire language. Well done guys!
Re:Show HN: Rbkit – a low-pause profiler for ruby by ScotterC on Friday January 16, 2015 @10:47AM (#8899592)
That's the best apart about having a community like this. When a focus/problem gets presented it wields such a massive amount of force/man-hours to attack the problem
Re:Show HN: Rbkit – a low-pause profiler for ruby by gnufied on Friday January 16, 2015 @07:24AM (#8898400)
This is something we have been working in our free time for last several months. The instrumentation support in Ruby seems to be coming together at last and ko1 (Koichi Sasada) has done lot of work in that regard.

For those interested in quickly finding out, what rbkit can do , check http://rbkit.codemancers.com/v0.1.10/docs/using-rbkit-deskto...

Re:Show HN: Rbkit – a low-pause profiler for ruby by sciurus on Friday January 16, 2015 @03:34PM (#8901507)
Re:Show HN: Rbkit – a low-pause profiler for ruby by BilalBudhani on Friday January 16, 2015 @06:42AM (#8898269)
Seems like a useful utility. Good work Hemant and team.
Re:Show HN: Rbkit – a low-pause profiler for ruby by tsax on Friday January 16, 2015 @11:18AM (#8899783)
Brilliant! When profilers are this easy to use, more people will use them, and the whole Ruby ecosystem will see better performance. Well done.
Re:Show HN: Rbkit – a low-pause profiler for ruby by keithxm23 on Friday January 16, 2015 @09:31AM (#8899076)
This looks brilliant. I was hoping it worked for my ruby-1.8.7 application though :( Are there similar applications for versions of ruby lower than ruby-2.1.0?
Re:Show HN: Rbkit – a low-pause profiler for ruby by nirvdrum on Friday January 16, 2015 @10:47AM (#8899590)
One potential option is using one of the JRuby 1.7.x releases, which still supports the Ruby 1.8 language level. You'll be able to use all the JVM tools, such as VisualVM, which offer similar functionality.
Re:Show HN: Rbkit – a low-pause profiler for ruby by gnufied on Friday January 16, 2015 @09:37AM (#8899113)
I think support for Ruby 1.8.7 has ended, so it is very unlikely you will see anything like this written for that version of Ruby. You should seriously consider migrating from that version.

Having said that - As one of the authors of Rbkit - it does not even work on 1.9.x - because instrumentation support we require from Ruby isn't simply there.

Re:Show HN: Rbkit – a low-pause profiler for ruby by matugm on Friday January 16, 2015 @08:51AM (#8898849)
Nice, it looks like Java's VisualVM, I will give it a try :)