Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 1999 09:23:16 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        Dan Langille <junkmale@xtra.co.nz>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ftpd uses > 50% of CPU
Message-ID:  <Pine.BSF.3.96.990517090501.26546u-100000@cygnus.rush.net>
In-Reply-To: <19990517075512.RVTO7623210.mta2-rme@wocker>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 May 1999, Dan Langille wrote:

> I transferred a 23M file via FTP from my NT box to my FreeBSD box last 
> night.  The transfer rate varied between 170 and 200 KB/s.  I thought that 
> was a bit low over a CAT5 with 10M cards.  So I looked to see what was 
> going on in the FreeBSD box.  I found ftpd was running very high.  The 
> snapshot below is not typical.  It often was 50 or 60% of CPU.
> 
> Is this normal for a 3.1-Stable box on an old 486 with 16M of RAM?
> 
> last pid: 53088;  load averages:  1.88,  1.65,  1.34                       
>     up 68+02:45:47  19:50:17
> 44 processes:  2 running, 42 sleeping
> CPU states:  1.9% user, 87.3% nice,  5.6% system,  5.2% interrupt,  0.0% 
> idle
> Mem: 1972K Active, 3080K Inact, 6108K Wired, 2060K Cache, 1408K Buf, 528K 
> Free
> Swap: 250M Total, 28M Used, 222M Free, 11% Inuse
> 
>   PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
> 39626 root     105  20   972K   252K RUN     91.5H 39.36% 39.36% rc5des
> 53051 root       2   0  1068K   448K sbwait   3:22 37.55% 37.55% ftpd
> 53083 root      69   0  1580K   492K RUN      0:34 16.55% 16.55% top
> 77603 root       2   0  1232K    44K select  14:39  0.00%  0.00% sshd1
>   157 root      10   0   988K   140K nanslp  13:08  0.00%  0.00% cron

I'm assuming you have IDE disks?  If so, have you enabled DMA?

I'm not sure if your 486 will support that, but it's worth at least
_trying_ to use PIO.  Look in /usr/src/sys/i386/conf/LINT :

# Each drive has a 16 bit flags value defined:
#       The low 8 bits are the maximum value for the multi-sector I/O,
#       where 0xff defaults to the maximum that the drive can handle.
#       The high bit of the 16 bit flags (0x8000) allows probing for
#       32 bit transfers.  Bit 14 (0x4000) enables a hack to wake
#       up powered-down laptop drives.  Bit 13 (0x2000) allows
#       probing for PCI IDE DMA controllers, such as Intel's PIIX
#       south bridges. Bit 12 (0x1000) sets LBA mode instead of the
#       default CHS mode for accessing the drive. See the wd.4 man page.

I usually try flags = 0xa0ffa0ff like this:

controller     wdc0    at isa? port IO_WD1 irq 14 flags 0xa0ffa0ff

be CAREFUL! sometimes the system will not boot on oldermachines when you
turn on DMA, you may have to fiddle with the flags value to get it
to boot.

Make sure you keep a backup of a kernel that _will_ boot.

enjoy,
-Alfred



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990517090501.26546u-100000>