Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using the stock kernel and other packages from RedHat 8.0 distro on a HP Pavilion XH485 laptop (Athlon 1.0Ghz, with 512 MB of RAM). The system seems to work fine (except for a minor glitch with the sound card which I
am looking into).
But, one of the annoying characteristics (which seems reminiscent from RedHat 7.1) is continuous HDD access and CD-ROM access. It appears like every 2 seconds the system seems to be polling/reading the CD-ROM drive.
This happens even when I have no applications running. I tried stopping all the services (pretty much). But does not help. The hardrive is repeatedly accessed every 2-3 seconds.
The other funny thing is that, once I insert a CD-ROM in the drive, the continuous access stops. So I guess the system is continuously checking for CD-ROMs. In any case, the question is:
1. Is it GNOME that is accessing the HDD & CD-ROM?
2. Is it X that is accessing the HDD & CD-ROM?
3. Is it the kernel that is accessing the HDD & CD-ROM?
The problem with tis access is that it quickly drains the battery on the laptop. In addition, it prevents the HDD from spinning down, which consumes more battery power.
Any suggestions as to how I could go about eliminating the continuous drive access would be greatly appreciated.
I tried changing runlevels and it appears like that the
disk accesses stop. That definitely indicates that the problem is with X + Gnome.
I tried switching desktops to KDE using RedHat's desktop
switching tool. However, the disk access does not change and continues to remain the same.
However, in RedHat 8.0 both KDE and Gnome
run under Bluecurve by default. So, I am not sure if the problem is with Bluecurve or not.
However, the funny thing is that
I observe this behavior only when I am logged in. If I am not logged in, then the disk access does not seem to occur.
So, I think it does suggest that the problem is more with the desktop environment, possibly with GNOME or Bluecurve,
because they get started when I log into my machine.
So the big question is what application or process in GNOME/Bluecurve causes this incessant disk access...?
Well, I have run top etc. and I know that the memory usage of the machine is well below the physical RAM. For instance on my machine, top reports close to 200 MB of free "real" RAM. So I don't think swapping/virtual memory usage is the culprit.
Well, the problem with top is that it does not seem to show the I/O being performed by the various processes. Or is there a way to figure out which process is using the disk?
In any case, I narrowed down one disk access to a process called "magicdev". When I login, "magicdev" is started and it continously accesses my disks. When I stop it then my disk access pretty much stops.
However, I am unable to put my Harddisk to sleep. I use hdparam -y /dev/hda. It goes to sleep, I can distinctly hear it wind down and then after about 4-5 seconds it wakes back up. I tried it even from single user mode (init 1) and I have the same observation .ie. my harddisk goes to sleep and then wakes back up in about 5 seconds. I pretty much don't have anything running on the machine at init 1. So, the only thing causing the disk access could be:
1. The kernel itself (that does not make much sense)
2. The daemons for journaling file system (hmmm..)
3. My bios/IDE controller is screwed up?
Get's gritter and grittier...but I am not yet ready to give up..
Yup. The concept of having to poll devices to detect status and mount is a rather disappointing design (and has been one since the days of interrupt driven I/O), IMHO. There has gotta be a better way to do this.
In any case, do you guys know if this is specific to RedHat or is this an aritifact of GNOME/KDE?
But in anycase, Magicdev is besides the point right now. The bigger question I have is in that I am unable to keep my harddisk from waking up even in single-user-mode (init 1)
The harddisk goes to sleep (I am sure about it) but wakes up after 4-5 seconds. So the questions is why? What is causing the HDD to wakeup?
I am sure there are a bunch of guys out there using linux on their laptops. Do you guys worry about things like battery life etc?
If you are talking about apm, I have it precompiled in the kernel.
If you are talking about ACPI, I can give it a shot. But I am not sure if that is really going to change things. Bit I will give it a shot. It is worth it. In addtion, I want to get ACPI going on this laptop because apm does not work on this machine.
Ok, I tried compiling ACPI support into the kernel. But that did not help much. I was eager to get ACPI going on this machine but it looks like ACPI support is not yet to the point of being even useful yet. It detects several stuff on laptop (like ac adapter on/off) etc. but apart from that I could not get anything useful out of the ACPI. Maybe I am missing a couple of tools (tried pmtools but that did not help either). The least I was expecting was to be able to suspend the laptop...
In any case, that did not eleminate my harddrive access problems...so back to square one..
I may be way off on this but could the HD access be due to a Journaled file system (ext3, ReiserFS, etc)?
As I recall the default commit interval for ext3 was 5 seconds.
Edit: I remember reading about suggestions to decrease the interval of the journal from 5 to 30 secs to reduce the constant disk access. Just not sure where.
IMHO this is due to the "autorun" process (ps -ef | grep autorun). This process checks for CD's at a specified interval. The hard disk access could be anything. The LED might even be shared with the CDROM drive as they may be on the same bus. This could give the impression that it's your hard disk as well as the CDROM drive. You could kill this process manually or find where it's being started & disable. Try "man autorun" or read /usr/share/doc/autorun-3.3 for more info...
Ahh. Found the reference I mentioned earlier. It was on a Page about a Fujitsu Laptop, but it seems pertinent.
Quote:
* If you are having problems with incessant disk access, you can try the following two modifications:
o Uninstall magicdev, which is used by GNOME for checking to see if you have inserted a mountable removable device. Unfortunately this means checking for the existance of a CD/DVD every few seconds.
o Don't use ext3, or change the kjournald commit interval from 5 seconds to something like 30 seconds. I've already done this in the patched kernel linked to this site. If you want to compile your own kernel you can apply the patch found here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.