科学健康资讯 · 内容仅供参考,不替代专业诊疗 联系我们|疾病百科
操作系统

out of memory是什么意思

2023-05-02 操作系统 本文链接

JVM在大数据技术方面的弊端

现在,大部分开源的大数据框架,包括(Hadoop、Flink、Spark、HBase等)都是基于JVM进行计算的。

基于JVM的计算引擎,都是把数据放到内存中计算,我们就要面对JVM存在的几个问题。

JVM的OOM问题:利用JVM开发的程序都会遇到OutOfMemoryError的问题,当JVM内存中的对象综合超过JVM的大小,就会发生OutOfMemoryError错误,导致JVM崩溃,这样分布式框架的稳定性和健壮性都受到了挑战。

Java对象的密度极低:例如一个只包含 boolean 属性的对象占用了16个字节内存,对象头占了8个,boolean 属性占了1个,对齐填充占了7个。而实际上只需要一个bit(1/8字节)就够了。

Full的GC让人既爱又怜,一方面,JVM自己管理内存,开发者只需要关心业务逻辑。另一方面,GC就是一个不定时炸弹,对于为了处理大数据而开了很大内存空间的JVM来说,GC 会达到秒级甚至分钟级,这对大数据应用影响极大。

幸运的是,现在大数据开源框架Hadoop、Flink、Spark、Kafka和HBase都有自己的内存管理机制,不再依赖Java原生的JVM,这样可以提高内存处理效率。

请问JVM调优参数中,为什么建议最大堆内存和最小堆内存设置成一样的?

答:防止扩容和缩容,即避免每次GC完成后,JVM重新分配内存,从而提高JVM的性能。

JVM参数分为三大类:

1、标准参数:- ,所有JVM都支持这些参数的功能,且向后兼容。

2、非标准参数:-X,JVM默认实现这些参数的功能,但不保证所有JVM都满足,且不保证向后兼容。

3、非稳定参数:-XX,各个JVM实现会有所不同,将来可能会不被支持。

JVM8的常用调优参数及说明:

1、-Xmx4G 设置JVM的最大堆内存,默认为物理内存的四分之一。

2、-Xms1G 设置JVM的最小堆内存,默认为物理内存的十六分之一。

3、-Xmn256M 设置JVM的年轻代内存,建议是最小堆内存的四分之一到二分之一。

4、-Xss1M 设置JVM的栈内存,默认是1M。

5、-XX:MetaspaceSize=256M 设置JVM的元空间内存,元空间多次扩容后超过此值就会Full GC,默认大小20M,其使用本地内存。

6、-XX:MaxMetaspaceSize=256M 设置JVM的元空间最大内存,默认不设限,建议和MetaspaceSize一样大即256M。

7、-XX:+UseConcMarkSweepGC 使用CMS垃圾回收器。

8、-XX:+PrintGCDetails 打印GC详细信息。

9、-XX:+HeapDumpOnOutOfMemoryError OOM时堆内存dump到当前目录。

119.每日一读:

APRIL is the cruellest month, breeding Lilacs out of the dead land, mixing Memory and desire,

stirring Dull roots with spring rain.

四月是残忍的季节,

从死了的土地滋生丁香,

混杂着回忆和欲望,

让春雨挑动着呆钝的根。

Be strong, believe in who you are. Be strong, believe in what you feel.

强大一些,要相信你自己。坚定一些,要相信自己的感觉。 ​​​

#梦想家海星#

各位车友,雷凌双擎多久保养一次合适?

夜读双语——春雨里的静谧时光

[玫瑰]Sealed books have a smell, straight to the nose and the heart, because it is the smell of forgetting - the memory that has been annihilated.

[玫瑰]The birds began to sing again in the branches, as if nothing had changed under the leaves.

[玫瑰]A shy green bud came out from the top of the tree to see me, and then there were more green buds.

[玫瑰]Spring is wearing new clothes, with the aroma of honeysuckle, is entering each room.

[玫瑰]The wind from all directions makes the flowers fluctuate and vibrate slightly, and the fragrance is refreshing.

[玫瑰]Memories of the youth come, intoxicating: forgotten good names and good times, gently stroked slim hands, proud amber eyes, and braids that are no longer combed with the passage of time.

[玫瑰]封存的书籍有一股气味,直冲鼻子和心灵深处,因为这是遗忘——业已湮灭的记忆——所产生的气味。

[玫瑰]鸟儿在枝头重新开始往日的啼鸣,仿佛树叶下什么变化也未曾发生。

[玫瑰]一个羞怯的绿芽从树梢高处远远地探出头来看我,随后出来了更多的绿芽。

[玫瑰]春天身披新装,带着忍冬的香气,正在进入各个房间。

[玫瑰]四面八方吹来的风使花朵轻微起伏、颤动,飘来阵阵沁人心脾的芳香。

