I think you do not need a proxy. Just disable TCP keep alive in HTTP. It is enabled by default.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.html http.tcp_keep_alive: false Jörg On Wed, Feb 19, 2014 at 1:38 PM, K.Cima <[email protected]> wrote: > Hello, > > I am using ElasticSearch 1.0.0 with Kibana 3 on Solaris 11.1. My > environment > is as following. > > $ ./elasticsearch -v > Version: 1.0.0, Build: a46900e/2014-02-12T16:18:34Z, JVM: 1.7.0_07 > > $ java -version > java version "1.7.0_07" > Java(TM) SE Runtime Environment (build 1.7.0_07-b10) > Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode) > > $ cat /etc/release > Oracle Solaris 11.1 X86 > Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights > reserved. > Assembled 19 September 2012 > > I was suffering from very high CPU usage of Java process. > When I connected to ES via Kibana, the CPU usage became 90%-100%. > Strangely, > user cpu usage was not so high, but sys cpu usage was very high with vmstat > command. > > I tried to examine system calls by using truss command. I found there are > so > many ioctl calls while connecting. > > $ sudo truss -c -p 18496 > syscall seconds calls errors > read .000 13 4 > write .000 12 > ioctl 1.043 142731 > lwp_cond_wait .002 178 153 > lwp_cond_signal .000 25 > pollsys .000 54 > lwp_mutex_timedlock .000 1 > pread64 .016 1432 > -------- ------ ---- > sys totals: 1.062 144446 157 > usr time: .387 > elapsed: 3.620 > > $ sudo truss -p 18496 > ... > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /49: ioctl(105, DP_POLL, 0xF6C33650) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /49: ioctl(105, DP_POLL, 0xF6C33650) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /49: ioctl(105, DP_POLL, 0xF6C33650) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /49: ioctl(105, DP_POLL, 0xF6C33650) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > /48: ioctl(102, DP_POLL, 0xF6C746D0) = 1 > /47: ioctl(99, DP_POLL, 0xF6CB5750) = 1 > ... > > I thought there are something wrong with HTTP KeepAlive. And, I considered > to put HTTP Proxy between ES and Kibana(client browser) to disable > KeepAlive. I setuped Apache mod_proxy to disable KeepAlive by folowing > settings. > > ProxyPass /es http://localhost:9200 > ProxyPassReverse /es http://localhost:9200 > SetEnv proxy-nokeepalive 1 > > And, I changed Kibana config.js to connect to ES via proxy. After that, the > CPU usage dramatically came down. There may be some problem with HTTP > KeepAlive at least on Solaris. > > Thanks, > K.Cima > > > > -- > View this message in context: > http://elasticsearch-users.115913.n3.nabble.com/Very-high-sys-cpu-usage-with-HTTP-KeepAlive-tp4049998.html > Sent from the ElasticSearch Users mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/1392813529284-4049998.post%40n3.nabble.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHnjhFMbEsJxsT0HioQ1whvtXx77cfsr4U5Y%2BwzmyybXw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
