LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   High CPU Usage with sustained network/hdd activity? (https://www.linuxquestions.org/questions/linux-software-2/high-cpu-usage-with-sustained-network-hdd-activity-182180/)

cpugeniusmv 05-16-2004 04:53 PM

High CPU Usage with sustained network/hdd activity?
 
Copying a large file from a windows box to a Slackware machine running Samba 3.04 (happens with kernel 2.6.5, 2.6.6, and 2.4.26...only it's bdflush on the 2.4.)

Code:

16:45:16  up 16 min,  1 user,  load average: 0.59, 0.14, 0.05
47 processes: 45 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  0.0% user 100.0% system  0.0% nice  0.0% iowait  0.0% idle
Mem:  515644k av,  512464k used,    3180k free,      0k shrd,    2460k buff
        38844k active,            430384k inactive
Swap:  530136k av,      0k used,  530136k free                  453256k cached

  PID USER    PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM  TIME CPU COMMAND
    8 root      25  0    0    0    0 RW  98.9  0.0  0:17  0 pdflush
 1114 root      16  0  6772 2324  5356 S    0.7  0.4  0:06  0 smbd
 1321 root      17  0  1912  992  1768 R    0.1  0.1  0:00  0 top
    1 root      16  0  480  240  456 S    0.0  0.0  0:04  0 init
    2 root      34  19    0    0    0 SWN  0.0  0.0  0:00  0 ksoftirqd/0
    3 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  0 events/0
    4 root      5 -10    0    0    0 SW<  0.0  0.0  0:02  0 kblockd/0
    6 root      11 -10    0    0    0 SW<  0.0  0.0  0:00  0 khelper
    5 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 khubd
    7 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 pdflush
  10 root      11 -10    0    0    0 SW<  0.0  0.0  0:00  0 aio/0
    9 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 kswapd0
  118 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 khpsbpkt
  121 root      16  0    0    0    0 SW    0.0  0.0  0:00  0 knodemgrd_0
  136 root      16  0    0    0    0 SW    0.0  0.0  0:00  0 kseriod
  144 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 kjournald
 1060 root      16  0  3612 1492  2428 S    0.0  0.2  0:00  0 mount.smbfs
 1062 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 smbiod
 1065 root      16  0  1412  596  1352 S    0.0  0.1  0:00  0 syslogd
 1068 root      15  0  1344  452  1308 S    0.0  0.0  0:00  0 klogd
 1071 root      16  0  1380  528  1348 S    0.0  0.1  0:00  0 inetd
 1074 root      17  0  3124 1408  2856 S    0.0  0.2  0:00  0 sshd
 1075 root      18  0  208M  17M 41020 S    0.0  3.4  0:03  0 java
 1101 root      16  0  1460  532  1420 S    0.0  0.1  0:00  0 crond
 1103 daemon    15  0  1468  620  1424 S    0.0  0.1  0:00  0 atd
 1107 root      19  0  1348  528  1304 S    0.0  0.1  0:00  0 acpid
 1116 root      16  0  3728 1484  2652 S    0.0  0.2  0:00  0 nmbd
 1118 root      18  0  1384  452  1352 S    0.0  0.0  0:00  0 gpm
 1120 root      17  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1121 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1122 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1123 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1124 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1125 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1307 root      16  0  5736 1676  5416 S    0.0  0.3  0:00  0 sshd
 1309 root      16  0  2264 1280  2044 S    0.0  0.2  0:00  0 bash

it does nearly the same thing uploading a file to the same machine via FTP (ProFTPd 1.2.9)

Code:

16:49:39  up 20 min,  1 user,  load average: 0.65, 0.25, 0.10
48 processes: 47 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  2.2% user  31.4% system  0.0% nice  0.0% iowait  66.2% idle
Mem:  515644k av,  268120k used,  247524k free,      0k shrd,    3756k buff
      231776k active,              5492k inactive
Swap:  530136k av,      0k used,  530136k free                  219432k cached

  PID USER    PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM  TIME CPU COMMAND
    8 root      17  0    0    0    0 SW  37.8  0.0  0:46  0 pdflush
 1743 mike      16  0  3800 2176  3216 S    19.3  0.4  0:11  0 proftpd
    4 root      5 -10    0    0    0 SW<  2.5  0.0  0:03  0 kblockd/0
  144 root      15  0    0    0    0 SW    0.1  0.0  0:00  0 kjournald
 1742 root      17  0  1916  992  1768 R    0.1  0.1  0:00  0 top
    1 root      16  0  480  240  456 S    0.0  0.0  0:04  0 init
    2 root      34  19    0    0    0 SWN  0.0  0.0  0:00  0 ksoftirqd/0
    3 root      5 -10    0    0    0 SW<  0.0  0.0  0:00  0 events/0
    6 root      11 -10    0    0    0 SW<  0.0  0.0  0:00  0 khelper
    5 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 khubd
    7 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 pdflush
  10 root      11 -10    0    0    0 SW<  0.0  0.0  0:00  0 aio/0
    9 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 kswapd0
  118 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 khpsbpkt
  121 root      16  0    0    0    0 SW    0.0  0.0  0:00  0 knodemgrd_0
  136 root      16  0    0    0    0 SW    0.0  0.0  0:00  0 kseriod
 1060 root      16  0  3612 1492  2428 S    0.0  0.2  0:00  0 mount.smbfs
 1062 root      15  0    0    0    0 SW    0.0  0.0  0:00  0 smbiod
 1065 root      16  0  1412  596  1352 S    0.0  0.1  0:00  0 syslogd
 1068 root      15  0  1344  452  1308 S    0.0  0.0  0:00  0 klogd
 1071 root      16  0  1380  528  1348 S    0.0  0.1  0:00  0 inetd
 1074 root      17  0  3124 1408  2856 S    0.0  0.2  0:00  0 sshd
 1075 root      18  0  208M  17M 41020 S    0.0  3.4  0:04  0 java
 1101 root      15  0  1460  564  1420 S    0.0  0.1  0:00  0 crond
 1103 daemon    15  0  1468  620  1424 S    0.0  0.1  0:00  0 atd
 1107 root      19  0  1348  528  1304 S    0.0  0.1  0:00  0 acpid
 1114 root      16  0  6772 2324  5356 S    0.0  0.4  0:06  0 smbd
 1116 root      16  0  3728 1484  2652 S    0.0  0.2  0:00  0 nmbd
 1118 root      18  0  1384  452  1352 S    0.0  0.0  0:00  0 gpm
 1120 root      17  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1121 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1122 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1123 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1124 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1125 root      16  0  1336  472  1300 S    0.0  0.0  0:00  0 agetty
 1307 root      16  0  5736 1676  5416 S    0.0  0.3  0:00  0 sshd
 1309 root      15  0  2272 1304  2044 S    0.0  0.2  0:00  0 bash

has anyone else had this problem?

the target partition is vfat...could that be causing a problem?

twilli227 05-16-2004 05:42 PM

Is this a problem or are you just curious? Your cpu is being used, not a problem? Are you having other problems when this happens?

cpugeniusmv 05-16-2004 05:43 PM

Quote:

Originally posted by twilli227
Is this a problem or are you just curious? Your cpu is being used, not a problem? Are you having other problems when this happens?
it's a problem. it really slows down file transfer.

cpugeniusmv 05-19-2004 09:07 PM

i've figured out what the problem is, but i haven't yet found a solution.

i need to enable DMA on my hard disks. but i'm having trouble.

Code:

cpuservermv root # hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

does the same for hdb. but DMA works on hde (onboard promise raid controller)

i have compiled support for my chipset as well as DMA into my kernel (well, kernels...)

Code:

cpuservermv boot # cat config-2.4.26 | grep DMA
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
# CONFIG_BLK_DEV_ADMA100 is not set
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set

Code:

cpuservermv boot # cat config-2.6.5-gentoo-r1 | grep DMA
CONFIG_GENERIC_ISA_DMA=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set

what am i doing wrong?

LavaDevil94 05-19-2004 09:18 PM

Ive seen that error before, and it occurs when you dont have DMA enabled (Y) in the config for your chipset. Seeing as you do, there must be something wrong... Is there a DMA option specifically for harddisks/drives in the config? Take a look.

cpugeniusmv 05-19-2004 09:24 PM

Quote:

Originally posted by LavaDevil94
... Is there a DMA option specifically for harddisks/drives in the config? Take a look.
the kernel config?

EDIT: i think i found it...compiling new kernel now.

cpugeniusmv 05-19-2004 09:44 PM

got it now. thanks for pointing me in the right direction :)

the offending option was here:

ATA/IDE/MFM/RLL support ->IDE, ATA and ATAPI Block devices->VIA82CXXX chipset support

i had VIA chipset support in the kernel (in Character Devices)...but i guess i missed this one :)


All times are GMT -5. The time now is 06:49 AM.