-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chapter46_part6: /510_Deployment/50_heap.asciidoc #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chapter46_part6: /510_Deployment/50_heap.asciidoc #11
Conversation
Fixed typo: clsuter -> cluster
chapter46_part6: /510_Deployment/50_heap.asciidoc 未完成
<1> Ensure that the min (`Xms`) and max (`Xmx`) sizes are the same to prevent | ||
the heap from resizing at runtime, a very costly process. | ||
<1> 确保 (`Xms`) 和 (`Xmx`) 的大小是相同的,防止程序在运行时改变堆内存大小, | ||
这是一个一个非常昂贵的过程。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一个很耗系统资源的过程?
file. This allows the JVM to lock its memory and prevent | ||
it from being swapped by the OS. In your `elasticsearch.yml`, set this: | ||
最后,如果上面的方法都不能做到,你需要打开配置文件中的 `mlockall` 开关。 | ||
它的作用就是运行 JVM 锁住内存,禁止 OS 交换出去。在你的 `elasticsearch.yml` 文件中,设置如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
运行
是 允许
。
- Are you doing mostly full-text search? Consider giving just under 32 GB to Elasticsearch | ||
and letting Lucene use the rest of memory via the OS filesystem cache. All that | ||
memory will cache segments and lead to blisteringly fast full-text search. | ||
- 你主要做全文检索吗?考虑给 Elasticsearch 不超过 32 GB 的内存 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
剩下的交给Lucene用作操作系统的文件系统缓存。
让Lucene通过操作系统文件缓存来利用余下的内存。
1、中文、数字、英文中间的空格添加修改(如:“小于 32GB 的”修改为“小于 32 GB 的”) 2、html页面斜体字显示错误的修改。 3、“这是一个一个非常昂贵的过程”修改为“这是一个很耗系统资源的过程” 4、”_内存消耗_大户:Lucene”调整为“_内存消耗_ 大户非堆内存(off-heap):Lucene” 5、“所以很利于缓存”调整为“这是对缓存友好的” 6、“OS”统一修改为“操作系统” 7、“如果你把所有的内存都分配给 Elasticsearch,不留一点给 Lucene。 那你的全文检索性能就会变得很差” 修改为 “如果你把所有的内存都分配给 Elasticsearch 的堆内存,那将不会有剩余的内存交给 Lucene。 这将严重地影响全文检索的性能” 8、“Lucene 会很快吞噬剩下的这部分内存” 修改为 “当然它也不会被浪费,Lucene 会很乐意利用起余下的内存” 9、“不要超过 32 GB!” 翻译时丢失原文的感叹号 10、“..CPU 的_字长_的大小:不是 32 bits 就是 64 bits” 修改为 “..通常为 CPU 字长的大小:32 位或 64 位,取决于你的处理器” , 上下文有语句的调整修改 11、“对于 32位的系统,你的内存最大可使用 4 GB..” 修改为 “对于 32 位的系统,意味着堆内存大小最大为 4 GB.. ” 12、“主内存和缓存器(例如 LLC,L1等)”修改为 “主内存和各级缓存(例如 LLC,L1 等)” 13、调整下格式,将“内存指针压缩”作为锚文本 , 14、文中 “bit” 统一翻译成“位” 15、“现在的机器内存普遍增长,你现在都可以看到有 512-768 GB 内存的机器。” 修改为 “一台有着 512-768 GB内存的服务器愈发常见” 16、“剩下的交给Lucene用作操作系统的文件系统缓存” 修改为“让 Lucene 通过操作系统文件缓存来利用余下的内存” 17、“你希望更大的堆内存” 修改为 “你可能会更希望那些那些内存用在堆中” 18、“shard” 修改为 “分片(shard)” 19、“这样可以暂时禁用” 修改为 “如果需要永久禁用” 20、“设置为 `0` 会引发 OOM(内存溢出)。”修改为 “设置为 `0` 会触发系统 OOM-killer(注:Linux 内核的 Out of Memory(OOM)killer 机制)。”
预览模式已检查 |
If you choose this option, set `cluster.routing.allocation.same_shard.host: true` | ||
in your config. This will prevent a primary and a replica shard from colocating | ||
to the same physical machine (since this would remove the benefits of replica high availability). | ||
如果你选择第二种,你需要配置 `cluster.routing.allocation.same_shard.host: true`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cluster.routing.allocation.same_shard.host: true
格式好像有点问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
2016-03-07 16:10 GMT+08:00 Medcl [email protected]:
In 510_Deployment/50_heap.asciidoc
#11 (comment)
:
-If you choose this option, set
cluster.routing.allocation.same_shard.host: true
-in your config. This will prevent a primary and a replica shard from colocating
-to the same physical machine (since this would remove the benefits of replica high availability).
+如果你选择第二种,你需要配置cluster.routing.allocation.same_shard.host: true
。cluster.routing.allocation.same_shard.host: true 格式好像有点问题
—
Reply to this email directly or view it on GitHub
https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/11/files#r55171774
.
LGTM |
|
||
[source,bash] | ||
---- | ||
./bin/elasticsearch -Xmx10g -Xms10g <1> | ||
---- | ||
<1> Ensure that the min (`Xms`) and max (`Xmx`) sizes are the same to prevent | ||
the heap from resizing at runtime, a very costly process. | ||
<1> 确保 (`Xms`) 和 (`Xmx`) 的大小是相同的,防止程序在运行时改变堆内存大小, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里貌似稍稍有点,最小值最大值没有了,另外括号是用了英文的加了空格。
the min (
Xms
) and max (Xmx
) sizes are the same
确保堆内存最小值(Xms
)与最大值(Xmx
)的是相同的,防止程序在运行时调整堆内存大小,
感觉这一篇文档确实有点长啊,也辛苦你了。 |
@biyuhao 😄 |
1、“确保 (`Xms`) 和 (`Xmx`) 的大小 ” 修改为 “确保堆内存最小值( `Xms` )与最大值( `Xmx` )的大小” 2、“ `-Xmx10g -Xms10g`” 修改为 “`-Xmx -Xms`” 3、修改斜体字标错词 “_内存消耗_ 大户非堆内存” 修改为 “内存消耗大户 _非堆内存_ ” 4、语句的调整,贴近上下文
预览模式已查看,🙏 @biyuhao |
LGTM. 😄 |
merged ad82e1a |
堆内存:大小和交换 翻译完成