-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let Redis spawn processes for us #7744
Conversation
@lippserd Increases concurrency by 1.5-2 with one instance of https://github.com/Al2Klimov/icinga2-procmgr/tree/60276d4c40ae8e5563da85fd6aec7f84d9ce7501. |
... not. |
OK, with the given setup (1, 2) including 8 instances of https://github.com/Al2Klimov/icinga2-procmgr/tree/6b861c283c8ea18daa86492cab42d9767561759f I get this result (3), TL;DR 2x. 1resource "digitalocean_droplet" "aklimov-628417a" {
name = "aklimov-628417a"
size = "s-24vcpu-128gb"
image = "fedora-31-x64"
region = "fra1"
ssh_keys = [ 26010475 ]
}
resource "digitalocean_droplet" "aklimov-628417b" {
name = "aklimov-628417b"
size = "s-24vcpu-128gb"
image = "fedora-31-x64"
region = "fra1"
ssh_keys = [ 26010475 ]
} 2---
- hosts: all
tasks:
- loop:
- iptables-services
- tmux
- vim
yum:
name: '{{ item }}'
- copy:
dest: /etc/sysconfig/iptables
content: |
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -d 127.0.0.0/8 ! -i lo -j DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -s 81.95.15.174/32 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
register: fwr
- service:
name: iptables
state: started
enabled: yes
- when: fwr.changed
service:
name: iptables
state: reloaded
- loop:
- python3-influxdb
yum:
name: '{{ item }}'
- get_url:
dest: /influxdb.rpm
url: 'https://dl.influxdata.com/influxdb/releases/influxdb-1.7.9.x86_64.rpm'
register: influxrpm
- when: influxrpm.changed
shell: yum install -y /influxdb.rpm
- service:
name: influxdb
state: started
enabled: yes
- influxdb_database:
database_name: icinga2
- hosts: aklimov-628417b
tasks:
- loop:
- redis
yum:
name: '{{ item }}'
- hosts: all
tasks:
- loop:
- bison
- boost-devel
- cmake
- flex
- gcc
- gcc-c++
- git
- lsof
- make
- mailx
- mariadb-devel
- openssl-devel
- patch
- postgresql-devel
- psmisc
yum:
name: '{{ item }}'
- file:
path: /root/icinga2
state: directory
- shell: git init
args:
chdir: /root/icinga2
creates: /root/icinga2/.git
- blockinfile:
path: /root/icinga2/.git/config
block: |
[receive]
denyCurrentBranch = warn
- copy:
dest: /root/icinga2/build.sh
mode: '0755'
src: build.sh
- name: /root/icinga2/prefix/etc/icinga2/features-available/checker.conf
copy:
dest: /root/icinga2/prefix/etc/icinga2/features-available/checker.conf
owner: root
group: root
mode: '0644'
content: |
object CheckerComponent "checker" {
concurrent_checks = 40000
}
- name: /root/icinga2/prefix/etc/icinga2/features-available/influxdb.conf
copy:
dest: /root/icinga2/prefix/etc/icinga2/features-available/influxdb.conf
owner: root
group: root
mode: '0644'
content: |
object InfluxdbWriter "influxdb" {
host = "127.0.0.1"
port = 8086
database = "icinga2"
flush_threshold = 1024
flush_interval = 10s
host_template = {
measurement = "$host.check_command$"
tags = {
hostname = "$host.name$"
}
}
service_template = {
measurement = "$service.check_command$"
tags = {
hostname = "$host.name$"
service = "$service.name$"
}
}
}
- name: /root/icinga2/prefix/etc/icinga2/features-enabled/influxdb.conf
file:
path: /root/icinga2/prefix/etc/icinga2/features-enabled/influxdb.conf
state: link
src: /root/icinga2/prefix/etc/icinga2/features-available/influxdb.conf
- name: /root/icinga2/prefix/etc/icinga2/conf.d/628417.conf
copy:
dest: /root/icinga2/prefix/etc/icinga2/conf.d/628417.conf
owner: root
group: root
mode: '0644'
content: |
const MaxConcurrentChecks = 40000
object CheckCommand "mysleep" {
command = [ "bash", "-c", "cat <<<' |lolcat=1\n'; exec sleep 30" ]
timeout = 20s
}
for (var i in range(30000)) {
object Host string(i) {
check_command = "mysleep"
check_interval = 1s // * Math.random()
}
}
- hosts: aklimov-628417b
tasks:
- name: /root/icinga2/prefix/etc/icinga2/conf.d/628417a.conf
copy:
dest: /root/icinga2/prefix/etc/icinga2/conf.d/628417a.conf
owner: root
group: root
mode: '0644'
content: |
const ProcessSpawnRedisPort = 6379
- name: /root/icinga2-procmgr
copy:
dest: /root/icinga2-procmgr
owner: root
group: root
mode: '0755'
src: icinga2-procmgr
- name: /root/icinga2-procmgr.ini
copy:
dest: /root/icinga2-procmgr.ini
owner: root
group: root
mode: '0644'
content: |
[log]
level=debug
[redis]
address=127.0.0.1:6379
[concurrency]
processes=40000
goroutines=80000 3 |
@N-o-X Do you agree with the concept including the fact that you have to start multiple instances of the spawner? |
@cla-bot check |
I don't see this happening, especially given that I think it's not feasible to require a Redis instance on every single node in the cluster. |
No description provided.