LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-26-2013, 02:24 PM   #1
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 690

Rep: Reputation: 276Reputation: 276Reputation: 276
pm-utils execute hdparm on all drives without being asked for


Today I found out, why my USB hard drives behave strangely when connected to my Slackware 14.0 machines.

Seems that on every suspend/resume, pm-utils script /usr/lib/pm-utils/power.d/harddrive executes
Code:
hdparm -W 0 -S 0 -B 254 -M 0
by default on every connected drive.

While this can have unintentional consequences on USB hard drives, disabling the write cache on SATA drives causes a huge performance loss. It should never been disabled permanently, only for journal flushes, which the kernel does automatically by himself.

I solved that issue by removing the x bit on the /usr/lib/pm-utils/power.d/harddrive, but that gets overwritten by every update.

This is my opinion on this issue: If a machine has no battery and is connected to AC power all the time, such scripts should not fiddle around with any settings (including PCIe power-management and file-system read-ahead, journal commit) and should go with kernel/device defaults instead.

Last edited by jtsn; 10-26-2013 at 02:42 PM.
 
Old 10-26-2013, 03:32 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 836

Rep: Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620Reputation: 1620
Quote:
Originally Posted by jtsn View Post
Today I found out, why my USB hard drives behave strangely when connected to my Slackware 14.0 machines.

Seems that on every suspend/resume, pm-utils script /usr/lib/pm-utils/power.d/harddrive executes
Code:
hdparm -W 0 -S 0 -B 254 -M 0
by default on every connected drive.

While this can have unintentional consequences on USB hard drives, disabling the write cache on SATA drives causes a huge performance loss. It should never been disabled permanently, only for journal flushes, which the kernel does automatically by himself.

I solved that issue by removing the x bit on the /usr/lib/pm-utils/power.d/harddrive, but that gets overwritten by every update.
This will stop the behavior permanently:

Code:
touch /etc/pm/power.d/harddrive
Quote:
This is my opinion on this issue: If a machine has no battery and is connected to AC power all the time, such scripts should not fiddle around with any settings (including PCIe power-management and file-system read-ahead, journal commit) and should go with kernel/device defaults instead.
That's my opinion, too. I hate this sort of nonsense in the background. Thanks for pointing it out.

Last edited by volkerdi; 10-26-2013 at 03:34 PM.
 
1 members found this post helpful.
Old 10-27-2013, 09:56 AM   #3
ill323
LQ Newbie
 
Registered: Jul 2010
Posts: 17

Rep: Reputation: 3
I disabled the pm-utils by this:

Quote:
diff -u /etc/UPower/UPower.conf.orig /etc/UPower/UPower.conf
--- /etc/UPower/UPower.conf.orig 2012-04-09 04:57:57.000000000 +0800
+++ /etc/UPower/UPower.conf 2012-11-07 03:16:47.000000000 +0800
@@ -20,6 +20,12 @@
# default=true
AllowHibernateEncryptedSwap=true

+# This controls whether we want the powersave commands to be run when running
+# on battery or plugging AC.
+#
+# default=true
+RunPowersaveCommand=false
+
# Enable the Watts Up Pro device.
#
# The Watts Up Pro contains a generic FTDI USB device without a specific
But I'm not sure if it should be the default config.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ssh spins up all file server hard drives. Any ideas on why? (hdparm related) farnsy Linux - Server 4 10-13-2012 09:30 AM
hdparm doesn't load hdparm.conf KOTAPAKA Linux - Hardware 2 05-21-2008 09:54 AM
hdparm and Sata drives? Darkvater Linux - Hardware 3 02-17-2005 07:07 AM
hdparm -tT not working for my cd drives LavaDevil94 Linux - Hardware 11 05-01-2004 07:53 PM
hdparm -g NOT= hdparm -i ---LILO hangs @ L stevewalsh Linux - General 4 07-23-2001 09:37 PM


All times are GMT -5. The time now is 08:23 PM.

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