Skip to content

Commit

Permalink
Merge pull request #2048 from skalenetwork/bug/improve-performance
Browse files Browse the repository at this point in the history
Revert ZMQ fix
  • Loading branch information
DmytroNazarenko authored Nov 27, 2024
2 parents fd06b54 + e44a1b7 commit 7cc4156
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions libskale/broadcaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,17 @@ void* ZmqBroadcaster::server_socket() const {
if ( !m_zmq_server_socket ) {
m_zmq_server_socket = zmq_socket( m_zmq_context, ZMQ_PUB );

int val = 16;
int val = 15000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_IVL, &val, sizeof( val ) );
val = 3000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TIMEOUT, &val, sizeof( val ) );
val = 60000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TTL, &val, sizeof( val ) );

val = 16;
zmq_setsockopt( m_zmq_server_socket, ZMQ_SNDHWM, &val, sizeof( val ) );


const dev::eth::ChainParams& ch = m_client.chainParams();

// connect server to clients
Expand All @@ -116,11 +124,11 @@ void* ZmqBroadcaster::client_socket() const {
int value = 1;

zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE, &value, sizeof( value ) );
value = 15;
value = 300;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_IDLE, &value, sizeof( value ) );
value = 10;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_CNT, &value, sizeof( value ) );
value = 15;
value = 300;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_INTVL, &value, sizeof( value ) );

value = 16;
Expand Down

0 comments on commit 7cc4156

Please sign in to comment.