Skip to content

Instantly share code, notes, and snippets.

View arielamato's full-sized avatar

ariel.amato arielamato

View GitHub Profile
@arielamato
arielamato / slave2-td
Created July 7, 2011 18:22
Thread Dump Slave 2
2011-07-07 17:52:02
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007f0d64579800 nid=0x6e1 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"elasticsearch[cached]-pool-1-thread-36" daemon prio=10 tid=0x00007f0d6498e000 nid=0x6d2 waiting on condition [0x00007f0d5bffe000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c61a5fd8> (a java.util.concurrent.SynchronousQueue$TransferStack)
@arielamato
arielamato / slave1-td
Created July 7, 2011 18:22
Thread Dump Slave 1
2011-07-07 17:51:41
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00000000405d2800 nid=0x738 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"elasticsearch[cached]-pool-1-thread-24" daemon prio=10 tid=0x00007f38b8a79800 nid=0x6e7 waiting on condition [0x00007f38b58d7000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c61a5d78> (a java.util.concurrent.SynchronousQueue$TransferStack)
@arielamato
arielamato / master-td
Created July 7, 2011 18:21
Thread Dump master node
2011-07-07 17:54:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode):
"New I/O server worker #2-1" daemon prio=10 tid=0x00007f46a0626000 nid=0x749 runnable [0x00007f46946c5000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
- locked <0x00000006cf156af8> (a sun.nio.ch.Util$2)
@arielamato
arielamato / example query
Created July 7, 2011 17:04
Example query
{
"query": {
"bool" : {
"should" : {
"term" : {
"location_country_id" : 74
}
},
"should" :
{
@arielamato
arielamato / top slave 2
Created July 6, 2011 23:16
Top slave 2
top - 22:56:34 up 2:18, 1 user, load average: 1.95, 1.85, 1.78
Tasks: 112 total, 1 running, 111 sleeping, 0 stopped, 0 zombie
Cpu(s): 22.4%us, 1.1%sy, 0.0%ni, 75.3%id, 0.0%wa, 0.0%hi, 0.2%si, 1.0%st
Mem: 15728868k total, 9574248k used, 6154620k free, 162148k buffers
Swap: 1048568k total, 0k used, 1048568k free, 3165044k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3537 root 20 0 5671m 5.4g 16m S 95 35.7 28:24.26 java
1 root 20 0 23720 1976 1304 S 0 0.0 0:00.09 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
@arielamato
arielamato / vmstat slave
Created July 6, 2011 23:16
vmstat slave
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 6155084 162156 3165044 0 0 6 370 155 121 7 1 89 2
7 0 0 6154772 162156 3165068 0 0 0 0 3094 2405 23 1 75 0
2 0 0 6154620 162164 3165068 0 0 0 3 3061 2322 19 1 79 0
2 0 0 6154924 162164 3165068 0 0 0 0 2974 2285 24 1 74 0
1 0 0 6154924 162164 3165068 0 0 0 0 2937 2213 21 1 76 0
1 0 0 6155076 162164 3165068 0 0 0 4 3156 2418 21 1 76 0
1 0 0 6154772 162172 3165060 0 0 0 9 3005 2272 21 1 75 0
19 0 0 6154924 162172 3165068 0 0 0 0 3090 2352 21 1 78 0
@arielamato
arielamato / top slave
Created July 6, 2011 23:14
top slave
top - 22:57:13 up 2:11, 1 user, load average: 8.74, 5.49, 4.02
Tasks: 112 total, 1 running, 111 sleeping, 0 stopped, 0 zombie
Cpu(s): 40.5%us, 1.0%sy, 0.0%ni, 53.3%id, 0.0%wa, 0.0%hi, 0.1%si, 5.2%st
Mem: 15728868k total, 9487524k used, 6241344k free, 158472k buffers
Swap: 1048568k total, 0k used, 1048568k free, 3069532k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2881 root 20 0 5744m 5.4g 16m S 169 35.8 40:32.97 java
1 root 20 0 23724 1972 1304 S 0 0.0 0:00.12 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
@arielamato
arielamato / vmstat master
Created July 6, 2011 23:13
vmstat master
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 6197944 126304 3163824 0 0 13 378 132 131 13 1 81 1
0 0 0 6197928 126304 3163824 0 0 0 0 188 194 0 0 100 0
0 0 0 6197928 126304 3163824 0 0 0 0 184 196 0 0 100 0
0 0 0 6197928 126304 3163824 0 0 0 1 194 200 0 0 100 0
1 0 0 6198024 126320 3163824 0 0 0 11 765 862 15 0 84 0
17 0 0 6197152 126320 3163824 0 0 0 3 1702 2458 66 2 14 0
43 0 0 6195608 126328 3163824 0 0 0 2 1488 2151 71 2 4 0
21 0 0 6194480 126328 3163824 0 0 0 0 1283 1874 72 2 1 0
@arielamato
arielamato / Main node, top
Created July 6, 2011 23:12
Main node, top
top - 22:57:11 up 1:13, 2 users, load average: 116.22, 63.44, 38.00
Tasks: 116 total, 1 running, 115 sleeping, 0 stopped, 0 zombie
Cpu(s): 71.8%us, 1.3%sy, 0.0%ni, 5.2%id, 0.0%wa, 0.0%hi, 0.0%si, 21.6%st
Mem: 15728868k total, 9552436k used, 6176432k free, 126488k buffers
Swap: 1048568k total, 0k used, 1048568k free, 3163828k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1880 root 20 0 5902m 5.4g 16m S 292 35.7 62:13.55 java
1 root 20 0 23720 1976 1304 S 0 0.0 0:00.13 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
private void addAgeSearchTerm(final BoolQueryBuilder queryBuilder, final Integer minAge, final Integer maxAge) {
for (int i = 0; i <= 4; i++) {
queryBuilder.should(new RangeQueryBuilder("age").from(minAge).to(maxAge + i)
.boost((ageWeight / (i + 1))));
}
for (int i = 0; i <= 3; i++) {
queryBuilder.should(new RangeQueryBuilder("age").from(minAge - i).to(maxAge)
.boost((ageWeight / (i + 1))));