Added lazy batch for nimlibp2p

This commit is contained in:
Alberto Soutullo 2024-06-13 17:20:08 +02:00
parent aadde501d9
commit 5b852d5817
No known key found for this signature in database
GPG Key ID: A7CAC0D8343B0387
10 changed files with 478 additions and 0 deletions

View File

@ -0,0 +1 @@
kubectl delete --all statefulset -n zerotesting-nimlibp2p

View File

@ -0,0 +1,13 @@
#!/bin/bash
YAMLS=("lazy/deploy_100b-mplex-1.2.yaml" "lazy/deploy_100b-mplex-1.3.yaml" "lazy/deploy_100b-yamux-1.2.yaml" "lazy/deploy_100b-yamux-1.3.yaml" "lazy/deploy_1000b-mplex-1.2.yaml" "lazy/deploy_1000b-mplex-1.3.yaml" "lazy/deploy_1000b-yamux-1.2.yaml" "lazy/deploy_1000b-yamux-1.3.yaml")
# Nested loops to iterate over nodes and publisher files
for nodes_file in "${YAMLS[@]}"; do
kubectl apply -f $nodes_file
sleep 60
./cleanup.sh
sleep 60
done

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.2.0-mplex
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "1000"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.3.0-mplex
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "1000"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.2.0-yamux
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "1000"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.3.0-yamux
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "1000"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.2.0-mplex
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "100"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.3.0-mplex
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "100"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.2.0-yamux
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "100"
args:
- "46"
- "14"

View File

@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pod
namespace: zerotesting-nimlibp2p
spec:
replicas: 1000
podManagementPolicy: "Parallel"
serviceName: nimp2p-service
selector:
matchLabels:
app: zerotenkay
template:
metadata:
labels:
app: zerotenkay
spec:
dnsConfig:
searches:
- nimp2p-service.zerotesting-nimlibp2p.svc.cluster.local
initContainers:
- name: slowyourroll
image: soutullostatus/tc-container:1
securityContext:
capabilities:
add: [ "NET_ADMIN" ]
command:
- sh
- -c
- tc qdisc add dev eth0 root netem delay 100ms 30ms distribution normal
containers:
- name: container-0
image: soutullostatus/dst-test-node:v1.3.0-yamux
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
- containerPort: 8008
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "600Mi"
cpu: "400m"
env:
- name: PEERNUMBER
value: "0"
- name: PEERS
value: "1000"
- name: CONNECTTO
value: "10"
- name: MSGRATE
value: "1000"
- name: MSGSIZE
value: "100"
args:
- "46"
- "14"