[SERVER-8024] getLastError >90 ms delay over mongos Created: 23/Dec/12 Updated: 25/Jun/15 Resolved: 23/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.0.6, 2.2.0, 2.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Konstantin Belov | Assignee: | Ramon Fernandez Marina |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | freebsd, sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
FreeBSD 8.2 / 9.0 / 9.1 PRERELEASE |
||
| Operating System: | FreeBSD |
| Steps To Reproduce: | Simple php script: <?php $collection = new MongoCollection($db, 'c1'); $mt = microtime(true); |
| Participants: |
| Description |
|
I'am trying to deploy shard cluster for tests. And every time when execute update there is strange delay 90+ ms. mongos.log: Sun Dec 23 23:41:06 [conn1] Request::process begin ns: test.$cmd msg id: 2 op: 2004 attempt: 0 ntoreturn: -1 options : 0 0ms I add some debug information into: src/mongo/s/client_info.cpp (function ClientInfo::getLastError): Timer t; ShardConnection conn( theShard , "" ); |
| Comments |
| Comment by Ramon Fernandez Marina [ 23/Jul/14 ] |
|
belov, we haven't heard back from you for some time, so we're going to mark this ticket as resolved. If this is still an issue for you, feel free to reopen the ticket and provide further information. Regards, |
| Comment by Ramon Fernandez Marina [ 14/Jul/14 ] |
|
belov, can you please let us know whether you're still seeing the 90ms delay? If the answer is yes, is that on 2.0/2.2 or in a newer version? Thanks, |
| Comment by Ramon Fernandez Marina [ 27/Jun/14 ] |
|
Hi belov, apologies for the late reply, seems we let this one fall through the cracks. Are you still on 2.0/2.2? If you have upgraded to 2.4/2.6, can you please let us know if you are still seeing this 90ms delay? |
| Comment by sam.helman@10gen.com [ 31/Jan/13 ] |
|
Hello, We have had some historical issues with freebsd and MongoDB related to performance - additionally, since there are relatively few freebsd deployments, it is easier to run into edge cases which have not yet been discovered. If general, we recommend not using freebsd for deployment. Is this a possibility for you? There are some threads related to performance on freebsd linked here: http://serverfault.com/questions/401659/mongodb-on-freebsd. Thanks |
| Comment by Konstantin Belov [ 25/Jan/13 ] |
|
Sam, hello! Please read my previous post. Under freebsd problem caused by socket implementation (mongo/util/net/sock.cpp) About config: If we make query direct to mongod (using mongo shell) or via linux mongos - delay is 0 ms. If we make query via freebsd mongos - delay is ALWAYS 90+ ms. I don't know why under freebsd when we read first four bytes from socket we get ~90 ms timeout |
| Comment by sam.helman@10gen.com [ 24/Jan/13 ] |
|
Hello, When you say that you tried on another machine under linux, do you mean that you tried the same setup on a different machine and had no issues? Are there additional processes (besides mongod) running on the slower machine that might be causing a general I/O slowdown? Are there any operations besides inserts which are causing the 90ms delay? Thanks |
| Comment by Konstantin Belov [ 24/Jan/13 ] |
|
Hello again! This timeout problem exists not only with command "getLastError", i add debug information into: "util/net/sock.cpp" at line 774 in function "unsafe_recv": int Socket::unsafe_recv( char *buf, int max ) mongos.log: So when we read first four bytes from socket we get ~90 ms timeout, why? o_O |
| Comment by Konstantin Belov [ 19/Jan/13 ] |
|
Hello! We use php driver 1.3.2, write concern = 1, in collections we have only one index - "_id". |
| Comment by sam.helman@10gen.com [ 16/Jan/13 ] |
|
Hello, The 90 ms delay could have a number of causes. If your insert is causing an index to be updated, this could create a delay since the index is updated on all shards. What write concern are you using, and which version of the php driver? Do you have any indexes on the collection? Thank you |