plantegg / programmer_case Goto Github PK
View Code? Open in Web Editor NEW程序员案例集锦
Home Page: https://programmer-case.vercel.app
程序员案例集锦
Home Page: https://programmer-case.vercel.app
这篇文章,它提到了
“
如果tcp发送buffer也就是SO_SNDBUF只有16K的话,这些包很快都发出去了,但是这16K的buffer不能立即释放出来填新的内容进去,因为tcp要保证可靠,万一中间丢包了呢。只有等到这16K中的某些包ack了,才会填充一些新包进来然后继续发出去。由于这里rt基本是20ms,也就是16K发送完毕后,等了20ms才收到一些ack,这20ms应用、内核什么都不能做,所以就是如前面第二个图中的大概20ms的等待平台。这块请参考[这篇文章][7]
”
如果 这里的"buffer" 是指 socket.SO_SNDBUF,那么这意味着 “bytes in flight” 必须永远 <= socket.SO_SNDBUF,但,实际上,从wireshark抓包看,并非如此。通过设置不同的socket.SO_SNDBUF来进行抓包验证,可以发现 “bytes in flight” 会远远 > socket.SO_SNDBUF。所以,这可以证明该"buffer" 并不应该是指 socket.SO_SNDBUF。
那么,问题来了:这里的" buffer"(或者说 BDP所算出的 “发送窗口”),对应到 linux kernel 之后的哪一个数据结构?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.