Sky Profiling

29 views
Skip to first unread message

Ben Johnson

unread,
Mar 30, 2013, 5:55:01 PM3/30/13
to sk...@googlegroups.com
I've been working on profiling a lot this weekend but got derailed by a Go profiling bug. Although I didn't get better performance yet, I was able to simplify the code base. I was able to remove the message loops that complicated the server and servlet code and was able to replace them with a single lock on each servlet for event inserts and deletes. I had a misunderstanding about the locks in LevelDB so I went overboard on synchronization.

Sky has the net/http/pprof package built in now so you can profile it while it's running by executing this a separate shell window:


That will perform a 30 second sample and then dump you in to the gopprof program. Use the "top10" and "web" commands to see what's happening. There's also a longer explanation of Go profiling here: http://blog.golang.org/2011/06/profiling-go-programs.html

(Note: I'm having a profiling issue on my Mac that is only profiling the GC thread so it doesn't show anything useful. I'd be curious to hear from any Linux users if you can profile successfully.)

I just need to update Skybox and the documentation and Sky v0.3.0 will be ready to go. Please let me know if you have a chance to run the latest code and have any issues with it.

Thanks!


Ben

Reply all
Reply to author
Forward
0 new messages