On Sat, Jan 5, 2013 at 4:02 PM, Chandru <
chand...@gmail.com> wrote:
> Thanks for taking the time to explain futex. Is proc.c source the best place
> to learn how the scheduler works or is there another documentation I've
> missed?
I am not aware of any other documentation.
> While I understand time spent on syscall is actual work, I'm trying to
> reduce it further because I could achieve much better performance (almost
> twice) with the node.js implementation. I may have either used mgo wrong or
> mgo's implementation may need some improvement.
When you set GOMAXPROCS to a higher value, are you able to fully load all cores?
I see that 30% of time is spent in bson decoding. I guess node.js uses
C library to that, right? Go implementation is not 100% optimal. I may
suggest trying to use gccgo which must generate much better straight
line code. However, I never actually investigated what benefits it can
provide for such program. Maybe somebody on the list can provide some
insights on this.