Skip to content

Instantly share code, notes, and snippets.

@thaihust
thaihust / nginx-tuning.md
Created November 11, 2021 05:08 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@thaihust
thaihust / ovs-cheat.md
Created April 21, 2021 08:14 — forked from jshen28/ovs-cheat.md
OVS cheat sheet

CTL

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name/ofport
@thaihust
thaihust / measure.py
Created December 12, 2020 06:56 — forked from racerxdl/measure.py
Linux Network Traffic Measure/Calculator Python Script
#!/usr/bin/env python
'''
_______ ______
|_ _\ \ / / ___|
| | \ \ / /\___ \
| | \ V / ___) |
|_| \_/ |____/
Teske Virtual System
@thaihust
thaihust / measure.py
Created December 12, 2020 06:56 — forked from racerxdl/measure.py
Linux Network Traffic Measure/Calculator Python Script
#!/usr/bin/env python
'''
_______ ______
|_ _\ \ / / ___|
| | \ \ / /\___ \
| | \ V / ___) |
|_| \_/ |____/
Teske Virtual System
@thaihust
thaihust / dev_setup_cephfs_nfs_manila.md
Created February 25, 2019 04:02 — forked from ajarr/dev_setup_cephfs_nfs_manila.md
All-in-one dev setup for manila's cephfs/nfs-ganesha driver

Dev testing manila's cephfs(NFS) driver

Reference https://docs.openstack.org/developer/manila/devref/cephfs_driver.html

Create all-in-one** CephFS/Ganesha/Manila setup using devstack in a CentOS7 machine similar to the one in the upstream gate, gate-manila-tempest-minimal-dsvm-cephfs-nfs-centos-7-nv

** Ceph server daemons (1 OSD, 1 MON, 1 MDS), NFS-Ganesha server, and manila-services all run in the same machine.

  • Clone devstack
@thaihust
thaihust / mds.sh
Created February 22, 2019 12:50 — forked from jasonrm/mds.sh
ceph encrypted bluestore osd
mkdir -p /var/lib/ceph/mds/ceph-$(hostname -s)/
ceph-authtool --create-keyring /var/lib/ceph/mds/ceph-$(hostname -s)/keyring --gen-key -n mds.$(hostname -s)
ceph auth add mds.$(hostname -s) osd "allow rwx" mds "allow" mon "allow profile mds" -i /var/lib/ceph/mds/ceph-$(hostname -s)/keyring
sudo chown -R ceph:ceph /var/lib/ceph
systemctl enable ceph-mds@$(hostname -s)
systemctl start ceph-mds@$(hostname -s)

Install Ceilometer + Gnocchi with backend Ceph

In Controller node

  • Create database
mysql -uroot -pWelcome123

CREATE DATABASE gnocchi;
GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' IDENTIFIED BY 'Welcome123' WITH GRANT OPTION ;
#!/bin/bash
# source https://software.intel.com/en-us/articles/set-up-open-vswitch-with-dpdk-on-ubuntu-server
# https://www.kernel.org/doc/Documentation/
sudo apt-get install gcc g++ make -y
sudo apt-get install -y gcc-multilib
sudo apt-get install -y libc6-dev
## DPDK INSTALL
@thaihust
thaihust / ovs-cheat.md
Created August 2, 2018 07:33 — forked from djoreilly/ovs-cheat.md
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name

ovs-vsctl set port vlan1729 tag=1729
@thaihust
thaihust / ceph-dashboard.json
Created April 13, 2018 10:28 — forked from spjmurray/ceph-dashboard.json
Garfana Ceph Dashboard - Telegraf Plugin
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "influxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}