Redian新闻
>
为什么500吨重的火车,从铁轨上快速通过都不会脱轨
avatar
为什么500吨重的火车,从铁轨上快速通过都不会脱轨# Engineering - 工程
c*n
1
with CMS collector, I'm getting sometimes 10 seconds pause in the
initial-mark and remark phases, which are both stop-the-world.
my total heap is 50GB, and old gen is 25GB.
is there any way to debug this?
Thanks a lot
avatar
q*1
2
当我们看到火车奔驰在铁轨上,既平稳又高速的前行的时候,有些人心里面不免犯嘀咕
,为什么火车不倒水泥地面上奔跑,制造水泥地面的代价很可能要比铺设钢轨省事和便
宜的多呀?为什么500吨重的火车从铁轨上快速通过都不会脱轨,原来一切都靠的是这
个简单的装置。
我首先回答第一个问题,虽然水泥地面看起来很光滑,但是实际上水泥地面是很粗糙的
,而且特别容易遭到损坏,水泥地面根本无法承受500多吨重的火车,我这看起来在钢
轨上奔跑,其实除了钢轨之外还有其他的装置。那就是必须把钢轨铺设在枕木和碎石子
上,其中碎石子最大的作用就是可以把火车的重量分散开来,这样就不会把钢轨压到泥
土当中,火车奔跑在钢轨上也会显得更加的平稳和快速。
第二个问题是飞速而过的火车,为什么不会脱轨。其实这个问题也很简单。火车既不像
我们所驾驶的车那样方向盘,也不像船那样有舵,火车完全靠的是轨道和倾斜的轮缘在
铁轨上奔跑,特别是在转弯的时候,我这完全靠的是铁规来控制,同时火车前面还有一
个导向轮,这也是火车拐弯的重要装置。
火车车轮的设计也是特别有意思,它的形状是由内圈大外圈小,这样就可以使车轮紧贴
在车轨上,特别是在转弯的时候,火车在重力的作用之下,会有一个从外向内的作用力
,从而让火车产生一种离心力,这样就可以使火车在转弯的时候依然能够保持高速也能
够感觉到特别平稳,当然对火车的运行速度也是有一定要求,如果火车速度过快,很可
能会导致火车无法转弯。
avatar
g*g
3
You may do a heap dump every 30min to see what's building up.
In most cases it's something you can alleviate by reusing, and
not recreating objects. Check your system core to see what's been
created at fast rate.
If there's no issue there, you then look into GC configuration,
there are different algorithms, different thresholds you can configure.

【在 c******n 的大作中提到】
: with CMS collector, I'm getting sometimes 10 seconds pause in the
: initial-mark and remark phases, which are both stop-the-world.
: my total heap is 50GB, and old gen is 25GB.
: is there any way to debug this?
: Thanks a lot

avatar
F*n
4
因为1000吨重的火车会脱轨,所以就只能500吨重了。
avatar
c*n
5
Thanks , found the issue through colleague
this link documents it
http://blog.griddynamics.com/search/label/~Alexey%20Ragozin
basically you want to piggy-back the CMS initial-mark right after the ParNew
finish.
in my case my old gen got so full that it has to start CMS back to back. but
my young gen is big enough so I don't have OOM
I just need to use the param in the link, and forcefully clean my old gen
through my application (flushing to disk)

【在 g*****g 的大作中提到】
: You may do a heap dump every 30min to see what's building up.
: In most cases it's something you can alleviate by reusing, and
: not recreating objects. Check your system core to see what's been
: created at fast rate.
: If there's no issue there, you then look into GC configuration,
: there are different algorithms, different thresholds you can configure.

avatar
d*m
6
如果是501吨的呢
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。