Skip to content

Commit

Permalink
Longer initial RTO and logging.
Browse files Browse the repository at this point in the history
Make the initial RTO for connections in SST longer by just multiplying
the value. This makes sure the initial value isn't too low an
approximation if the first round trip happens to be very quick due to
low load (both network and CPU). If it remains as low as the initial
value, it will quickly converge anyway.

Also add a couple of logging statements at insane level for experiments.
  • Loading branch information
ewencp committed Apr 23, 2013
1 parent 5b65648 commit 4a0f823
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libcore/include/sirikata/core/network/SSTImpl.hpp
Expand Up @@ -1016,7 +1016,7 @@ class SIRIKATA_EXPORT Connection {
segment->mAckTime = Timer::now();

if (mFirstRTO ) {
mRTOMicroseconds = ((segment->mAckTime - segment->mTransmitTime).toMicroseconds()) ;
mRTOMicroseconds = 10 * ((segment->mAckTime - segment->mTransmitTime).toMicroseconds()) ;
mFirstRTO = false;
}
else {
Expand Down
2 changes: 2 additions & 0 deletions liboh/plugins/manual_query/ManualObjectQueryProcessor.cpp
Expand Up @@ -86,6 +86,8 @@ void ManualObjectQueryProcessor::presenceConnected(HostedObjectPtr ho, const Spa
}

void ManualObjectQueryProcessor::presenceConnectedStream(HostedObjectPtr ho, const SpaceObjectReference& sporef, SSTStreamPtr strm) {
SILOG(ho-proxies-count, insane, "PROXIES-INFO BASE STREAM CREATED " << sporef << ", " << (mContext->simTime()-Time::null()).microseconds() << " time");

// And possibly register the query
ObjectStateMap::iterator obj_it = mObjectState.find(sporef);
if (obj_it == mObjectState.end())
Expand Down
2 changes: 2 additions & 0 deletions liboh/plugins/simple_query/SimpleObjectQueryProcessor.cpp
Expand Up @@ -50,6 +50,7 @@ void SimpleObjectQueryProcessor::presenceConnectedStream(HostedObjectPtr ho, con
mObjectStateMap[sporef] = ObjectStatePtr(new ObjectState(mContext, ho));;

// And setup listeners for new data from the server
SILOG(ho-proxies-count, insane, "PROXIES-INFO BASE STREAM CREATED " << sporef << ", " << (mContext->simTime()-Time::null()).microseconds() << " time");
strm->listenSubstream(OBJECT_PORT_PROXIMITY,
std::tr1::bind(&SimpleObjectQueryProcessor::handleProximitySubstream, this,
HostedObjectWPtr(ho), sporef, _1, _2
Expand All @@ -70,6 +71,7 @@ void SimpleObjectQueryProcessor::presenceDisconnected(HostedObjectPtr ho, const
// Proximity

void SimpleObjectQueryProcessor::handleProximitySubstream(const HostedObjectWPtr& weakHO, const SpaceObjectReference& spaceobj, int err, SSTStreamPtr s) {
SILOG(ho-proxies-count, insane, "PROXIES-INFO PROX SUBSTREAM CREATED " << spaceobj << ", " << (mContext->simTime()-Time::null()).microseconds() << " time");
String* prevdata = new String();
s->registerReadCallback(
std::tr1::bind(&SimpleObjectQueryProcessor::handleProximitySubstreamRead, this,
Expand Down

0 comments on commit 4a0f823

Please sign in to comment.