[玫瑰]青年时代的记忆涌来,令人陶醉:已经忘却的美好名字和美好时光,那轻轻抚摸过的纤手,高傲的琥珀色双眸,以及随着时光流逝已不再梳理的发辫,一起涌上心头。

The greatest pleasure in life is doing what people say you cannot do.

好好生活加油英汉双语

人生最大的快乐是做到别人说你做不到的事。 The greatest pleasure in life is doing what people say you cannot do. 上帝没有要求我们必须成功,他只要求你尝试尝试。 God doesn't require us to succeed; he>

"Andyet,"continuedLordHenry,inhislow,musicalvoice,andwiththatgracefulwaveofthehandthatwasalwayssocharacteristicofhim,andthathehadeveninhisEtondays,"Ibelievethatifonemanweretoliveouthislifefullyandcompletely,weretogiveformtoeveryfeeling,expressiontoeverythought,realitytoeverydream—Ibelievethattheworldwouldgainsuchafreshimpulseofjoythatwewouldforgetallthemaladiesofmediaevalism,andreturntotheHellenicideal—tosomethingfiner,richerthantheHellenicideal,itmaybe.Butthebravestmanamongstusisafraidofhimself.Themutilationofthesavagehasitstragicsurvivalintheself-denialthatmarsourlives.Wearepunishedforourrefusals.Everyimpulsethatwestrivetostranglebroodsinthemindandpoisonsus.Thebodysinsonce,andhasdonewithitssin,foractionisamodeofpurification.Nothingremainsthenbuttherecollectionofapleasure,ortheluxuryofaregret.Theonlywaytogetridofatemptationistoyieldtoit.Resistit,andyoursoulgrowssickwithlongingforthethingsithasforbiddentoitself,withdesireforwhatitsmonstrouslawshavemademonstrousandunlawful.Ithasbeensaidthatthegreateventsoftheworldtakeplaceinthebrain.Itisinthebrain,andthebrainonly,thatthegreatsinsoftheworldtakeplacealso.You,Mr.Gray,youyourself,withyourrose-redyouthandyourrose-whiteboyhood,youhavehadpassionsthathavemadeyouafraid,thoughtsthathavefilledyouwithterror,day-dreamsandsleepingdreamswhosemerememorymightstainyourcheekwithshame—"——《道林格雷的画像》

饮冰茹蘗,相濡以沫。

风割霜洗,苦中泛乐。

坐梨耙地,腕花轻搓。

筑泥作屋,长衣遮过。

香魂忽杳,满壁寂寞。

房哨呜吟,雁阵崩破。

男人如铁,慨然应诺。

生既无欢,随汝同穴。

新居已坍,泉下再作。

残阳染血,朔风泣歌。

隐入尘烟,湮于角落。

A great film was taken out from the line,or was banned.Just do something for memory of this.

古诗英译:【梧叶儿·冬晨】吴西逸体

作者:实心-心实

A Winter Dawn:to the tune of Wu Ye'er

The last rays of daybreak shine.

Wild plants wither>

Living,>

It was a bright Saturday morning. I stopped at a café to enjoy a cup of coffee and read the morning newspaper. Suddenly, I felt a hand>

In the long history of 5000 years, under the vast starry sky, too many people have thought about death, too many sparks of wisdom flicker, too thick oriental culture holds up our feet during this period, and there are too long historical disputes, so we have to face this taboo. Neither Epicurus' idea fluctuation nor Nietzsche's thought experiment nor his heroic words of self realization are enough to enable an out and out Chinese people to truly get rid of the fear that life will inevitably lead to death. That is the inherent pain in the depths of every soul and the most humble submission of all living beings to the flood and famine of the universe. Ask heaven what life? What pole is the earth? Where is reincarnation? God ghost ANN has? What joy is there in life and what pain is there in death? Generation after generation, people have been asking questions and pondering hard, but there is no solution.>

【学个词 obliterate 】verb 除去;涂去;擦掉;彻底破坏或毁灭

  Definition

  transitive ​verb

  1a: to remove utterly from recognition or memory

  //… a successful love crowned all other successes and obliterated all other failures.

  — J. W. Krutch

  b: to remove from existence : destroy utterly all trace, indication, or significance of

  //The tide eventually obliterated all evidence of our sandcastles.

  cmedical : to cause (something, such as a bodily part, a scar, or a duct conveying body fluid) to disappear or collapse : REMOVE sense 4

  //a blood vessel obliterated by inflammation

  2: to make undecipherable or imperceptible by obscuring or wearing away

  //A dimness like a fog envelops consciousness / As mist obliterates a crag.

  — Emily Dickinson

  3: CANCEL sense 2

  //obliterate a postage stamp

  Synonyms & Antonyms

  Synonyms

  abolish, annihilate, black out, blot out, cancel, clean (up), efface, eradicate, erase, expunge, exterminate, extirpate, liquidate, root (out), rub out, snuff (out), stamp (out), sweep (away), wipe out

  Examples

  //in a stroke, the March snowstorm obliterated our hopes for an early spring

  History and Etymology

  borrowed from Latin oblīterātus, oblitterātus, past participle of oblīterāre, oblitterāre "to cause to be forgotten or fall into disuse, make disappear," from ob- "against, facing" + -līterāre, litterāre, verbal derivative of lītera, littera LETTER entry 1 — more at OB-#学英语#

