
最近压测了一下Hypercable Analytics,使用一台 8c32g 的 vultr 云服务,所有服务( redis 、sidekiq 、rails 、openresty 、timescaledb )在这台机器上,测试了一下从请求到入库的性能:

大概的处理结果是:
如果把 sidekiq 关掉,单独测试 http 请求性能,大概可以处理 25k/s,就是说把每个服务单独部署的话,25k/s 算是 hypercable analytics 在 8c32g 单机处理的极限了。
siege -R <(echo cOnnection= keep-alive) -c50 -b -t 50S 'http://10.40.96.5:8000/c7f4edce-58c3-4917-8f18-a2ea6c1b93dc/g/collect?en=page_view&v=2&tid=G-JEX4JP2G1E>m=2oe161&_p=1322479532&sr=1440x900&ul=zh-cn&cid=1162070685.1609784219&dl=https%3A%2F%2Fhypercable.github.io%2Fsite%2F%3Fto%3Dget-start&dr=https%3A%2F%2Fhypercable.github.io%2Fsite%2F%3Fto%3Dlearn-more&dt=ga%20test&sid=1611145231&sct=34&seg=1&_s=1' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36' -H 'content-type: text/plain;charset=' -H 'accept: */*' -H 'origin: https://hypercable.github.io' -H 'referer: https://hypercable.github.io/' -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7' -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'a ** SIEGE 4.0.4 ** Preparing 50 concurrent users for battle. The server is now under siege... Lifting the server siege... Transactions: 1236030 hits Availability: 100.00 % Elapsed time: 49.41 secs Data transferred: 0.00 MB Response time: 0.00 secs Transaction rate: 25015.79 trans/sec Throughput: 0.00 MB/sec Concurrency: 49.40 Successful transactions: 1236030 Failed transactions: 0 Longest transaction: 0.04 Shortest transaction: 0.00 所有服务都在容器内,可能直接放主机上的话,会稍微有些提升?
1 msg7086 2021 年 3 月 26 日 GCP 性能测试,8c 的 EPYC 性能和我 4c8t 的 i7-3770 基本相当。 你这个 vultr 8c 我估摸着也就是个差不多的水平? 可以弄一台新一点的比如说 i3-10300 或者 R5-3600 这个水平的独服来跑一下分。 |
2 whileFalse 2021 年 3 月 26 日 @msg7086 云里面 x86 架构的 8c 就是 4c8t,如果这个云没超卖的话。 arm 架构的 8c 就是 8c,因为 arm 的 cpu 没有超线程。 |
3 captain2011 2021 年 3 月 26 日 这种最终还得检测业务压力在哪,然后调整配置吧 |