2011 年 2 月 5 日联想 P1 Gen 2 的 Redis 基准测试结果很糟糕

2011 年 2 月 5 日联想 P1 Gen 2 的 Redis 基准测试结果很糟糕

我在全新的超高规格笔记本电脑(Lenovo P1 Gen 2)上得到了一些非常糟糕的 Redis 基准测试

~ % cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 158
model name  : Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
 redis-benchmark 
====== PING_INLINE ======
  100000 requests completed in 6.15 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.00% <= 1 milliseconds
33.15% <= 2 milliseconds
91.81% <= 3 milliseconds
99.99% <= 4 milliseconds
100.00% <= 4 milliseconds
16265.45 requests per second

====== PING_BULK ======
  100000 requests completed in 6.15 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.00% <= 1 milliseconds
32.82% <= 2 milliseconds
89.20% <= 3 milliseconds
99.97% <= 4 milliseconds
100.00% <= 4 milliseconds
16254.88 requests per second

====== SET ======
  100000 requests completed in 6.14 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

0.00% <= 1 milliseconds
33.01% <= 2 milliseconds
89.44% <= 3 milliseconds
99.99% <= 4 milliseconds
100.00% <= 4 milliseconds
16289.30 requests per second

我拥有的一台古老的 MBP 为 SET 推了 60k,我的台式机为该集推了 177935,这是 10 倍多。

桌面运行相同的内核,安装 Redis 后可以直接从 Arch 安装程序中重现此内核。(从 USB 驱动器启动)

 ~ % uname -a
Linux laptop 5.2.11-arch1-1-ARCH #1 SMP PREEMPT Thu Aug 29 08:09:36 UTC 2019 x86_64 GNU/Linux

知道我将如何调试这个可怕的网络堆栈性能吗localhost

redis-server --version
Redis server v=5.0.5 sha=00000000:0 malloc=jemalloc-5.2.0 bits=64 build=78473e0efb96880a

编辑

如果我卸载并重新加载 wifi,事情会变得更快。

[root@slaptop ~]# modprobe -r iwlmvm
[root@slaptop ~]# modprobe -r cfg80211
[root@slaptop ~]# modprobe -r iwlwifi
[root@slaptop ~]# modprobe iwlwifi
[root@slaptop ~]# modprobe cfg80211
[root@slaptop ~]# modprobe iwlmvm
[root@slaptop ~]# redis-benchmark 
====== PING_INLINE ======
  100000 requests completed in 0.61 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

100.00% <= 0 milliseconds
165016.50 requests per second

====== PING_BULK ======
  100000 requests completed in 0.63 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

100.00% <= 0 milliseconds
159744.41 requests per second

====== SET ======
  100000 requests completed in 0.60 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

所以我猜测这与初始化网络时的操作顺序有些关系。我想知道...

相关内容