USB Transfert making the system unresponsive fix

Sometimes my computer became unresponsive and couldn’t do any action while copying to slow USB Keys. I found online the reason and the solution to this.

Apparently the configuration /sys/kernel/mm/transparent_hugepage/khugepaged/defrag can really influence this issue. If it’s set to “always” the machine will try to defragment pages to have space for huge pages.
Setting it to “madvise” will active the behavior only on address spaces that require it without interfering with the feature (disabling it) ,still allowing HugePages aware applications to use them, and, espescially, will stop your machine from hanging.

As state in a Phoronix article linked at the bottom of the page since Kernel 3.8 this feature avoids allocating huge chunks of memory when not necessary, so maybe setting /sys/kernel/mm/transparent_hugepage/khugepaged/enabled to “always” may be a good idea after all.

Here you can read more about the HugePages support
https://www.kernel.org/doc/Documentation/vm/transhuge.txt

Here you can see some benchmarks
http://structureddata.org/2012/06/18/linux-6-transparent-huge-pages-and-hadoop-workloads/

Here you can read more about it
http://www.phoronix.com/scan.php?page=news_item&px=MTI1MTQ
http://www.phoronix.com/scan.php Za s da ?page=article&item=linux_transparent_hugepages

About these ads

,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 33 other followers

%d bloggers like this: