博客
关于我
STM32F7 LWIP协议栈TCP速度测试
阅读量:596 次
发布时间:2019-03-12

本文共 3152 字,大约阅读时间需要 10 分钟。

Comparing TCP Reception Performance Between LWIP and DJYIP Protocol Stacks on STM32F7

When evaluating the performance of the LWIP and DJYIP protocol stacks on STM32F7, it is important to understand the differences in TCP packet reception speeds under various conditions. This testing was conducted to ensure consistent hardware and software configurations while assessing the efficiency of the protocol stacks. The following analysis outlines the testing methodology, setup, and results.

Testing Objectives

The primary goal of this testing was to compare the TCP packet reception speeds of the LWIP and DJYIP protocol stacks under identical hardware and software conditions. By maintaining consistency in both hardware platforms and software configurations, we aimed to isolate any differences in performance that could be attributed to the protocol stacks themselves.

Testing Methodology

The testing was conducted using an STM32F7 development board with the following specifications:

  • Hardware Platform: STM32756G-EVAL2
  • Clock Frequency: 200MHz
  • Communication Interface: Direct connection to the sender board

The software configuration for both protocol stacks included:

  • Network Driver Mode: Interrupt-based
  • Buffer Pool Size: 16k bytes
  • TCP Window Size: 2048 bytes (2 * TCP MSS)

The testing process involved:

  • Code Modification: Adjusting the protocol stack configurations in lwipopts.h to optimize for high-throughput performance.
  • Client-Sender Configuration: Implementing a loop to continuously send TCP packets with varying sizes (64 to 1460 bytes).
  • Server-Receiver Configuration: Setting up a receiver loop to capture incoming data and calculate packet reception rates.
  • Testing Results

    The test results revealed significant differences between the two protocol stacks, particularly in terms of TCP reception performance:

    Data Package Size (Bytes) LWIP Reception Speed (Mbps) DJYIP Reception Speed (Mbps)
    1400 3.02 3.18
    1024 4.22 3.16
    512 3.07 3.16
    256 2.02 2.5
    128 0.2±0.2 1.76
    64 0.2±0.2 1.12
    Random (0-1460) 1M (within variation) 2.52

    These results indicate that the LWIP protocol stack generally outperformed the DJYIP stack, particularly for packet sizes of 1024 bytes and larger. It is worth noting that the performance difference for 1024-byte packets might be due to the way LWIP handles packets of sizes that are powers of two, which could be a coincidence or a reflection of underlying characteristics of the protocol stack.

    Implications for Network Performance

    The findings suggest that the choice of protocol stack can significantly impact TCP performance, especially under varying packet size conditions. While LWIP demonstrated slightly better performance for larger packets, it is crucial to consider the specific requirements of the application when selecting a protocol stack. DJYIP, while slightly less efficient for larger packets, might provide more predictable or consistent performance in certain scenarios.

    Future testing could explore additional factors such as packet fragmentation, lower-layer driver optimizations, and network hardware configurations to further refine the performance characteristics of these protocol stacks.

    转载地址:http://kszxz.baihongyu.com/

    你可能感兴趣的文章
    mysql 权限整理记录
    查看>>
    mysql 权限登录问题:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
    查看>>
    MYSQL 查看最大连接数和修改最大连接数
    查看>>
    MySQL 查看有哪些表
    查看>>
    mysql 查看锁_阿里/美团/字节面试官必问的Mysql锁机制,你真的明白吗
    查看>>
    MySql 查询以逗号分隔的字符串的方法(正则)
    查看>>
    MySQL 查询优化:提速查询效率的13大秘籍(避免使用SELECT 、分页查询的优化、合理使用连接、子查询的优化)(上)
    查看>>
    mysql 查询数据库所有表的字段信息
    查看>>
    【Java基础】什么是面向对象?
    查看>>
    mysql 查询,正数降序排序,负数升序排序
    查看>>
    MySQL 树形结构 根据指定节点 获取其下属的所有子节点(包含路径上的枝干节点和叶子节点)...
    查看>>
    mysql 死锁 Deadlock found when trying to get lock; try restarting transaction
    查看>>
    mysql 死锁(先delete 后insert)日志分析
    查看>>
    MySQL 死锁了,怎么办?
    查看>>
    MySQL 深度分页性能急剧下降,该如何优化?
    查看>>
    MySQL 深度分页性能急剧下降,该如何优化?
    查看>>
    MySQL 添加列,修改列,删除列
    查看>>
    mysql 添加索引
    查看>>
    MySQL 添加索引,删除索引及其用法
    查看>>
    mysql 状态检查,备份,修复
    查看>>