Skip to content

Commit

Permalink
Tune for higher transaction processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrippled committed Dec 10, 2017
1 parent 090d813 commit ce6948f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
5 changes: 4 additions & 1 deletion src/ripple/overlay/impl/PeerImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ using namespace std::chrono_literals;

namespace ripple {

// The maximum number of transactions to have in the job queue.
int const max_transactions = 1000;

PeerImp::PeerImp (Application& app, id_t id, endpoint_type remote_endpoint,
PeerFinder::Slot::ptr const& slot, http_request_type&& request,
protocol::TMHello const& hello, PublicKey const& publicKey,
Expand Down Expand Up @@ -1088,7 +1091,7 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMTransaction> const& m)
}
}

if (app_.getJobQueue().getJobCount(jtTRANSACTION) > 100)
if (app_.getJobQueue().getJobCount(jtTRANSACTION) > max_transactions)
{
JLOG(p_journal_.info()) << "Transaction queue is full";
}
Expand Down
50 changes: 25 additions & 25 deletions src/ripple/resource/impl/Fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@
namespace ripple {
namespace Resource {

Charge const feeInvalidRequest ( 10, "malformed request" );
Charge const feeRequestNoReply ( 1, "unsatisfiable request" );
Charge const feeInvalidSignature ( 100, "invalid signature" );
Charge const feeUnwantedData ( 15, "useless data" );
Charge const feeBadData ( 20, "invalid data" );

Charge const feeInvalidRPC ( 10, "malformed RPC" );
Charge const feeReferenceRPC ( 2, "reference RPC" );
Charge const feeExceptionRPC ( 10, "exceptioned RPC" );
Charge const feeLightRPC ( 5, "light RPC" ); // DAVID: Check the cost
Charge const feeLowBurdenRPC ( 20, "low RPC" );
Charge const feeMediumBurdenRPC ( 40, "medium RPC" );
Charge const feeHighBurdenRPC ( 300, "heavy RPC" );

Charge const feeLightPeer (1, "trivial peer request" );
Charge const feeLowBurdenPeer (2, "simple peer request" );
Charge const feeMediumBurdenPeer (50, "moderate peer request" );
Charge const feeHighBurdenPeer (250, "heavy peer request" );

Charge const feeNewTrustedNote ( 10, "trusted note" );
Charge const feeNewValidTx ( 10, "valid tx" );
Charge const feeSatisfiedRequest ( 10, "needed data" );

Charge const feeWarning ( 200, "received warning" );
Charge const feeDrop ( 300, "dropped" );
Charge const feeInvalidRequest ( 100, "malformed request" );
Charge const feeRequestNoReply ( 10, "unsatisfiable request" );
Charge const feeInvalidSignature ( 1000, "invalid signature" );
Charge const feeUnwantedData ( 150, "useless data" );
Charge const feeBadData ( 200, "invalid data" );

Charge const feeInvalidRPC ( 100, "malformed RPC" );
Charge const feeReferenceRPC ( 20, "reference RPC" );
Charge const feeExceptionRPC ( 100, "exceptioned RPC" );
Charge const feeLightRPC ( 50, "light RPC" ); // DAVID: Check the cost
Charge const feeLowBurdenRPC ( 200, "low RPC" );
Charge const feeMediumBurdenRPC ( 400, "medium RPC" );
Charge const feeHighBurdenRPC ( 3000, "heavy RPC" );

Charge const feeLightPeer ( 1, "trivial peer request" );
Charge const feeLowBurdenPeer ( 20, "simple peer request" );
Charge const feeMediumBurdenPeer ( 500, "moderate peer request" );
Charge const feeHighBurdenPeer ( 2500, "heavy peer request" );

Charge const feeNewTrustedNote ( 100, "trusted note" );
Charge const feeNewValidTx ( 100, "valid tx" );
Charge const feeSatisfiedRequest ( 100, "needed data" );

Charge const feeWarning ( 2000, "received warning" );
Charge const feeDrop ( 3000, "dropped" );

}
}
6 changes: 3 additions & 3 deletions src/ripple/resource/impl/Tuning.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ namespace Resource {
enum
{
// Balance at which a warning is issued
warningThreshold = 500
warningThreshold = 5000

// Balance at which the consumer is disconnected
,dropThreshold = 1500
,dropThreshold = 15000

// The number of seconds in the exponential decay window
// (This should be a power of two)
,decayWindowSeconds = 32

// The minimum balance required in order to include a load source in gossip
,minimumGossipBalance = 100
,minimumGossipBalance = 1000
};

// The number of seconds until an inactive table item is removed
Expand Down

0 comments on commit ce6948f

Please sign in to comment.