Skip to content

Instantly share code, notes, and snippets.

View Karunamon's full-sized avatar

Mike Parks Karunamon

View GitHub Profile
@Karunamon
Karunamon / terminal-control.sh
Last active August 29, 2015 14:26 — forked from bcap/terminal-control.sh
Useful terminal control characters
# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
@Karunamon
Karunamon / tomcat.conf
Last active August 29, 2015 14:19 — forked from witscher/tomcat.conf
Tomcat upstart script
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/tomcat tomcat
#System language
lang en_AU
#Language modules to install
langsupport en_AU
#System keyboard
keyboard us
#System mouse
@Karunamon
Karunamon / tomcat7.sh
Last active August 29, 2015 14:01 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Tomcat 7 init.d script
#!/bin/bash
#
# Tomcat 7 start/stop/status script
# Forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash@miglen.com>
#
# Release updates:
# Updated method for gathering pid of the current proccess
# Added usage of CATALINA_BASE
# Added coloring and additional status
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example:
- Use create in the index API (assuming you can).
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval).
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap.
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000).
- Increase the memory allocated to elasticsearch node. By default its 1g.
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine.
- Increase the number of machines you have so