Coder Social home page Coder Social logo

Comments (8)

beacer avatar beacer commented on May 28, 2024 5

Let me try to ask for mTCP part. I'm not f-stack staff, just have some idea for mTCP and f-stack.

  1. To some extent, mTCP is not a fully TCP/IP stack, it has ARP/IP/Routing but need hard coding in config file. Actually the ARP/IP/Routing implementation is too simple to be a production ready stack (In my opinion). Further more, it's not support UDP/IGMP/IPv6/VLAN/VxLAN/Tunnel/Bonding/Tools/..., while some user cases may need them. All of above means workloads and bugs.
    So if we need a sophisticated stack, user mode FreeBSD/Linux is a better choices.
  2. mTCP is really quick, but not as good as f-stack/FreeBSD.
    After integrated mTCP with Nginx, we found it's much faster than native Nginx. However, mTCP has dedicated thread for mTCP/DPDK (RunMainLoop) besides user application (like Nginx/Lighttpd). Two threads means lock for mTCP API and internal thread, and they shares CPU core. perf flame graph shows about 1/2 CPU time is consumed by mTCP thread while 1/2 left for app(Nginx). Yes, we can adjust the ration, but ...
    That may be the reason f-stack is faster.
  3. To use mTCP, some effort is needed to integrated with Nginx, the original project is only integrated with lighttpd. Particularly,Nginx is multi-process model (master/workers) while mTCP is mult-thread model.

from f-stack.

jfb8856606 avatar jfb8856606 commented on May 28, 2024 4

F-Stack glued DPDK,FreeBSD TCP/IP stack,Posix API,Coroutine API and applications to a full user space development kit.

  1. F-Stack and mTCP developed by pure C. Seastar developed by C++14,supported Future-Promise, Shared-nothing,message-passing etc.
  2. All these projects do packet I/O via DPDK. mTCP modified the DPDK source code.
  3. F-Stack ported FreeBSD TCP/IP stack to user space, the FreeBSD TCP/IP stack is complex(compared with Seastar or mTCP), advantageous, functional, stable,and there are many tools can be used,such as sysctl, ifconfig, netstat etc. Seastar's native stack and mTCP's user-level stack developed according to the RFC,they are simple and efficient. However, there are many problems in the WAN environment.
  4. F-Stack and mTCP's API are posix-like, the existing applications can be ported easily. When use Seastar, you need to rewrite your applications with C++14.
  5. F-Stack and Seastar supported coroutine API, you don't need to process complex asynchronous events. mTCP does not have a similar interface.
  6. Seastar has a memory manage system(like tcmalloc), supported zero copy when using hugepages, and user space I/O scheduler via libaio. F-Stack and mTCP have not supported that.
  7. They all feature high performance, especially the performance of short TCP connection(see CPS test, Connections Per Second). The performance of L4/L7 applications is in the same order of magnitude.

from f-stack.

gpstrive avatar gpstrive commented on May 28, 2024 4
  1. mTCP is optimized for short tcp flows, which is not suitable for persistent connection
  2. mTCP is not robust and buggy(we have tested it with dpdk)
  3. f-stack is multi-process model and you can't run multiple different apps at the same time

from f-stack.

whl739 avatar whl739 commented on May 28, 2024 2

@tigerjibo

  1. What the detail next development plan?

See our roadmap.
What we have done:

NIC offload: checkksum(IP/TCP/UDP/SCTP), TSO, VLAN).
User space tools: sysctl, ifconfig.
  1. Is there any operating system limitation?

We support Linux. And we only tested on the kernel version 3.10+, we didn't test on 2.6.

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024

Thanks for all reply!
But What about are the other questions?
2. What the detail next development plan?
3. Is there any operating system limitation?

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024

@gpstrive. For now mtcp has some buggy, but I think mtcp is still the excellent project based on DPDK.
This is very simple and support the virtual net interface for controlling and configure the data plane netcard. It is very nice to develop the particular business,which is not the full stack.

from f-stack.

tigerjibo avatar tigerjibo commented on May 28, 2024

@whl739 OK, thx!

from f-stack.

isyes avatar isyes commented on May 28, 2024

@jfb8856606 I think seastar do not support co-routine API, seastar thread is cooperative, I think not the same with co-routine.

from f-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.