grpc lb

Posted by 夏泽民

json over http与gRPC1作比较,分别使用ghz[2]和hey[3]压测gRPC和json over http的实现,gRPC的性能(Requests/sec: 59924.34)要比http api性能(Requests/sec: 49969.9234)高出20%。实测gPRC使用的protobuf的编解码性能更是最快的json编解码的2-3倍,是Go标准库json包编解码性能的10倍以上



htop

Posted by 夏泽民

https://htop.dev/ This is htop, a cross-platform interactive process viewer. It is a text-mode application (for console or X terminals) and requires ncurses.



mysql性能监控

Posted by 夏泽民

名称 描述 指标类型 可用性 Threads_connected 当前开放的连接 资源: 利用率 服务器状态变量 Threads_running 当前运行的连接 资源: 利用率 服务器状态变量 Connection_errors_internal 由服务器错误导致的失败连接数 资源: 错误 服务器状态变量 Aborted_connects 尝试与服务器进行连接结果失败的次数 资源: 错误 服务器状态变量 Connection_errors_max_connections 由 max_connections 限制导致的失败连接数 资源: 错误 服务器状态变量 MySQL 提供了 Threads_connected 指标以记录连接的线程数——每个连接对应一个线程。通过监控该指标与先前设置的连接限制,你可以确保服务器拥有足够的容量处理新的连接。MySQL 还提供了 Threads_running 指标,帮助你分隔在任意时间正在积极处理查询的线程与那些虽然可用但是闲置的连接。



FlatBuffers

Posted by 夏泽民

Access to serialized data without parsing/unpacking - What sets FlatBuffers apart is that it represents hierarchical data in a flat binary buffer in such a way that it can still be accessed directly without parsing/unpacking, while also still supporting data structure evolution (forwards/backwards compatibility). Memory efficiency and speed - The only memory needed to access your data is that of the buffer. It requires 0 additional allocations (in C++, other languages may vary). FlatBuffers is also very suitable for use with mmap (or streaming), requiring only part of the buffer to be in memory. Access is close to the speed of raw struct access with only one extra indirection (a kind of vtable) to allow for format evolution and optional fields. It is aimed at projects where spending time and space (many memory allocations) to be able to access or construct serialized data is undesirable, such as in games or any other performance sensitive applications. See the benchmarks for details. Flexible - Optional fields means not only do you get great forwards and backwards compatibility (increasingly important for long-lived games: don’t have to update all data with each new version!). It also means you have a lot of choice in what data you write and what data you don’t, and how you design data structures. Tiny code footprint - Small amounts of generated code, and just a single small header as the minimum dependency, which is very easy to integrate. Again, see the benchmark section for details. Strongly typed - Errors happen at compile time rather than manually having to write repetitive and error prone run-time checks. Useful code can be generated for you. Convenient to use - Generated C++ code allows for terse access & construction code. Then there’s optional functionality for parsing schemas and JSON-like text representations at runtime efficiently if needed (faster and more memory efficient than other JSON parsers).



序列化性能比较

Posted by 夏泽民

https://github.com/alecthomas/go_serialization_benchmarks



Search

Popular posts

Anything in here will be replaced on browsers that support the canvas element

Recent posts

This blog is maintained by 夏泽民

Get in touch with me at 465474307@qq.com

Subscribe to our mailing list

* indicates required