neo4j变慢&卡在亚马逊EC2上 [英] neo4j getting slow & stuck on amazon ec2

查看:203
本文介绍了neo4j变慢&卡在亚马逊EC2上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在ec2实例(大型,ubuntu)上运行的neo4j,并且我正在其上运行一些脚本,这些脚本可以完成很多工作.

I have a neo4j running on an ec2 instance (large, ubuntu) and I'm running some scripts on it that do lots of writings.

我注意到一段时间后,那些脚本运行了(它们写了数千个节点之后),服务器开始运行得非常慢,有时甚至达到了绝对停滞的地步.另一个怪异的部分-从这种情况下重置实例通常会导致服务器花费比通常更长的时间来进行初始化.

I noticed that after a while that those scripts run (after they wrote couple of thousand nodes) the server starting to run very slow, sometimes to the point it get absolutely stuck. another weird part - resetting the instance from this situation usually ends up in the server taking much longer than usual to init.

首先,我怀疑neo4j用完了所有RAM,这是一个分页问题,​​但是我已经读到neo4j动态地计算堆大小和堆栈大小限制.我还用top检查了内存使用情况,看起来大多数RAM都没有使用,除了Java进程偶尔弹出,占用了几GB内存然后迅速消失(我认为是neo4j).

first I suspected that neo4j uses up all the RAM and this is a paging problem, but I've read that neo4j calculates dynamically the heap size and stack size limits. also I checked memory usage with top and it looked like most of the RAM was unused, except for Java process occasionally popping up, taking few GBs and then disappear quickly, which I assumed was neo4j.

无论如何,这是我的问题:我是否需要配置neo4j服务器和/或包装器,还是应该让neo4j自行动态计算?有人遇到过我所描述的事情,并且不知道会导致什么吗?

anyway here's my question(s): do I need to config neo4j server and/or wrapper, or should I let neo4j calculate it dynamically on its own? and did someone encountered something like I described and have any idea what could cause it?

谢谢!

推荐答案

根据我的经验,您确实需要根据需要调整内存设置. neo4j手册上有一整节内容:

It's been my experience that you definitely need to tweak the memory settings to your needs. The neo4j manual has a whole section on it:

http://neo4j.com/docs/stable/configuration.html

我还没有真正听说过neo4j会自动调整服务器的内存功能,尽管就在昨晚,我确实在conf/neo4j.properties中遇到了一个新配置变量:

I've not really heard of neo4j automatically adjusting to your server's memory capabilities, though just last night I did run across what seemed like a new configuration variable in conf/neo4j.properties:

# The amount of memory to use for mapping the store files, either in bytes or
# as a percentage of available memory. This will be clipped at the amount of
# free memory observed when the database starts, and automatically be rounded
# down to the nearest whole page. For example, if "500MB" is configured, but
# only 450MB of memory is free when the database starts, then the database will
# map at most 450MB. If "50%" is configured, and the system has a capacity of
# 4GB, then at most 2GB of memory will be mapped, unless the database observes
# that less than 2GB of memory is free when it starts.
#mapped_memory_total_size=50%

这篇关于neo4j变慢&卡在亚马逊EC2上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