Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


Search this Thread
Old 03-09-2012, 08:06 PM   #1
LQ Newbie
Registered: May 2009
Distribution: Slackware 14.1
Posts: 24

Rep: Reputation: 2
Extremely sluggish system with newest kernels under high memory load

When using newest kernels (starting with 3.0 till 3.2), system becomes unresponsive when some application fills up all (or almost all) physical memory. One way to reproduce - importing some complicated multipage pdf document in Gimp. When ram usage hits about ~900mb (1G ram total), computer basically locks up - takes more than 10 seconds to respond to single keypress. Also high HDD activity is observed. Of course it's logical - I guess kernel tries to move something to swap partition. The thing is, even after longer waiting, HDD trashing is still going on and swap usage almost hasn't changed. When using kernel 2.6.39, system gets somewhat sluggish in this scenario, but at least completely managable, and I can see swap usage climbing. I have tried to fiddle with some virtual memory parameters (like swappiness), but nothing helped. This problem was even worse in 3.0 kernels - I got some serious sound stuttering during even relatively light I/O - like launching video player. All tested kernels are self-compiled. Any clues are more than welcome, since this bug (or "feature") is very annoying (especially when this happens during some network gaming session).
Old 03-09-2012, 08:37 PM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,564

Rep: Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086
Seeing a few like this recently. I'd be guessing transparent huge pages.
Try this - "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"

Do some testing, and if no change try never instead of madvise. If that doesn't help, try turning THP off altogether.
echo never > /sys/kernel/mm/transparent_hugepage/enabled

Let us know how it goes.
Old 03-09-2012, 09:05 PM   #3
LQ Newbie
Registered: May 2009
Distribution: Slackware 14.1
Posts: 24

Original Poster
Rep: Reputation: 2
Unfortunately I havent even compiled hugepage support into kernel, so that shouldn't be the cause(don't have anything in /sys/kernel/mm dir) Just tested again and same strange situation - some high I/O happening (like 10-30 Mb/s), but swap usage changes very little (40 Mb out of 1,5 Gb)
Old 03-10-2012, 10:55 AM   #4
LQ Newbie
Registered: May 2009
Distribution: Slackware 14.1
Posts: 24

Original Poster
Rep: Reputation: 2
Don't know if this can be called 'solved' but I compiled kernel with cgroups support and together with little daemon called ulatencyd situation seems to have gotten a bit better. Needs some more testing.
Old 03-10-2012, 01:58 PM   #5
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I've had the opposite experience, i.e. recent 3.2.x kernels have solved these types of problems for me.

Here's what I have enabled:

Also, I have disabled swap completely, I have zcache enabled instead. I use the deadline I/O scheduler, if you use CFQ make sure to have CONFIG_BLK_CGROUP enabled as well as CONFIG_CFQ_GROUP_IOSCHED. I've found deadline to be better for me.

Last edited by H_TeXMeX_H; 03-10-2012 at 02:00 PM.
Old 03-11-2012, 05:36 AM   #6
LQ Newbie
Registered: May 2009
Distribution: Slackware 14.1
Posts: 24

Original Poster
Rep: Reputation: 2
Thanks for suggestion. Unfortunately, that didnt helped much, although those features (cleancache, zcache) seems interesting and worth some testing. I guess I don't pay enough attention to all those new kernel features I little clarification those newer kernel generally perform fine exept case I mentioned situation when close to running out of physical RAM. Of course, this isn't noticeable on newer computers with several gigs of RAM.


kernel, memory, swap

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql and httpd memory load is HIGH !!! Pariah Linux - General 3 10-31-2009 01:56 PM
[SOLVED] Very slow system response to user input, variable (and HIGH) CPU load on P4 HT system f4c3l355 Linux - General 3 09-23-2009 09:28 AM
FC6 - Extremely Sluggish Installer. Help? McSwaggers Fedora - Installation 1 01-26-2007 11:51 AM
need to create high system load bigtl Linux - General 2 09-29-2005 08:20 AM

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration