2.1 @ master without monitoring
$ stackprof mongo2-1.dump
==================================
Mode: cpu(1000)
Samples: 11996 (0.00% miss rate)
GC: 0 (0.00%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
4657 (38.8%) 4657 (38.8%) block in Mongo::Socket#write
3964 (33.0%) 3964 (33.0%) Mongo::Socket#read_from_socket
2025 (16.9%) 579 (4.8%) #<Module:0x007fd3336bbcb0>.deserialize
318 (2.7%) 318 (2.7%) block in Mongo::Socket#readbyte
212 (1.8%) 212 (1.8%) #<Module:0x007fd3336bbad0>.serialize
214 (1.8%) 186 (1.6%) Mongo::Operation::ReadPreference#update_options
4731 (39.4%) 171 (1.4%) Mongo::ServerSelector::Selectable#select_server
164 (1.4%) 164 (1.4%) BSON::Integer#to_bson
154 (1.3%) 154 (1.3%) Mongo::Server#description
143 (1.2%) 143 (1.2%) Mongo::Server#pool
135 (1.1%) 135 (1.1%) Mongo::Collection::View::Readable#setup_selector
214 (1.8%) 126 (1.1%) Mongo::Server::ConnectionPool::Queue#dequeue_connection
115 (1.0%) 115 (1.0%) #<Module:0x007fd3336bbc10>.serialize
109 (0.9%) 94 (0.8%) Mongo::Collection::View::Readable#read
93 (0.8%) 90 (0.8%) Mongo::Protocol::Serializers::BitVector#serialize
87 (0.7%) 87 (0.7%) block in Mongo::Server::ConnectionPool::Queue#dequeue_connection
74 (0.6%) 74 (0.6%) block in Mongo::Collection::View::Readable#flags
286 (2.4%) 72 (0.6%) Mongo::Collection#find
65 (0.5%) 65 (0.5%) BSON::Document#initialize
128 (1.1%) 53 (0.4%) Mongo::Collection::View::Readable#query_options
51 (0.4%) 51 (0.4%) #<Module:0x007fd3336bbcb0>.serialize
209 (1.7%) 51 (0.4%) Mongo::Collection::View::Readable#query_spec
38 (0.3%) 38 (0.3%) Mongo::Protocol::Query#determine_limit
28 (0.2%) 28 (0.2%) Mongo::Database#cluster
21 (0.2%) 21 (0.2%) Mongo::Collection::View::Immutable#configure
51 (0.4%) 20 (0.2%) Mongo::Cluster::Topology::Single#servers
19 (0.2%) 19 (0.2%) block (2 levels) in Mongo::Cluster#servers_list
19 (0.2%) 19 (0.2%) block in Mongo::Socket#gets
15 (0.1%) 15 (0.1%) Mongo::Collection#read_preference
14 (0.1%) 14 (0.1%) BSON::String#to_utf8_binary
1.8.2
$ stackprof mongo1-8.dump
==================================
Mode: cpu(1000)
Samples: 7456 (0.00% miss rate)
GC: 0 (0.00%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
3522 (47.2%) 3522 (47.2%) Mongo::TCPSocket#read
2434 (32.6%) 2434 (32.6%) Mongo::TCPSocket#send
455 (6.1%) 325 (4.4%) Mongo::Cursor#initialize
292 (3.9%) 292 (3.9%) BSON::ByteBuffer#initialize
202 (2.7%) 199 (2.7%) BSON::ByteBuffer#put_num
602 (8.1%) 147 (2.0%) Mongo::Collection#find
142 (1.9%) 142 (1.9%) BSON::BSON_RUBY.to_utf8_binary
128 (1.7%) 128 (1.7%) Mongo::Cursor#convert_fields_for_query
6821 (91.5%) 87 (1.2%) Mongo::Logging#instrument
35 (0.5%) 35 (0.5%) BSON::ByteBuffer#prepend!
27 (0.4%) 21 (0.3%) Mongo::Pool#checkout
7456 (100.0%) 21 (0.3%) Mongo::Collection#find_one
17 (0.2%) 17 (0.2%) Mongo::Networking#new_binary_string
39 (0.5%) 11 (0.1%) Mongo::MongoClient#checkout_reader
9 (0.1%) 9 (0.1%) block in Mongo::Networking#get_request_id
6833 (91.6%) 8 (0.1%) Mongo::Cursor#next
11 (0.1%) 6 (0.1%) BSON::BSON_C.deserialize
3569 (47.9%) 6 (0.1%) Mongo::Networking#receive
1613 (21.6%) 5 (0.1%) Mongo::Networking#receive_header
5 (0.1%) 5 (0.1%) BSON::ByteBuffer#put_binary
803 (10.8%) 4 (0.1%) Mongo::Networking#receive_response_header
4 (0.1%) 4 (0.1%) Mongo::Cursor#instrument_payload
4 (0.1%) 4 (0.1%) Mongo::Cursor#close_cursor_if_query_complete
3 (0.0%) 3 (0.0%) Mongo::ThreadLocalVariableManager#thread_local
3 (0.0%) 3 (0.0%) Mongo::Networking#check_response_flags
2 (0.0%) 2 (0.0%) block in Mongo::Pool#checkin
2 (0.0%) 2 (0.0%) #<Module:0x007ff27beb93d8>.instrumenter
2 (0.0%) 2 (0.0%) BSON::ByteBuffer#to_s
2 (0.0%) 2 (0.0%) BSON::ByteBuffer#ensure_length
2 (0.0%) 1 (0.0%) Mongo::Pool#checkout_existing_socket