By "cold" do you mean immediately following a server restart? Is each "cold" run a new Java process? If so, you probably have some class-loader activity in your measurement. A fair bit of the difference is probably an authentication round-trip. Might also be some penalty for DNS resolution. Just a few thoughts.
Can you provide some more information and/or source code to clarify how you're running the test? What OS/JDK versions are you running? Are client and server on the same machine? Sam Neth Lead Engineer MarkLogic Corporation On Apr 14, 2011, at 12:52 PM, Mike Sokolov wrote: I'm working on optimizing some queries on one of our MarkLogic sites using cq's profiling feature and also looking at query times in our logs, and they seem oddly out of sync. The times in our logs are based on wrapping calls to XCC Session.submitRequest() between calls to Java System.currentTimeMillis(), so presumably they include some network time and serialization/deserialization that may be different from what's shown in cq. However, the difference is much larger for cold queries (first time run) then it is for warmed queries, which seems odd since you would expect that kind of difference (packaging and transmission) to be the same for warm and cold queries. A typical set of numbers might be: cold, cq: 110 ms warm, cq 10 ms cold, xcc: 440 ms warm, xcc: 14 ms This result is consistent across many queries: it's the rule, so far as I can tell. We're using a slightly older XCC (version 4.1.3, I think, and the server version is 4.1.6). I do plan to upgrade, but this was so odd that I wanted to make sure I wasn't overlooking something known that could cause this kind of discrepancy. Any ideas? -- Michael Sokolov Engineering Director www.ifactory.com<http://www.ifactory.com> _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
