Hot!Increase TCP/ip throughput PIC32MX785F512L

Author
Akshayy
Junior Member
  • Total Posts : 102
  • Reward points : 0
  • Joined: 2016/07/29 06:35:35
  • Location: 0
  • Status: offline
2017/07/13 23:05:21 (permalink)
0

Increase TCP/ip throughput PIC32MX785F512L

Hi,
 
       I am currently getting 500Kbps throughput in my application.I am using LAN8720A 10/100 external phy.How can increase ethernet speed?
 
Regards,
Akshay
#1

16 Replies Related Threads

    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/13 23:08:41 (permalink)
    0
    How PHY can be configured for 100mbps speed?
    #2
    rainad
    Super Member
    • Total Posts : 771
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/14 10:38:52 (permalink)
    3 (1)
    What do you use, TCP or UDP?
    What TCP/IP stack?
    LAN8720 supports auto-configuration.
    So, if you enabled this and plugged it into a 100 Mbps link, it will run at that speed.
     
    #3
    RISC
    Super Member
    • Total Posts : 4209
    • Reward points : 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/14 13:11:51 (permalink)
    0
    Hi,
    Are you using MLA or Harmony ?
    Which version ?
    What is the size of your buffers ?
    Regards
     
    #4
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/17 05:51:43 (permalink)
    0
    I am using MLA.what does 100 mbps link mean?.did u mean cable?
    #5
    jdeguire
    Super Member
    • Total Posts : 340
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/17 06:08:06 (permalink)
    4 (1)
    When you connect two nodes with an Ethernet cable, the PHYs on the two side enter an auto-negotiation phase in which they will figure out the fastest link speed they can use.  Chances are that they are negotiating to 100BASE-T and so is probably not the cause of your low throughput.
     
    If you can, try increasing the size of your TCP Tx and Rx buffers and looking through your application code for bottlenecks.
    #6
    RISC
    Super Member
    • Total Posts : 4209
    • Reward points : 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/18 04:40:02 (permalink)
    3 (1)
    Hi,
    Read the MLA documentation related to TCP/IP.
    There are some hints about what to change to increase performance. One of them is the buffer size for receiving and transmitting packets
    Regards
    #7
    jdeguire
    Super Member
    • Total Posts : 340
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/18 10:54:47 (permalink)
    4 (1)
    You can also give the Harmony TCP/IP Stack a try.  The Harmony stack is actually quite a bit faster than the MLA one, mainly becuase of better memory management (fewer/zero copies when transmitting TCP packets) and a faster IP checksum calculation.  The trade-off is that the Harmony stack uses more flash memory than the MLA stack, so you'll have to decide if that's worth extra bandwidth.
    #8
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/27 23:07:09 (permalink)
    0
    RISC
    Hi,
    Read the MLA documentation related to TCP/IP.
    There are some hints about what to change to increase performance. One of them is the buffer size for receiving and transmitting packets
    Regards




     
    I have read those lines.but i could increase upto 700kbps...is should have been..100mbits/s/8=12mbytes per sec.What is ideal throughput of 100bateT phy and what is practical maximum throughput it can generate with PIC32,cat5 cable?
    #9
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/27 23:10:20 (permalink)
    0
    jdeguire
    You can also give the Harmony TCP/IP Stack a try.  The Harmony stack is actually quite a bit faster than the MLA one, mainly becuase of better memory management (fewer/zero copies when transmitting TCP packets) and a faster IP checksum calculation.  The trade-off is that the Harmony stack uses more flash memory than the MLA stack, so you'll have to decide if that's worth extra bandwidth.




    Firmware is already made a year ago.earlier it was sending 50byte of packet in every sec.So we didnt need to calculate its speed.Now we need to send video file.We just want to have same firmware with increase in throughupt.Thats itSmile: SmileSmile: Smile
    #10
    jdeguire
    Super Member
    • Total Posts : 340
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/28 10:57:18 (permalink)
    3 (1)
    AKSHAY D BHAVSAR
    I have read those lines.but i could increase upto 700kbps...is should have been..100mbits/s/8=12mbytes per sec.What is ideal throughput of 100bateT phy and what is practical maximum throughput it can generate with PIC32,cat5 cable?
    ...
    Firmware is already made a year ago.earlier it was sending 50byte of packet in every sec.So we didnt need to calculate its speed.Now we need to send video file.We just want to have same firmware with increase in throughupt.Thats it

    You are not hitting the ideal throughput you are seeking because of bottlenecks in your application, not because of the PHY.  You need to start profiling your application to figure out what the bottleneck is.
     
    One thing you can change is to have the TCP/IP stack calculate the IP checksum using the DMA Controller in the PIC32 (See the "Special Function Module" section in Chapter 31 of the PIC32 Reference Manual), which will be much faster than the old MLA stack routine.  You may also be able to take the assembly-based routine from Harmony as that calculates the IP checksum even faster than the DMA hardware.
    #11
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/29 04:14:06 (permalink)
    0
    i am using crystal frequeny 8 MHZ.and using pll.system frequency=80 Mhz and peripheral frequency=Mhz.What if i use 25Mhz crystal?will it increase frequency although i will use same peripheral freqa and system freq.80mhz
    #12
    crosland
    Super Member
    • Total Posts : 1061
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Bucks, UK
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/29 07:11:36 (permalink)
    4 (1)
    AKSHAY D BHAVSAR
    I have read those lines.but i could increase upto 700kbps...is should have been..100mbits/s/8=12mbytes per sec.What is ideal throughput of 100bateT phy and what is practical maximum throughput it can generate with PIC32,cat5 cable?

    You are not accounting for all the packet overhead. It's not possible to get 12 MB/s USER data.
     
    What size packets are you sending?
    #13
    NorthGuy
    Super Member
    • Total Posts : 4316
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/29 07:50:27 (permalink)
    4 (2)
    Start from the beginning. First, figure out how fast your program can supply data. Go to the point where you send a block of data with TCP/IP, but don't send (comment out the function call which sends). Toggle a pin instead. Get a scope and measure the frequency. This will tell you if the problem is with TCP/IP speed or with your data supply speed.
     
    #14
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/30 01:25:26 (permalink)
    0
    I have to send video data coming from ethernet TCP over 4G.so its speed should b greater than 5mbps.
    #15
    Akshayy
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2016/07/29 06:35:35
    • Location: 0
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/30 01:29:09 (permalink)
    0
    whai is the ideal maximum possible ethernet standalone throughput one can get with this configuration? i
    crosland
    AKSHAY D BHAVSAR
    I have read those lines.but i could increase upto 700kbps...is should have been..100mbits/s/8=12mbytes per sec.What is ideal throughput of 100bateT phy and what is practical maximum throughput it can generate with PIC32,cat5 cable?

    You are not accounting for all the packet overhead. It's not possible to get 12 MB/s USER data.
     
    What size packets are you sending?



    ?
    #16
    qhb
    Superb Member
    • Total Posts : 5034
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Increase TCP/ip throughput PIC32MX785F512L 2017/07/30 05:14:12 (permalink)
    4 (1)
    NorthGuy
    Start from the beginning. First, figure out how fast your program can supply data. Go to the point where you send a block of data with TCP/IP, but don't send (comment out the function call which sends). Toggle a pin instead. Get a scope and measure the frequency. This will tell you if the problem is with TCP/IP speed or with your data supply speed.

    I think this test would be very worthwhile trying...
     
     
    #17
    Jump to:
    © 2017 APG vNext Commercial Version 4.5