Comments (8)
Let me try to ask for mTCP
part. I'm not f-stack
staff, just have some idea for mTCP
and f-stack
.
- To some extent,
mTCP
is not a fully TCP/IP stack, it hasARP/IP/Routing
but need hard coding in config file. Actually theARP/IP/Routing
implementation is too simple to be a production ready stack (In my opinion). Further more, it's not supportUDP/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. mTCP
is really quick, but not as good as f-stack/FreeBSD.
After integratedmTCP
withNginx
, we found it's much faster than nativeNginx
. However,mTCP
has dedicated thread formTCP
/DPDK
(RunMainLoop
) besides user application (like Nginx/Lighttpd). Two threads means lock formTCP
API and internal thread, and they shares CPU core.perf
flame graph shows about 1/2 CPU time is consumed bymTCP
thread while 1/2 left for app(Nginx). Yes, we can adjust the ration, but ...
That may be the reasonf-stack
is faster.- To use
mTCP
, some effort is needed to integrated withNginx
, the original project is only integrated withlighttpd
. Particularly,Nginx is multi-process model (master/workers) while mTCP is mult-thread model.
from f-stack.
F-Stack glued DPDK,FreeBSD TCP/IP stack,Posix API,Coroutine API and applications to a full user space development kit.
- F-Stack and mTCP developed by pure C. Seastar developed by C++14,supported Future-Promise, Shared-nothing,message-passing etc.
- All these projects do packet I/O via DPDK. mTCP modified the DPDK source code.
- 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. - 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.
- F-Stack and Seastar supported coroutine API, you don't need to process complex asynchronous events. mTCP does not have a similar interface.
- 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.
- 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.
- mTCP is optimized for short tcp flows, which is not suitable for persistent connection
- mTCP is not robust and buggy(we have tested it with dpdk)
- f-stack is multi-process model and you can't run multiple different apps at the same time
from f-stack.
- 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.
- 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.
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.
@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.
@whl739 OK, thx!
from f-stack.
@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)
- Unable to establish communication with the assigned IP HOT 3
- SCTP support
- [Security] Buffer overflow in freebsd/contrib/openzfs/module/lua/ldo.c
- How to config bonding mode?
- F-Stack multiple process howto
- How to set a specified IPv6 address to ff_bind() without error?
- Does F-stack support ENA on AWS? HOT 2
- helloworld_epoll --conf ../config.ini --proc-type=primary --proc-id=0 fail to bind port1 192.168.1.3 HOT 1
- Failed to launch multiple nginx workers using vmxnet3 driver HOT 1
- F-Stack Redis does not seems to listen on port 6379
- 如何配置修改freeBSD HOT 1
- Specifying devargs parameter?
- ff_rss_check for IPv6
- Unable to compile f-stack lib on fedora HOT 1
- Https Client HOT 3
- 压测nginx cpu亲和不起作用
- 反向代理连接服务端时获取的端口限制在10000到65535之间问题 HOT 1
- Error compiling F-stack on aarch64 HOT 2
- No need to run autogen.sh in jemalloc directory
- Is it possible to link with other ssl libraries? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f-stack.