Memory usage
See original GitHub issueI am noticing a big increase in memory usage between the releases 3.1.3 and 4.0.0 and above.
Our app is running on node 0.12.6 and we create our elasticsearch client with the following properties:
var esClient = new elasticsearch.Client({
hosts: localhost:9200,
apiVersion: "1.3",
minSockets: 10,
maxSockets: 10
});
When running on 3.1.3 we converge around 350-400MB. When upgrading to 4.0.0 or any later release the memory just seems to grow until hitting the v8-limit (1,4GB).
Issue Analytics
- State:
- Created 8 years ago
- Reactions:20
- Comments:20 (5 by maintainers)
Top Results From Across the Web
MEMORY USAGE - Redis
The MEMORY USAGE command reports the number of bytes that a key and its value require to be stored in RAM. The reported...
Read more >View memory usage in Activity Monitor on Mac - Apple Support
In Activity Monitor, view the amount of system memory being used on your Mac, including physical, compressed, wired, and app memory.
Read more >Memory utilization - IBM
Memory is not managed as a single component, such as a CPU or disk, but as a collection of small components called pages....
Read more >6 Ways to Check Memory Usage - wikiHow
1. Hold down Alt+Ctrl and press Delete. Doing so will open your Windows computer's task manager menu. 2. Click Task Manager. It's the...
Read more >How to Check Memory Usage in Android - YouTube
I show you can use check memory usage on an Android phone.The apps I used in this video are:RAM Booster (Memory Cleaner) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@spalger Is this leaky behaviour still being investigated in the newer versions beyond 3.1.4? We are on node v4.4.5 and with any elasticsearch.js client above 4.x, the memory usage is far higher, leaking and behaving much differently as observed by @dylancwood. See below two charts.
V3.1.4 client:
V11.0.1 client:
Both are with the following client configuration (hosts commented out) :
I think that I am experiencing the same issue. We are running a relatively thin proxy layer between our mobile clients and elastic search. Each node of that layer is receiving around 300 requests per minute. When we upgraded to Node 4+, we ran into
max-stack depth exceeded
errors with elasticsearch-js 3.1.3, so we upgraded to the latest version.Memory consumption went up about four-fold with just this little change. To confirm that elasticsearch-js is responsible, I forked the repo and fixed the
max-stack depth exceeded
issue by pulling in a change from later versions of elasticsearch-js (https://github.com/dylancwood/elasticsearch-js/blob/3-1-3-speed/src/lib/log.js#L66).Below are graphs of
memory consumption
,throughput
andresponse time
for two servers. Both servers are running Node 4.3.0, and were inundated with as many requests as they could handle for about 15 minutes (hence the poor response time). The only difference is that the red one is using elasticsearch-js 4.0.0 and the yellow one is using my patched fork of elasticsearch-js 3.1.3. Note that the response time is actually better on the 4.0.0 version 👍, but 700MB of memory is a high price to pay. Also, I cannot explain why the response time is faster on the 4.0.0 server, but the throughput is lower…@spalger: I hope you’ll consider this to be solid evidence. FTR, we use only three methods of this package:
mget
,search
andindices.analyze
.