Don’t get out of your car if you get pulled over by police.

I was pulled over by a police officer while driving in Iowa. It was>

夜读双语——美好的时代

[心]Society has given me more knowledge. But I always feel that I can't do without, and even have to often use, the knowledge I learned when I was a student, so I feel that the knowledge is poor, incomplete and limited.

[心]Sometimes, in the strict teacher picked out a lot of wrong words, sick sentences, or misuse of punctuation, had to smile.

[心]I am very grateful to every teacher and friend who has taught me seriously. Every mistake or deficiency is not due to my poor memory, but because I didn't remember carefully at the beginning.

[心]At this time, there was a feeling of remorse.

[心]I wish I could go back to my student days, to my ruthless teacher, to correct all the mistakes in my memory and fill the blank space of knowledge in that age of abundant time and quick mind.

[心]Turn those wasted time due to playfulness into the time of study and hard work.

[心]Of course, it's a dream. No>[心]社会给了我更多的知识。但我时时觉得,我离不开、甚至必须经常使用青少年时学到的知识,由此感到那知识贫薄、残缺、有限。

[心]有时,在严厉的老师挑出来的许许多多的错别字、病句、或误用的标点符号时,只好窘笑。

[心]很感谢每一位认真指教的老师和朋友,每一次的错误或不足,不是自己的记性差了,而是当初记得不认真。

[心]这时就生出一种懊悔的心情。

[心]恨不得重新回到学生时代,回到不留情面的老师身边,在那个时光充裕、头脑敏捷的年岁里,纠正记忆中所有的错误,填满知识的空白处。

[心]把那些由于贪玩而荒废掉的时光,都变成学习和刻苦努力的时光。

[心]当然,这是一种梦想。谁也不能回到过去。只有抓住自己的今天,自己的现在,才是最现实的。

【口语重要语言点:谈论自己的成长】总结了一组实用的词组和句型

take a journey down memory lane 回忆往事

reflect>

Tanghuluis fruit covered with sugar on a stick,a traditional snack from northern China.It's also a necessary snack during the Chinese New Year season.Recently,in northern China,people welcome the return of spring by holding the Tanghulu Fair.

Many Chinese still remember eating Tanghulu when they were young.It is said that the fair has a 500-year-old history.Nowadays,Tanghulu is not only a kind of snack,it is also a sweet memory of our childhood.

Every year,a large number of Tanghulu sellers get together to start delicious Tanghulu Competition during the Spring Festival holidays.In the past,this traditional snack only used haws,but now it also uses grapes,oranges,strawberries and so on.But people like Haw Tanghulu best.They are rich in Vitamin C and E.

Do you know how to make Haw Tanghulu?First,wash the large haws clean,dig the seeds out,and pierce ten haws on a stick.Then they heat the sugar.put the sticks of haws into heated and quickly pull them out.When the sugar on the haws cools down and becomes a candy coat,the Tanghulu is done.Tanghulu is very popular in China.especially in Beijing.It also makes many foreigners want to taste it.

糖葫芦是中国北方的一种传统小吃。 它也是春节期间必不可少的小吃。 最近,在中国北方,人们通过举办糖葫芦节来迎接春天的到来。  

许多中国人仍然记得他们年轻时吃糖葫芦。 据说博览会有500年的历史。 如今,糖葫芦不仅是一种零食,它也是我们童年的甜蜜回忆。

 每年春节期间,都会有一大批卖糖葫芦的人聚在一起,举办美味糖葫芦大赛。 过去,这种传统小吃只用山楂,现在也用葡萄、橘子、草莓等。 但人们最喜欢的是糖葫芦。 它们富含维生素C和E。 

你知道怎么做山楂糖葫芦吗? 先把大山楂洗净,挖出种子,刺十棵山楂在棍子上。 然后加热糖。 将山楂糕放入加热后迅速取出。 当山楂上的糖冷却并变成一层糖衣时,糖葫芦就完成了。 糖葫芦在中国很受欢迎,尤其是在北京。 它也使许多外国人想要品尝它

本文内容仅供健康科普参考,不能替代专业医疗诊断和治疗建议。如有身体不适,请及时就医并遵从医师指导。

相关阅读