Skip to content

vasco-santos/iptb-dht-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iptb-dht-test

ìptb-dht-test aims to create stress tests for the DHT being used in ipfs.

ATTENTION: This is currently a WIP work. If you intend to test the js-ipfs, you need to use ipfs/js-ipfs#856, since the js-ipfs DHT cli is not released yet.

Table of Contents

Introduction

In the context of creating stress tests for libp2p-kad-dht, as well as paving the way to create a test bed for the libp2p-kad-dht, this repo was created.

The main focus of these tests are to test two different workloads, which usually are the focus of testing DHTs regarding its scalability. These workloads are churn intensive and lookup intensive. The first aims to test the network with a high number of peers connecting and disconnecting the network, while data is added to the dht and fetched back. The last one main goal is to have constant put and get in the network nodes.

Install

js-ipfs through CLI

Information can be obtained in ipfs/js-ipfs/#through-command-line-tool.

go-ipfs

Information can be ontained in ipfs/go-ipfs#install

IPTB

Information can be obtained in ipfs/iptb#install

IPTB Plugin

Needs to install plugin for using js-ipfs. Information can be otained in ipfs/iptb-plugins

Usage

With this tool, we can create a DHT simulation, as well as visualize the results obtained from previous simulations (data stored in files).

Use the simulation command:

> npm run start -- simulation --help

simulation

Start a dht simulation

Options:
  --version              Show version number                           [boolean]
  --help                 Show help                                     [boolean]
  --implementation       ipfs implementation. (ipfs or jsipfs)
                                                             [default: "jsipfs"]
  --nodes, -n            Number of nodes.                          [default: 10]
  --iterations, -i       Number of iterations of putting and getting data.
                                                                  [default: 200]
  --lookup-factor, --lf  Keys replication for the number of nodes.  [default: 2]
  --churn-factor, --cf   Churn per second.                          [default: 2]

According to the above, we can execute the following command to overwrite the default number of nodes:

npm run start -- simulation --nodes 15

Use the statistics comand:

> npm run start -- statistics --help

statistics <filePath>

Show dht simulation statistics

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Experience

The metrics that can be obtained with this test are the following:

  • lookup average round trip latency
  • success rate

Results

WIP

About

Testbed for the DHT being used in js-ipfs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published