LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Continuous Hard Disk Read/Write on Mandrake kernel 2.6.8 (https://www.linuxquestions.org/questions/linux-general-1/continuous-hard-disk-read-write-on-mandrake-kernel-2-6-8-a-397671/)

lm317t 12-29-2005 03:25 PM

Continuous Hard Disk Read/Write on Mandrake kernel 2.6.8
 
I have a Windows-like problem with a Linux install. After I run several programs like, Mozilla, xpdf, etc, it starts to take longer and longer accessing the hard drive until finally it just sits there and reads or writes to the hard drive (led flickers) and won't respond to any commands (for like 30 seconds to a minute) such as ctrl-alt-bksp, ctrl-alt-Fkey, ssh requests or mouse clicks. Oddly the mouse pointer does move sometimes. Sometimes I am able to shut it down, other times I just reset it w/ the power. This machine is used primarily for Desktop purposes. It does not have anything other than mouse, keyboard, monitor and power connected.

I have installed Linux on 8-9 computers and this one is the only one I have ever seen a problem like this.

Any ideas? What info do you need or suggest I look at to help troubleshoot this stange problem? The hard-drive is fairly new, the machine before this that it was in died due to a CPU Fan failure so it wasn't used long. Its an 80G Western Digital IDE

WindowBreaker 12-29-2005 08:32 PM

How much RAM in your machine. Could be excessive swapping going on if you're limited on RAM.
Code:

free -m
If it happens periodically, maybe you have a crontab entry for an "updatedb" command, which indexes your hard drives.
Code:

crontab -e
And check your /etc/cron.[daily|hourly|monthly|weekly] folders for scripts.

when it slows down, run this command as root to see if updatedb is running:
Code:

pidof updatedb
or
Code:

ps aux | grep updatedb
I'd also check the drive for bad blocks (fsck).

You could also look into which parameters your drive is using. For instance, if your drive supports DMA but you're in PIO mode, it will go slow whenever it's heavily used.
Use the "hdparm" command to view/tweak the hard drive's settings.
To learn more:
Code:

man hdparm
I'd also look through your bootup messages for errors:
Code:

dmesg | less
and
Code:

less /var/log/messages

lm317t 12-30-2005 10:17 AM

Thank you so much for your time and suggestions.
I have analyzed the hardisk using all of the command line tools including fsck -f (mounted from Knoppix) and checking the blocks using some block checking program that was a pain to use. Anyway Everything checks out clean.

Here is some related info I found involving Swap space from less /var/log/messages :
Code:

Dec 27 08:59:05 installers kernel: EXT3 FS on hda2, internal journal
Dec 27 08:59:05 installers kernel: Linux agpgart interface v0.100 (c) Dave Jones
Dec 27 08:59:05 installers kernel: agpgart: Detected VIA Twister-K/KT133x/KM133 chipset
Dec 27 08:59:05 installers kernel: agpgart: Maximum main memory to use for agp memory: 149
M
Dec 27 08:59:05 installers kernel: agpgart: AGP aperture is 64M @ 0xd0000000
Dec 27 08:59:05 installers kernel: kjournald starting.  Commit interval 5 seconds
Dec 27 08:59:05 installers kernel: EXT3 FS on hda4, internal journal
Dec 27 08:59:05 installers kernel: EXT3-fs: mounted filesystem with ordered data mode.
Dec 27 08:59:05 installers kernel: kjournald starting.  Commit interval 5 seconds
Dec 27 08:59:05 installers kernel: EXT3 FS on hda5, internal journal
Dec 27 08:59:05 installers kernel: EXT3-fs: mounted filesystem with ordered data mode.
Dec 27 08:59:05 installers kernel: loop: loaded (max 8 devices)
Dec 27 08:59:05 installers kernel: hdc: ATAPI 32X CD-ROM CD-R/RW drive, 4096kB Cache, UDMA
(33)
Dec 27 08:59:05 installers kernel: Uniform CD-ROM driver Revision: 3.20
Dec 27 08:59:05 installers kernel: Linux Tulip driver version 1.1.13 (May 11, 2002)
Dec 27 08:59:05 installers kernel: PCI: Found IRQ 11 for device 0000:00:0f.0
Dec 27 08:59:05 installers kernel: tulip0:  MII transceiver #1 config 3000 status 786d adv
ertising 01e1.

and:
Code:

Dec 27 08:58:22 installers fsck: ^B
Dec 27 08:58:47 installers last message repeated 182 times
Dec 27 08:58:47 installers fsck: ^B/dev/hda5: 12/3932160 files (0.0% non-contiguous), 3878
48/7863809 blocks
Dec 27 08:58:47 installers rc.sysinit: Mounting local filesystems:  succeeded
Dec 27 08:58:48 installers rc.sysinit: Mounting loopback filesystems:  succeeded
Dec 27 08:58:48 installers loadkeys: Loading /usr/lib/kbd/keymaps/i386/qwerty/us.kmap.gz
Dec 27 08:58:48 installers keytable: Loading keymap: us succeeded
Dec 27 08:58:48 installers loadkeys: Loading /usr/lib/kbd/keymaps/include/compose.latin.in
c.gz
Dec 27 08:58:49 installers keytable: Loading compose keys: compose.latin.inc succeeded
Dec 27 08:58:49 installers keytable:  succeeded
Dec 27 08:58:49 installers rc.sysinit: Enabling swap space:  succeeded
Dec 27 08:58:50 installers mandrake_everytime: Starting netprofile:  succeeded
Dec 27 08:58:50 installers init: Entering runlevel: 5
Dec 27 08:58:53 installers rc: Starting hotplug:  succeeded
Dec 27 08:58:57 installers udev: Start udev succeeded
Dec 27 08:58:58 installers service_harddrake[2326]: ### Program is starting ###
Dec 27 08:59:01 installers service_harddrake[2326]: created file /etc/sysconfig/harddrake2
/previous_hw
Dec 27 08:59:02 installers harddrake:  succeeded

and more involving RAM:
Code:

Dec 27 13:21:53 installers kernel: Symbols match kernel version 2.6.8.
Dec 27 13:21:53 installers kernel: No module symbols loaded - kernel modules not enabled.
Dec 27 13:21:53 installers kernel: Linux version 2.6.8.1-12mdk (quintela@n5.mandrakesoft.c
om) (gcc version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)) #1 Fri Oct 1 12:53:41 CEST 2004
Dec 27 13:21:53 installers kernel: BIOS-provided physical RAM map:
Dec 27 13:21:53 installers kernel:  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable
)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserv
ed)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserv
ed)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 0000000000100000 - 000000000bff0000 (usable
)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 000000000bff0000 - 000000000bff3000 (ACPI N
VS)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 000000000bff3000 - 000000000c000000 (ACPI d
ata)
Dec 27 13:21:53 installers kernel:  BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserv
ed)
Dec 27 13:21:53 installers kernel: 0MB HIGHMEM available.
Dec 27 13:21:53 installers kernel: 191MB LOWMEM available.

