From: Shuang Q. <shu...@or...> - 2012-08-24 10:18:15
|
On 08/24/2012 04:11 PM, Zhouping Liu wrote: > > ----- Original Message ----- >> From: "shuang qiu" <shu...@or...> >> To: ltp...@li... >> Sent: Thursday, August 23, 2012 2:43:01 PM >> Subject: [LTP] [PATCH] Set tunable value of min_free_kbytes lower >> >> From: Shuang Qiu <shu...@or...> >> >> The value of min_free_kbytes is set too high(half of mem_free) during >> testing min_free_kbytes tunable.It often cause the system to become >> out-of-memory.Using 20% of mem_free to avoid oom and system hang. > Hi, shuang > > I met the issue that min_free_kbytes caused system hang before, and what you said made sense. > > but after tested the patch, I found it still make the system hang with the patch, so I don't think > this patch can fix the issue completely, maybe there are other factors, or need lower tune value. > always suppose it was because of the high tune value, it's more better to add an optional to control it. > also I will investigate it deeper to look after the real reason. please comment if you have other ideas. > > Thanks, > Zhouping Thanks for testing,Zhouping. I find it says "However, setting this parameter to a value that is too high (5-10% of total system memory) will cause your system to become out-of-memory immediately." in redhat memory-tunables document. https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-tunables.html Set the value less than 5% of total memory will make it more safe. Let's think about a better option to control it. It is great that you will investigate it deeper. Seems there are some other problems in this case,it always failed with i386. The type of total_mem "unsigned long" is not suitable with nowadays memory ,it will overflow(with i386) in line 177:map_count = total_mem * KB / MAP_SIZE and the value of map_count is not correct. Using "unsigned long long" could fix this issue. But the case still failed after fix it. Could you help to investigate it too. Thanks Shuang >> --- >> testcases/kernel/mem/tunable/min_free_kbytes.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c >> b/testcases/kernel/mem/tunable/min_free_kbytes.c >> index 00ead04..8a03f85 100644 >> --- a/testcases/kernel/mem/tunable/min_free_kbytes.c >> +++ b/testcases/kernel/mem/tunable/min_free_kbytes.c >> @@ -128,7 +128,7 @@ static void test_tune(unsigned long >> overcommit_policy) >> /* case2 */ >> else { >> memfree = read_meminfo("MemFree:"); >> - tune = memfree / 2; >> + tune = memfree / 5; >> set_sys_tune("min_free_kbytes", tune, 1); >> } >> >> -- >> 1.7.7 >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions >> will include endpoint security, mobile security and the latest in >> malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Ltp-list mailing list >> Ltp...@li... >> https://lists.sourceforge.net/lists/listinfo/ltp-list >> |