Skip to content

Instantly share code, notes, and snippets.

View toff63's full-sized avatar

Christophe Marchal toff63

View GitHub Profile
@toff63
toff63 / arch_cell_deeds.md
Last active August 30, 2016 17:00
Ilegra Archcell Deeds

Official doc

Thread pools:

  • bulk: to support the bulk api which let you perform many index/delete operations in a single API call
  • flush: to flush indices in memory data to the disk
  • generic: to support background node discovery
  • get: to support the Get API which let you retrieve a document from an index based on its id
  • index: to support index/delete operations
  • management: to support cluster management
  • force_merge: to support the merge of segments a Lucene index holds in each shard. The merge operation merge the segments to reduce the number of segments.
Jun 27 10:32:53 localhost kernel: collectd invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0
Jun 27 10:32:53 localhost kernel: collectd cpuset=/ mems_allowed=0
Jun 27 10:32:53 localhost kernel: CPU: 0 PID: 30224 Comm: collectd Not tainted 3.10.0-327.18.2.el7.x86_64 #1
Jun 27 10:32:53 localhost kernel: Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
Jun 27 10:32:53 localhost kernel: ffff88001b6ce780 000000008aedcca6 ffff88000b80fcd0 ffffffff81635a0c
Jun 27 10:32:53 localhost kernel: ffff88000b80fd60 ffffffff816309ac ffff88000021a000 ffff88000b80fd28
Jun 27 10:32:53 localhost kernel: 0088700200000202 fffeffff00000000 0000000000000001 ffff88001a4bf803
Jun 27 10:32:53 localhost kernel: Call Trace:
Jun 27 10:32:53 localhost kernel: [<ffffffff81635a0c>] dump_stack+0x19/0x1b
Jun 27 10:32:53 localhost kernel: [<ffffffff816309ac>] dump_header+0x8e/0x214
├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
├─user.slice
│ └─user-1000.slice
│ └─session-4.scope
│ ├─10995 sshd: vagrant [priv]
│ ├─10998 sshd: vagrant@pts/0
│ ├─10999 -bash
│ ├─11021 systemd-cgls
│ └─11022 systemd-cgls
└─system.slice
@toff63
toff63 / 0_reuse_code.js
Created June 21, 2016 20:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@toff63
toff63 / Vagranfile
Created June 19, 2016 23:36
Create a box with Elasticsearch and Kibana
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
sudo add-apt-repository -y ppa:webupd8team/java
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
echo "deb http://packages.elastic.co/kibana/4.5/debian stable main" | sudo tee -a /etc/apt/sources.list
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get update
sudo apt-get upgrade
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "master", primary: true do |master|
master.vm.box = "ubuntu-es"
master.vm.network "private_network", ip: "192.168.70.2"
end

Create a group:

In /etc/cgconfig.conf add the following lines:

group telemetry {
  memory {
    memory.limit_in_bytes = 100m;
  }
}
telemetry soft memlock 102400
telemetry hard memlock 102400

Limits associated to a user

dev@dev-VirtualBox:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63712
max locked memory       (kbytes, -l) 64