When I run free -m I get:
Code:

            total      used      free    shared    buffers    cached
Mem:          187        183          3          0          3        16
-/+ buffers/cache:        162        24
Swap:            0          0          0

Interesting stuff I found in dmesg | less:
Code:

PCI: PCI BIOS revision 2.10 entry at 0xfb430, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040326
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
PnPBIOS: Disabled
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using IRQ router VIA [1106/0686] at 0000:00:07.0
spurious 8259A interrupt: IRQ7.
vesafb: probe of vesafb0 failed with error -6
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)

and:
Code:

[drm] Initialized mga 3.1.0 20021029 on minor 0:
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
eth0: no IPv6 routers present
cdrom: This disc doesn't have any tracks I recognize!
oom-killer: gfp_mask=0x1d2
DMA per-cpu:
cpu 0 hot: low 2, high 6, batch 1
cpu 0 cold: low 0, high 2, batch 1
Normal per-cpu:
cpu 0 hot: low 20, high 60, batch 10
cpu 0 cold: low 0, high 20, batch 10
HighMem per-cpu: empty

Free pages:        1896kB (0kB HighMem)
Active:39111 inactive:678 dirty:0 writeback:0 unstable:0 free:474 slab:2662 mapped:38981 p
agetables:562
DMA free:872kB min:36kB low:72kB high:108kB active:11456kB inactive:0kB present:16384kB
protections[]: 18 218 218
Normal free:1024kB min:400kB low:800kB high:1200kB active:144988kB inactive:2712kB present
:180160kB
protections[]: 0 200 200
HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:0kB present:0kB
protections[]: 0 0 0
DMA: 0*4kB 1*8kB 0*16kB 1*32kB 1*64kB 0*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB =
 872kB
Normal: 52*4kB 2*8kB 6*16kB 0*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096
kB = 1024kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Out of Memory: Killed process 4893 (mozilla-bin).

Code:

cat /etc/fstab | grep swap
<nothing>

My Question, Why does swap not seem to be working even though it seems to be getting enabled, and what is enabling it?

WindowBreaker 12-30-2005 11:05 AM

One of your boot scripts is enabling swap in the boot sequence. Even though you don't have a swap partition, it still prints the message "enabling swap". What I'd do right away is to create and start using a swap partition.
Use
Code:

fdick /dev/hda
to create a swap partition on hda. Set the filesystem type to linux swap.
Then do:
Code:

mkswap /dev/hda?
on it to prep it for use.

Then do:
Code:

swapon /dev/hda?
to tell linux to start using it.

If all goes well, just add a swap entry in /etc/fstab

You definitely need some swap space, especially since you only have 190MB of RAM. Maybe this will help solve your problem.

lm317t 12-30-2005 11:36 AM

How do I add this to fstab? Should I tell the bootscript not to swap?
Quote:

Originally Posted by WindowBreaker

If all goes well, just add a swap entry in /etc/fstab

You definitely need some swap space, especially since you only have 190MB of RAM. Maybe this will help solve your problem.


WindowBreaker 12-30-2005 07:04 PM

Here's what my swap entry in my /etc/fstab file looks like:
Code:

/dev/hda3        swap            swap        defaults        0  0
I'd just add it in by hand, making sure to use the correct partition (mine was /dev/hda3).

amosf 12-30-2005 07:10 PM

As said, not enough ram and no swap... You can make a swap file as well if you don't have a partition available. There is info on how to create a swap file in

man mkswap

lm317t 01-01-2006 09:22 AM

Adding the entry to fstab fixed the problem! Thank you so much. Before doing this I was unable keep the swap settings through a reboot.

For some reason the Mandrake gui partition manager would update the init scripts, but didn't set the swap settings correctly that I gave it.

Everything is working solid and quick. Thanks again WindowBreaker!

-Brian


All times are GMT -5. The time now is 01:43 AM.