Code Monkey home page Code Monkey logo

Comments (3)

bergerch avatar bergerch commented on July 17, 2024 1

Hello!

Personally, I think everything looks fine.

Note that during the execution of Shadow, there might be multiple warnings regarding not implemented syscalls. These are usually no problem at all. Apart from that some events which should be of level [info] seem to be reported as [error] like

2024-02-21T12:09:12.338Z [error] : childprocess: ** Starting Shadow v2.2.0 with GLib v2.72.4

But there is no need to worry here either! :-)

Just from seeing your Client and Replica Log files, the system did sucessfully reach consensus on several requests. For instance:

[2m2000-01-01T00:00:03.002800Z [0m [32m INFO [0m [2mbench_client [0m [2m: [0m RPS: 16200
[2m2000-01-01T00:00:03.002800Z [0m [32m INFO [0m [2mbench_client [0m [2m: [0m LAG: 42

means the client achieved a throughput of 16200 requests per second (RPS) and a latency of 42 milliseconds
This also implies the replicas sucessfully executed the PBFT algorithm! Usually the replica logs do not show much in Themis since the client logs both throughput and latency results.

The configuration file you use seems also fine to me at first sight. I would recommend to use a higher duration (both experiment as a whole and higher client duration) Note that the client's start time PLUS client duration should not exceed the experiment duration, or else the client process is killed by the experiment tear-down procedure (and will not report aggregated results). I also only recomment having a single client initially before making more complex experiments.

I would recommend the following: (here in JSON, you have to edit the YAML file in YAML):

{
name: '4rep',
misc: {
runahead: '630 us',
duration: '70 s',
parallelism: 5,
useShortestPath: false
},
network: {
replicaBandwidthUp: '10 Gibits',
replicaBandwidthDown: '10 Gibits',
clientBandwidthUp: '10 Gibits',
clientBandwidthDown: '10 Gibits',
latency: { uniform: true, replicas: '1 ms', clients: '1 ms' },
packetLoss: 0
},
replica: {
replicas: 4,
minBatchSize: 400,
maxBatchSize: 400,
replySize: 1024,
batchReplies: true,
requestTimeout: 40000,
batchTimeout: { secs: 1, nano: 10000000 }
},
client: {
numberOfHosts: 1,
clients: 1,
startTime: '5 s',
payload: 1024,
concurrent: 400,
duration: 60
}
}

from tool.

bergerch avatar bergerch commented on July 17, 2024 1

Be aware that the "crash-pbft-4-mini" is an experimental description file what will simulate, i.e., induce a crash during the experiment. by killing replica 0. When that happens connection to 0 is lost, and the other replicas will initiate a view-change. Probably you want to comment out the following lines to run the experiment without a simulated fault:

  fault:
    type: crash
    threshold: 0.25
    timestamp: 20 s

(otherwise replica 0 is crashed at time=20s)

What you observe in your tmux runs with themis are just checkpoints (not the actual commits ;-) ). These checkpoints are also made in the simulation, but less freuqently, you might want to choose a lower checkpoint interval by modifying this file:
https://github.com/Delphi-BFT/tool/blob/d4b501e9758cdc27ac8df28c7fd1ba9f8ee03943/src/connectors/assets/themis/pbft.toml

If you really want to observe allReplica messages like Prepare and Commit, I you have to use LOG LEVEL of either DEBUG or TRACE (this is true for both your lcoal tmux execution and execution in the simulator).

On your system, set the environment variable "RUST_LOG" to either DEBUG or TRACE, and restart your bash or tmux.

In https://github.com/Delphi-BFT/tool/blob/d4b501e9758cdc27ac8df28c7fd1ba9f8ee03943/src/connectors/themis.js
Replace 'RUST_LOG=INFO' with 'RUST_LOG=TRACE' for both the client and the replica application :-)

from tool.

zaminsirat avatar zaminsirat commented on July 17, 2024

Thanks for your answer.
Due to the lack of documentation on Themis, your answer helped me a lot. Actually, my thesis is on PBFT and It seems that there is no plotting facility in Themis.

I expect that Themis give us more information in log such as messages: pre-prepare, prepare, commit, viewchange and ...

I ran your recommend config and expected commit message but there is no additional info:

2000-01-01T00:00:00.000000Z  INFO themis_bench_app: STARTING REPLICA 1    
2000-01-01T00:00:00.000000Z  INFO themis_bench_app: Logging: INFO    
2000-01-01T00:00:00.000000Z  INFO themis_bench_app: selected runtime Single    
2000-01-01T00:00:00.000000Z  INFO themis_pbft: PBFTConfig {
    num_peers: 4,
    faults: 1,
    checkpoint_interval: 1200,
    high_mark_delta: 3200,
    request_timeout: 40000,
    keep_checkpoints: 2,
    request_proposals: false,
    primary_forwarding: Full,
    backup_forwarding: Full,
    reply_mode: All,
    debug_delay_proposal_us: 0,
    debug_force_vc: ForceVc {
        in_view: 0,
        at_seq: 0,
    },
}
2000-01-01T00:00:00.000000Z  INFO themis_bench_app: setup modules    
2000-01-01T00:00:00.000000Z  INFO themis_core::net::tcp::endpoint: binding ("11.54.205.89", 10003)
2000-01-01T00:00:00.000000Z  INFO themis_core::net::tcp::endpoint: binding ("11.54.205.89", 1000)
2000-01-01T00:00:00.000000Z  INFO themis_core::modules: batching=true
2000-01-01T00:00:00.000000Z  INFO themis_core::modules: BatchConfig {
    min: 400,
    max: 400,
    timeout: Some(
        1.1s,
    ),
    rel_timeout: None,
}
2000-01-01T00:00:00.004000Z  INFO themis_core::net::tcp::group: Connected 2 from 11.230.234.197:32348
2000-01-01T00:00:00.004000Z  INFO themis_core::net::tcp::group: Connected 3 from 11.241.101.12:34555
2000-01-01T00:00:00.005000Z  INFO themis_core::net::tcp::group: Connected 0 from 11.96.183.127:10003
2000-01-01T00:00:05.005000Z  INFO themis_core::net::tcp::group: Connected 100 from 11.117.168.245:40548
2000-01-01T00:01:05.005000Z  WARN themis_core::net::tcp::group: Connection to 100 disconnected.
2000-01-01T00:01:05.821000Z  WARN themis_core::net::tcp::group: Cannot send Request message to 100: Does not have a connection.
2000-01-01T00:01:05.821000Z  WARN themis_core::net::tcp::group: Cannot send Request message to 100: Does not have a connection.

Then I ran Themis tmux sample:
https://github.com/ibr-ds/themis/blob/753b48f56f5bf37cae75189d45ef47396b8eb1a5/tmux.yaml

I can get connection and commit log from the replica.

2024-02-21T16:25:39.080931Z  INFO themis_bench_app: STARTING REPLICA 3                                                                                        
2024-02-21T16:25:39.080950Z  INFO themis_bench_app: Logging: info                                                                                             
2024-02-21T16:25:39.080954Z  INFO themis_bench_app: selected runtime Single                                                                                   
2024-02-21T16:25:39.081346Z  INFO themis_pbft: PBFTConfig {                                                                                                   
    num_peers: 4,                                                                                                                                             
    faults: 1,                                                                                                                                                
    checkpoint_interval: 1000,                                                                                                                                
    high_mark_delta: 3000,                                                                                                                                    
    request_timeout: 1000,                                                                                                                                    
    keep_checkpoints: 2,                                                                                                                                      
    request_proposals: false,                                                                                                                                 
    primary_forwarding: Full,                                                                                                                                 
    backup_forwarding: Full,                                                                                                                                  
    reply_mode: All,                                                                                                                                          
    debug_delay_proposal_us: 0,                                                                                                                               
    debug_force_vc: ForceVc {                                                                                                                                 
        in_view: 0,                                                                                                                                           
        at_seq: 0,                                                                                                                                            
    },                                                                                                                                                        
}                                                                                                                                                             
2024-02-21T16:25:39.081360Z  INFO themis_bench_app: setup modules                                                                                             
2024-02-21T16:25:39.081395Z  INFO themis_core::net::tcp::endpoint: binding ("::", 10303)                                                                      
2024-02-21T16:25:39.081445Z  INFO themis_core::net::tcp::endpoint: binding ("::", 10302)                                                                      
2024-02-21T16:25:39.081461Z  INFO themis_core::modules: batching=false                                                                                        
2024-02-21T16:25:39.081465Z  INFO themis_core::modules: BatchConfig {                                                                                         
    min: 100,                                                                                                                                                 
    max: 100,                                                                                                                                                 
    timeout: Some(                                                                                                                                            
        10ms,                                                                                                                                                 
    ),                                                                                                                                                        
    rel_timeout: None,                                                                                                                                        
}                                                                                                                                                             
2024-02-21T16:25:39.081689Z  INFO themis_core::net::tcp::group: Connected 0 from 127.0.0.1:10003                                                              
2024-02-21T16:25:39.081747Z  INFO themis_core::net::tcp::group: Connected 1 from 127.0.0.1:10103                                                              
2024-02-21T16:25:39.081782Z  INFO themis_core::net::tcp::group: Connected 2 from 127.0.0.1:10203                                                              
2024-02-21T16:25:39.117417Z  INFO themis_core::net::tcp::group: Connected 100 from [::ffff:127.0.0.1]:50016                                                   
2024-02-21T16:25:39.118436Z  INFO themis_core::net::tcp::group: Connected 111 from [::ffff:127.0.0.1]:50040                                                   
2024-02-21T16:25:39.118502Z  INFO themis_core::net::tcp::group: Connected 104 from [::ffff:127.0.0.1]:50024                                                   
2024-02-21T16:25:39.121850Z  INFO themis_core::net::tcp::group: Connected 101 from [::ffff:127.0.0.1]:50038
2024-02-21T16:25:39.128167Z  INFO themis_core::net::tcp::group: Connected 113 from [::ffff:127.0.0.1]:50058
2024-02-21T16:25:39.128944Z  INFO themis_core::net::tcp::group: Connected 106 from [::ffff:127.0.0.1]:50056
2024-02-21T16:25:39.128994Z  INFO themis_core::net::tcp::group: Connected 102 from [::ffff:127.0.0.1]:50084
2024-02-21T16:25:39.129290Z  INFO themis_core::net::tcp::group: Connected 107 from [::ffff:127.0.0.1]:50060
2024-02-21T16:25:39.130796Z  INFO themis_core::net::tcp::group: Connected 114 from [::ffff:127.0.0.1]:50134
2024-02-21T16:25:39.133731Z  INFO themis_core::net::tcp::group: Connected 110 from [::ffff:127.0.0.1]:50150
2024-02-21T16:25:39.134460Z  INFO themis_core::net::tcp::group: Connected 109 from [::ffff:127.0.0.1]:50100
2024-02-21T16:25:39.134532Z  INFO themis_core::net::tcp::group: Connected 115 from [::ffff:127.0.0.1]:50142
2024-02-21T16:25:39.134937Z  INFO themis_core::net::tcp::group: Connected 112 from [::ffff:127.0.0.1]:50124
2024-02-21T16:25:39.135430Z  INFO themis_core::net::tcp::group: Connected 108 from [::ffff:127.0.0.1]:50112
2024-02-21T16:25:39.140069Z  INFO themis_core::net::tcp::group: Connected 119 from [::ffff:127.0.0.1]:50194
2024-02-21T16:25:39.140516Z  INFO themis_core::net::tcp::group: Connected 118 from [::ffff:127.0.0.1]:50178
2024-02-21T16:25:39.141350Z  INFO themis_core::net::tcp::group: Connected 117 from [::ffff:127.0.0.1]:50164
2024-02-21T16:25:39.142059Z  INFO themis_core::net::tcp::group: Connected 103 from [::ffff:127.0.0.1]:50086
2024-02-21T16:25:39.142746Z  INFO themis_core::net::tcp::group: Connected 116 from [::ffff:127.0.0.1]:50160
2024-02-21T16:25:39.617216Z  WARN themis_pbft: checkpoint at 1000 stable. Last commit: 1000
2024-02-21T16:25:40.027739Z  WARN themis_pbft: checkpoint at 2000 stable. Last commit: 2000
2024-02-21T16:25:40.427091Z  WARN themis_pbft: checkpoint at 3000 stable. Last commit: 3033
2024-02-21T16:25:40.832923Z  WARN themis_pbft: checkpoint at 4000 stable. Last commit: 4033
2024-02-21T16:25:41.239574Z  WARN themis_pbft: checkpoint at 5000 stable. Last commit: 5033
2024-02-21T16:25:41.672694Z  WARN themis_pbft: checkpoint at 6000 stable. Last commit: 6033
2024-02-21T16:25:42.077355Z  WARN themis_pbft: checkpoint at 7000 stable. Last commit: 7033
2024-02-21T16:25:42.483192Z  WARN themis_pbft: checkpoint at 8000 stable. Last commit: 8033
2024-02-21T16:25:42.890582Z  WARN themis_pbft: checkpoint at 9000 stable. Last commit: 9033
2024-02-21T16:25:43.297246Z  WARN themis_pbft: checkpoint at 10000 stable. Last commit: 10033
2024-02-21T16:25:43.701913Z  WARN themis_pbft: checkpoint at 11000 stable. Last commit: 11033
2024-02-21T16:25:44.105472Z  WARN themis_pbft: checkpoint at 12000 stable. Last commit: 12033
2024-02-21T16:25:44.510216Z  WARN themis_pbft: checkpoint at 13000 stable. Last commit: 13033
2024-02-21T16:25:44.916271Z  WARN themis_pbft: checkpoint at 14000 stable. Last commit: 14033
2024-02-21T16:25:45.375702Z  WARN themis_pbft: checkpoint at 15000 stable. Last commit: 15033
2024-02-21T16:25:45.768180Z  WARN themis_pbft: checkpoint at 16000 stable. Last commit: 16033
2024-02-21T16:25:46.176518Z  WARN themis_pbft: checkpoint at 17000 stable. Last commit: 17033
2024-02-21T16:25:46.581520Z  WARN themis_pbft: checkpoint at 18000 stable. Last commit: 18033
2024-02-21T16:25:46.987001Z  WARN themis_pbft: checkpoint at 19000 stable. Last commit: 19033
2024-02-21T16:25:47.390155Z  WARN themis_pbft: checkpoint at 20000 stable. Last commit: 20033 

I ran crash-pbft-4-mini and replica logs gives me some additional info:

2000-01-01T00:00:00.108110Z  INFO themis_core::net::tcp::group: Connected 2 from 11.165.186.13:10003
2000-01-01T00:00:00.402760Z  INFO themis_core::net::tcp::group: Connected 0 from 11.43.98.47:10003
2000-01-01T00:00:00.715710Z  INFO themis_core::net::tcp::group: Connected 1 from 11.199.5.168:10003
2000-01-01T00:00:10.503080Z  INFO themis_core::net::tcp::group: Connected 100 from 11.14.164.41:23418
2000-01-01T00:00:20.185700Z  WARN themis_core::net::tcp::group: Connection to 0 disconnected.
2000-01-01T00:00:22.568000Z  WARN themis_core::net::tcp::group: Cannot send Protocol(FORWARD) message to 0: Does not have a connection.
2000-01-01T00:00:24.669900Z  WARN themis_core::net::tcp::group: Cannot send Protocol(FORWARD) message to 0: Does not have a connection.
2000-01-01T00:00:26.568900Z  INFO __measure::timeout: timeout reason=Request: a0ffdcc3
2000-01-01T00:00:26.931540Z  WARN themis_pbft: <0x2|0xffffffffffffffff|<Protocol(PREPARE)|1,1|80171d9f>|5408f5e3> message rejected due to active view change
2000-01-01T00:00:26.931540Z  WARN themis_pbft: <0x2|0xffffffffffffffff|<Protocol(PREPARE)|1,2|b17f5b2b>|38d5ea4c> message rejected due to active view change

I remember receiving a commit message when testing PBFT in the example files, but in the main example, I cannot see the commit.

from tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.