Bug 22768

Summary: fxp get slow often!
Product: Base System Reporter: wkwu <wkwu>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description wkwu 2000-11-11 15:20:00 UTC
This is a heavy traffic ftp server.
I use fxp0(intel-82559) connected to the intel 8-port switch.
The speed of ftpd often getting slow.(From 5MB/sec down to 10KB/sec)
So that I create a crontab of root:

ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media 100BaseTX
sleep 1
ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media autoselect

running 2 times every hour to keep the speed of ftpd.

Fix: 

How can I help you debug?
Comment 1 David Greenman 2000-11-11 15:36:52 UTC
>ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media 100BaseTX
>sleep 1
>ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media autoselect
>
>running 2 times every hour to keep the speed of ftpd.

   I have no idea what you are trying to accomplish with the above, but it is
weird in the extreme. The problem that you are describing sounds like a duplex
negotiation problem with your switch. Try setting both sides to full duplex.
For the FreeBSD side remove your cronjob and then:

ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media 100basetx mediaopt full-duplex

   You'll also need to modify your /etc/rc.conf as well with the new
media/mediaopt so that it is set correctly after a reboot.
   You'll have to consult your switch manual for how to configure it for
full duplex.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
Pave the road of life with opportunities.
Comment 2 wkwu 2000-11-13 02:29:12 UTC
On Sat, Nov 11, 2000 at 07:36:52AM -0800, David Greenman wrote:
> >ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media 100BaseTX
> >sleep 1
> >ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media autoselect
> >running 2 times every hour to keep the speed of ftpd.
>    I have no idea what you are trying to accomplish with the above, but it is
> weird in the extreme. The problem that you are describing sounds like a duplex
> negotiation problem with your switch. Try setting both sides to full duplex.
> For the FreeBSD side remove your cronjob and then:
> ifconfig .... media 100basetx mediaopt full-duplex

I am quite sure that the Intel 8-port 10/100 Switch work well.
I also tried your suggestion, still not work.

In fact, I used the dc0 network card before. 
I thought the problem may cause by dc0, so I buy the fxp0.

Is there any other possibilities?
Comment 3 David Greenman 2000-11-13 06:10:51 UTC
>On Sat, Nov 11, 2000 at 07:36:52AM -0800, David Greenman wrote:
>> >ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media 100BaseTX
>> >sleep 1
>> >ifconfig fxp0 140.113.214.152 netmask 0xffffff00 media autoselect
>> >running 2 times every hour to keep the speed of ftpd.
>>    I have no idea what you are trying to accomplish with the above, but it is
>> weird in the extreme. The problem that you are describing sounds like a duplex
>> negotiation problem with your switch. Try setting both sides to full duplex.
>> For the FreeBSD side remove your cronjob and then:
>> ifconfig .... media 100basetx mediaopt full-duplex
>
>I am quite sure that the Intel 8-port 10/100 Switch work well.
>I also tried your suggestion, still not work.
>
>In fact, I used the dc0 network card before. 
>I thought the problem may cause by dc0, so I buy the fxp0.
>
>Is there any other possibilities?

   So you're having the same problem with 'tulip' clones (dc device)? Have you
tried using a different cable? Does the Intel switch have any error stats that
might give a clue why the performance is bad? What does "ifconfig fxp0" show
(speed/duplex) when the performance is low?

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
Pave the road of life with opportunities.
Comment 4 jlemon freebsd_committer freebsd_triage 2001-03-14 04:01:22 UTC
State Changed
From-To: open->closed

Feedback timeout.  Most likely a duplex problem.