contributed by < YLowy
>
Web Framework Benchmarks 中 lwan web server 在 JSON serialization 中達到了第 12 名。其透過FrameworkBenchmarks測試各種不同的網頁之效能做排名。
對local host 進行測試 :
weighttp -n 10000 -c 10 -t 4 -k localhost:
12447 req/s
$ weighttp -n 10000 -c 10 -t 4 -k localhost:80
weighttp 0.4 - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 3 concurrent requests, 2500 total requests
spawning thread #2: 3 concurrent requests, 2500 total requests
spawning thread #3: 2 concurrent requests, 2500 total requests
spawning thread #4: 2 concurrent requests, 2500 total requests
progress: 10% done
progress: 20% done
progress: 30% done
progress: 40% done
progress: 50% done
progress: 60% done
progress: 70% done
progress: 80% done
progress: 90% done
progress: 100% done
finished in 0 sec, 803 millisec and 361 microsec, 12447 req/s, 10441 kbyte/s
requests: 10000 total, 10000 started, 10000 done, 10000 succeeded, 0 failed, 0 errored
status codes: 10000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 8589525 bytes total, 2469525 bytes http, 6120000 bytes data
32139 req/s
$ weighttp -n 10000 -c 10 -t 4 -k localhost:8080
weighttp 0.4 - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 3 concurrent requests, 2500 total requests
spawning thread #2: 3 concurrent requests, 2500 total requests
spawning thread #3: 2 concurrent requests, 2500 total requests
spawning thread #4: 2 concurrent requests, 2500 total requests
progress: 10% done
progress: 20% done
progress: 30% done
progress: 40% done
progress: 50% done
progress: 60% done
progress: 70% done
progress: 80% done
progress: 90% done
progress: 100% done
finished in 0 sec, 311 millisec and 143 microsec, 32139 req/s, 6057 kbyte/s
requests: 10000 total, 10000 started, 10000 done, 10000 succeeded, 0 failed, 0 errored
status codes: 10000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 1930000 bytes total, 1800000 bytes http, 130000 bytes data
Debug always make developer sad, especially in a big system. How to debug in Linux Kernel? Tracing In early kernel patch, we have some tracing tools, e.g. strace, gdb. They are all based on the old tracing system call: ptrace. GDB gdb -q test.o strace
Jul 8, 2022refer: https://thenewstack.io/how-io_uring-and-ebpf-will-revolutionize-programming-in-linux/ io_uring Classic IO system call For UDP's receive system call, it can be divided into two stages, wait for data and copy data to user space. Kernel offered the following blocking system calls to deal with file descriptors, be they storage files or sockets: size_t read(int fd, void *buf, size_t count); size_t write(int fd, const void *buf, size_t count);
Jun 15, 20221. uclib vs glib uclib ->https://git.uclibc-ng.org/git/uclibc-ng.git uClibc-ng is a small C library for developing embedded Linux systems. It is much smaller than the GNU C Library, but nearly all applications supported by glibc also work perfectly with uClibc-ng. In strlen() function, the "finding zero in long size string" is different between glib and uclib. See Here //uclib
Jun 6, 2022We often use the strlen(str) function to get the length of the string. This is broad-use, and simply implemented. In C, we cannot consider a string as an object. We need to find the '\0'(NULL) character to determine the end of the string. C11 6.4.5 6. a byte or code of value zero is appended to each multibyte character sequence that results from a string literal or literals. C11 7.1.1 A string is a contiguous sequence of characters terminated by and including the first null character. The term multibyte string is sometimes used instead to emphasize special processing given to multibyte characters contained in the string or to avoid confusion with a wide string. A pointer to a string is a pointer to its initial (lowest addressed)
May 22, 2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up