-
转自:https://openeuler.org/zh/blog/haozi007/2020-09-09-isulad-benchmark.html 作者:haozi007 正文:iSula容器引擎具有很多优点:轻、快等等。那么,如何呈现这些优点呢?这篇文章我们主要关注iSula容器引擎的“快”。为了证明“快”,那就需要有参照物进行对比。环视业内,我们发现几个能打的;容器引擎鼻祖Docker、红帽的Podman以及CRI-O。目标确定了,我们开始明确对比范围了。测试范围容器引擎的使用模式主要是:客户端使用模式:多见于个人开发、测试以及部分生产场景;PAAS通过CRI接口使用模式:云计算的经典场景,通过CRI接口调用容器引擎能力,管理pod集群;为了尽量覆盖应用场景,因此我们需要覆盖上述两种场景,对客户端模式和CRI模式分别进行测试对比。客户端模式由于CRI-O不具备客户端功能,所以我们选择的测试对象是:DockerPodmaniSulaCRI模式CRI接口,需要通过cri-tools工具进行测试。为了对比的观赏性,我们在CRI模式下也选择三个测试对象:DockerCRI-OiSula环境准备机器环境X86配置项配置信息OSFedora32 X86_64内核linux 5.7.10-201.fc32.x86_64CPU48核,Intel Xeon CPU E5-2695 v2 @ 2.4GHZ内存132 GBARM配置项配置信息OSEuleros内核linux 4.19.90CPU64核内存196 GB安装iSulad参考官方文档安装即可。$ isula version Client: Version: 2.0.3 Git commit: 3bb24761f07cc0ac399e1cb783053db8b33b263d Built: 2020-08-01T09:40:06.568848951+08:00 Server: Version: 2.0.3 Git commit: 3bb24761f07cc0ac399e1cb783053db8b33b263d Built: 2020-08-01T09:40:06.568848951+08:00 OCI config: Version: 1.0.1 Default file: /etc/default/isulad/config.json安装cri-toolsCRI测试,使用统一的客户端工具进行测试,选择K8S对应的V1.15.0版本即可。$ git clone https://github.com/kubernetes-sigs/cri-tools $ cd cri-tools $ git checkout v1.15.0 $ make$ export PATH=$PATH:$GOPATH/bin安装docker根据官方文档安装即可。$ docker version Client: Version: 19.03.11 API version: 1.40 Go version: go1.14.3 Git commit: 42e35e6 Built: Sun Jun 7 21:16:58 2020 OS/Arch: linux/amd64 Experimental: falseServer: Docker Engine - Community Engine: Version: 19.03.11 API version: 1.40 (minimum version 1.12) Go version: go1.14.3 Git commit: 42e35e6 Built: Sun Jun 7 00:00:00 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.3.3 GitCommit: runc: Version: 1.0.0-rc10+dev GitCommit: fbdbaf85ecbc0e077f336c03062710435607dbf1 docker-init: Version: 0.18.0 GitCommit:安装kubelet我们选择V1.15.0版本作为测试版本,下载源码https://github.com/kubernetes/kubernetes.git。准备源码如果下载失败或者太慢,可以配置代理:# 设置国内代理go env -w GOPROXY=https://goproxy.cn,direct# 设置私有仓库地址go env -w GOPRIVATE=.gitlab.com,.gitee.com# 设置sum验证服务地址go env -w GOSUMDB="sum.golang.google.cn"开始下载源码:$ cd $GOPATH/src/k8s.io $ git clone https://github.com/kubernetes/kubernetes.git $ cd kubernetes $ git checkout v1.15.0 $ go mod tidy编译$ make all WHAT=cmd/kubelet注意:K8S的版本对go的版本有要求,例如V1.15.0需要go 1.12版本可以使用go mod tidy,测试依赖代码下载,如果存在鉴权失败的仓库,可以使用go get -v -insecure下载安装$ cp _output/bin/kubelet /usr/local/bin/kubelet $ kubelet --version Kubernetes v1.15.0启动kubelet$ kubelet --network-plugin=cni --runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice --cgroup-driver="systemd" --fail-swap-on=false -v 5 --enable-controller-attach-detach=false --experimental-dockershim注:cgroup由systemd管理安装CRI-O由于直接通过dnf安装CRI-O的v1.15.4版本有问题,所以需要源码编译安装。$ dnf install glib-2.0 glibc-devel glibc-static container-common $ git clone https://github.com/cri-o/cri-o.git $ cd crio $ make$ make install$ mkdir -p /etc/crio && cp crio.conf /etc/crio/安装podman直接使用dnf的源安装即可:$ dnf install -y podman $ podman --version podman version 2.0.3测试方案本文档主要关注容器引擎的容器生命周期的性能,所以测试方案如下:单容器的create、start、stop、rm和run等操作的性能;100个容器并发create、start、stop、rm和run等操作的性能;单pod的runp、stopp和rmp等操作的性能;单pod包含单容器的run、stop和rm等操作的性能;100个pod并发runp、stopp和rmp等操作的性能;100个包含单容器的pod并发run、stop和rm等操作的性能;注:pod的配置,必须指定linux,不然docker会给pod创建一个默认的网卡,导致cni插件执行失败。{ "metadata": { "name": "nginx-sandbox", "namespace": "default", "attempt": 1, "uid": "hdishd83djaidwnduwk28bcsb" }, // linux字段必须存在 "linux": { }}方案详细设计单次测试和并发测试虽然是两种测试场景,但是单次可以看成并发的特例。因此,设计测试用例的时候,通过控制并发数量来实现两种场景的区分。具体设计如下图:graph TD classDef notestyle fill:#98A092,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5, 5; classDef parallelstyle fill:#C969A3,stroke:#666,stroke-width:1px,color:#ffa,stroke-dasharray: 5, 5; subgraph pretest; A[download images] --> B[do clean] end subgraph dotest C[foreach 1->10] D{{runtest}} E(remove max and min cases) X(calculate avg of residual case) C --> D D --> E E --> X end B --> C subgraph runtest R(begin test) F>t1: get begin time point] G(parallel run all cases) H[wait all cases finish] I>t2: get end time point] R --> F F --> G F --> H H -. wait .-> G H --> I end R -. implements .-> D subgraph posttest Z[do clean] end X --> Z class R notestyle; class G parallelstyle;客户端模式X86环境测试结果单容器操作性能对比操作耗时 (ms)Docker (avg)Podman (avg)iSula (avg)VS DockerVS Podmancreate287180131-54.36%-27.22%start675916315-53.33%-65.61%stop349513274-21.49%-46.59%rm7218760-16.67%-67.91%run866454359-58.55%-20.93%100容器并发操作性能对比操作耗时 (ms)Docker (avg)Podman (avg)iSula (avg)VS DockerVS Podman100 * create499539931911-61.74%-52.14%100 * start1012655373861-61.87%-30.27%100 * stop8066111004268-47.09%-61.55%100 * rm322043191967-38.91%-54.46%100 * run982259794392-55.28%-26.54%ARM环境测试结果单容器操作性能对比操作耗时 (ms)Docker (avg)Podman (avg)iSula (avg)VS DockerVS Podmancreate401361177-55.86%-50.97%start11601143523-54.91%-54.24%stop634576395-37.70%-31.42%rm10539889-15.24%-77.64%run12611071634-49.72%-40.80%100容器并发操作性能对比操作耗时 (ms)Docker (avg)Podman (avg)iSula (avg)VS DockerVS Podman100 * create14563120814172-71.35%-65.47%100 * start23420153705294-77.40%-65.56%100 * stop22234169738619-61.24%-49.22%100 * rm93710943926-1.17%-92.33%100 * run28091162809015-67.91%-44.63%CRI模式X86环境测试结果单pod操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIOrunp681321239-64.90%-25.55%stopp400356272-32.00%-23.60%单pod单容器操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIOrun1249525382-69.42%-27.24%stop554759564+1.81%-25.69%100并发pod操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIO100 * runp1399849463887-72.23%-21.41%100 * stopp840248344631-44.88%-4.20%100 * rmp207613881073-48.31%-22.69%100并发pod容器操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIO100 * run2815890775630-80.01%-37.98%100 * stop939584438196-12.76%-2.93%100 * rm441537391524-65.48%-59.24%ARM环境测试结果单pod操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIOrunp13392366536-59.97%-77.35%stopp443419255-42.44%-39.14%单pod单容器操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIOrun20693039338-83.66%-88.88%stop684688214-68.71%-68.90%100并发pod操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIO100 * runp27802291979827-64.65%-66.34%100 * stopp14429111736394-55.69%-42.77%100 * rmp77190071790+132.17%-80.13%100并发pod容器操作操作耗时 (ms)Docker (avg)CRIO (avg)iSula (avg)VS DockerVS CRIO100 * run54087435215284-90.23%-87.86%100 * stop18317191082641-85.58%-86.18%100 * rm1592183902162+35.80%-88.24%总结分析从测试数据来看,在容器的生命周期的操作和并发操作上面,我们iSulad都是优于其他容器引擎的。尤其是在ARM上的表现尤为出色,并发性能已经接近于X86的性能了;而其他容器引擎在ARM上面的表现不尽如人意,甚至出现性能下降1倍以上。那么,我们iSulad为什么有这么大的优势呢?我觉得,主要是从下面几个方面来看。首先,iSulad是用C/C++语言写的,而Docker/Podman/CRI-O都是用golang写的;C/C++在速度方面本身就有优势;架构设计上面,相对于Docker,iSulad架构更加简单,调用链更短;而Podman是serverless模式,并发更加不具备优势;在容器创建流程中,减小锁粒度、消减容器的依赖(例如镜像管理模块),从而提高了并发的性能;架构对比iSulad架构设计如下:Docker官网给的架构图如下:但是,docker daemon里面还涉及到containerd和runc的流程没有描述,大体结构如下:graph LR A(docker daemon) B(containerd) C(runc) A -. grpc .-> B B -. fork/exec .-> C从架构来看,docker的容器生命周期流程涉及:客户端到docker daemon的restful通信;daemon到containerd的GRPC通信;然后fork执行runc。而iSulad的流程:客户端到服务端的GRPC通信,然后fork执行lxc-start。参考文档https://stackoverflow.com/questions/46726216/kubelet-fails-to-get-cgroup-stats-for-docker-and-kubelet-serviceshttps://developer.aliyun.com/article/630682https://blog.csdn.net/bingshiwuyu/article/details/107333259https://github.com/cri-o/cri-ohttps://gitee.com/openeuler/iSulad/blob/master/docs/build_guide.md
-
排序算法是一种能将一系列数据按照特定顺序进行排列的算法,比如说一个学校的考试分数从高到低排名、一个公司的数据报表从大到小排列,都需要用到排序算法。常见的排序算法有冒泡排序、快速排序、字典排序、归并排序、堆排序等等,而归并排序是其中的一种较为稳定、高效的排序算法,时间复杂度N*log2N。 本文通过Go语言开源社区的归并排序算法优化案例为例,讲解通用的算法分析、优化方法。1. Go语言的归并排序算法Go语言的sort包对插入排序、归并排序、快速排序、堆排序做了支持,归并排序是sort包实现的稳定排序算法。 Go语言基于递归实现了归并排序算法,代码如下:// 优化前的归并排序代码,使用递归实现两个有序子序列data[a:m]和data [m:b]的合并func symMerge(data Interface, a, m, b int) { // 初始化mid,start,r的值,mid表示[a:b]的中位数,start表示[a:m]区间进行数据交换的开始下标,r表示[a:m]区间进行数据交换的最右下标 mid := int(uint(a+b) >> 1) n := mid + m var start, r int if m > mid { start = n - b r = mid } else { start = a r = m } p := n - 1 // 折半查找对称比较数据块[a:m]和数据块[m:b],找出数据块[a:m]开始大于数据[m:b]的下标位置start for start < r { c := int(uint(start+r) >> 1) if !data.Less(p-c, c) { start = c + 1 } else { r = c } } // 翻转数据块[start:m] 和 [m:end], 使得数据块[start:end]有序 end := n - start if start < m && m < end { rotate(data, start, m, end) } // 调用递归函数,排序两组子数据块[a:start]和[start:mid],[mid:end]和[end:b] if a < start && start < mid { symMerge(data, a, start, mid) } if mid < end && end < b { symMerge(data, mid, end, b) }}2. 场景及问题分析归并排序算法的应用场景主要是数据块有序归并,比如说有序切片data[0:20]和data[20:40]的合并有序场景,主要处理过程如下:1. 调用递归函数symMerge,初始化切片参数。2. 经过折半查找、对称比较、翻转等方法使得切片data[0:20]整体小于切片data[20:40]3. 再次调用递归函数symMerge归并排序子切片data[0:start]和data[start:20],回到步骤14. 再次调用递归函数symMerge归并排序子切片data[20:end]和data[end:40],回到步骤15. 直到排序完所有的子切片,使得整个切片data[0:40]有序。从这个常见的应用场景的处理过程中发现,归并排序需要不断调用递归函数处理子序列,而这也是归并排序算法的性能损耗的主要原因。在切片的归并排序场景中,如果能避免或减少调用递归处理子切片,算法的运行性能就可以得到提升。比如说在长度为1的子切片data[0]和长度为9的子切片data[1:10]进行归并排序的场景下,使用插入排序来避免调用递归,可以减少算法的运行耗时,优化算法的性能。3. 优化方案及实现通过上述对Go语言归并排序算法的代码和场景分析,找到了一种优化方法,即在归并排序中,针对长度为1的数据块,利用二分插入排序算法处理数据块排序,可以减少函数递归的调用,提高算法的性能。 Go语言开源社区也应用了基于二分插入排序的优化方法,提升了归并排序算法的性能,优化前后的代码对比如下: 优化代码如下:// 优化代码增加了对切片长度的判断,且当切片长度为1时,使用二分插入排序直接排序切片返回。func symMerge(data Interface, a, m, b int) { // data[a:m]只有一个元素时,使用二分插入排序找到有序的插入点,插入data[a]到data[m:b] // 避免调用递归,提高算法性能 if m-a == 1 { i := m j := b // 二分查找,找到合适的有序插入点 for i < j { h := int(uint(i+j) >> 1) if data.Less(h, a) { i = h + 1 } else { j = h } } // 插入数据 for k := a; k < i-1; k++ { data.Swap(k, k+1) } return } // data[m:b]只有一个元素时,使用二分插入排序找到合适的有序插入点,插入data[m]到data[a:m] // 避免调用递归,提高算法性能 if b-m == 1 { i := a j := m // 二分查找,找到合适的有序插入点 for i < j { h := int(uint(i+j) >> 1) if !data.Less(m, h) { i = h + 1 } else { j = h } } // 插入数据 for k := m; k > i; k-- { data.Swap(k, k-1) } return } // 归并排序的递归实现 ......}4. 优化结果使用Go benchmark测试优化前后的算法性能,再用Go benchstat对比优化前后的性能测试结果,并统计了优化前后递归函数的调用次数,整理到如下表格:测试项测试用例优化前每操作耗时 time/op优化后每操作耗时 time/op耗时对比优化前递归总次数优化后递归总次数递归总次数对比BenchmarkStableString1K-8长度1K的字符串切片302278 ns/op288879 ns/op-2.71%1110790-28.8%BenchmarkStableInt1K-8长度1K的整型切片144207 ns/op139911 ns/op-0.96%689586-14.9%BenchmarkStableInt64K-8长度64K的整型切片12291195 ns/op12119536 ns/op-0.75%4846541280-14.8%BenchmarkStable1e2-8长度1e2(100)的结构体切片135357 ns/op124875 ns/op-7.17%1079807-25.2%BenchmarkStable1e4-8长度1e4(10000)的结构体切片43507732 ns/op40183173 ns/op-7.64%449735350205-22.1%BenchmarkStable1e6-8长度1e6(1000000)的结构体切片9005038733 ns/op8440007994 ns/op-7.69%7934784361483110-22.5%[注] -8表示函数运行时的GOMAXPROCS值,ns/op表示函数每次执行的平均纳秒耗时。上述表格显示了在字符串切片、整型切片、结构体切片等不同数据类型的场景下的性能测试结果,对比分析如下:• 对比长度为1K的字符串和整型切片数据,优化后字符串切片的递归次数减少了28.8%,而整型切片的递归次数只减少了14.9%,说明优化技术在字符串切片数据集上发挥了更大的作用,性能提升更大;• 对比长度为64K和1K的整型切片数据,优化后二者的递归总次数减少的比例都在14.8%左右,性能提升相近在0.5%-1%之间;• 对比长度为1e2e4e6的结构体切片数据,优化后三者的递归总次数都减少在22%左右,性能提升基本一样在7%左右。通过性能测试结果的对比分析,发现优化后的性能提升大小跟测试数据集的关联性大,算法的递归嵌套中出现数据切片长度为1的情况越多,优化方法发挥的作用就越大,递归次数减少的更多,性能提升也会更大。5. 总结Go语言的归并排序算法优化案例,从一个具体的场景出发分析归并排序算法存在的性能问题,给出了基于二分插入排序的优化方案,并最终验证了优化结果,是一个值得学习借鉴的算法优化实践。
-
探索云性能测试服务如何和助力11·11购物狂欢节 刚刚结束的双11全球狂欢季,当日总成交额达到了4982亿人民币,实时物流订单量破22.5亿单!大家有没有加入“剁手”大军,感受这场购物狂欢呢?活动期间,多个购物平台都热闹非凡,随着科技的发展,我们的消费体验一年比一年丝滑,有没有经历过好不容易抢到秒杀却无法刷出支付页面的焦灼?有没有为了抢购首发新品一直刷新页面的经历?为何今年体验如此丝滑呢?原因是得益于云计算的发展,各电商平台对自己的负载能力提前进行了测试和分析,于是越来越了解平台性能,在活动前就已经做好了升级准备,那究竟是通过什么神器帮助企业了解到这些信息的呢?今天我们就来探个究竟。 以前,对于平台的负载能力的测试和判断,无论测试工具搭建的时间成本,还是采购成本都比较高的,而且只能对单个或少数软件进行测试,所购买的测试设备无法随着平台业务发展的需要而提升测试能力,由此一来,都很难精准地掌握其负载能力,监控性能问题,直接影响到了我们是否能够丝滑完成付款,抢购到种草已久的东西,导致用户的流失。 随着云计算技术的飞速发展,就出现了云性能测试服务,相较于传统的性能测试工具,云性能测试服务独有的特点之一就是如云般轻量化,即开即用,无需体验预留或采购资源,使得测试工作变得极为方便。云性能测试服务的测试能力更可以根据业务测试需要随时扩展,比传统软件更灵活地支持更高并发的模拟测试。这正是云性能测试服务成为当今性能测试界“网红”的原因。 2017年12月15日,秉持着高性能、低成本、可扩展和支持复杂场景等理念,“网红”华为云云性能测试服务(CPTS)C位出道,为云性能测试服务带来更多精彩体验。云性能测试服务(Cloud Performance Test Service,简称CPTS)是一项为基于HTTP/HTTPS/TCP/UDP/WEBSOCKET等协议构建的云应用提供性能测试的服务,具备强大的分布式压测能力。CPTS支持快速模拟大规模并发用户的真实业务高峰场景,可以很好的支持报文内容和时序自定义、多事务组合的复杂场景测试。接下来,我们对其特点一一进行了解。 灵活自定义,HTTP/HTTPS协议测试场景支持 通过支持标准、开放的HTTP/HTTPS报文可根据自身需要进行快捷的自定义,简单调整即可给不同测试应用发送压力测试流量。也可以根据测试对象的实际需求,对HTTP/HTTPS协议报文的任何字段内容进行自定义,包括HTTP方法、URL、Header和Body等字段的设置和编辑内容。对于检测结果,可以进行自定义响应结果校验,针对不同的请求,可支持用户配置检查点,在获取到响应报文后针对响应码及头域内容做结果检验,只有条件匹配后才可认定是正常响应。测试任务模型自定义,支持复杂场景测试 通过多种事务元素与测试任务阶段的灵活组合,可以帮助用户测试多操作的并发场景下的应用性能表现。而所创建的事务可以被多个测试任务复用,针对每个事务可以定义多个测试阶段,并对每个阶段分别定义持续时间和并发用户数,模拟流量起伏的复杂场景。专业性能测试报告,应用性能表现一目了然 可提供事务TPS、并发用户、响应时延、事务累计、结果校验失败、响应超时等多种细分维度统计能力。还提供了实时和离线两种类型的测试报告,我们可以随时查看和分析测试数据。按需使用测试集群,私有压测集群管理 不同于传统测试工具,华为云云性能测试服务可以按需创建测试集群,并实现租户间流量隔离,测试期间更可以实施扩容、缩容测试集群,升级测试能力。完成测试后可随时删除集群。云计算日益发展的今天,平台、应用是否能及时优化性能,适应自身发展尤为重要,看完本文介绍,是否想亲自体验CPTS服务,探索更多功能呢?欢迎体验沙箱实验《基于CloudTest对云端应用进行性能测试》,实验中可一键预置好弹性云服务器ECS和虚拟私有云VPC等所需服务,让我们更专注于云性能测试服务的体验。更提供了详细的实验手册,每一步操作都有详细指导,有的放矢,轻松体验如何创建测试工程、添加测试任务并执行压测任务。图表化压测报告直观了解压测结果。更多精彩内容,尽在华为云学院,上云体验吧!
-
实验室最新活动要求的五个实验之一:基于CloudTest对云端应用进行性能测试以前做过,轻车熟路。这里有个小窍门,左边实验手册上的找各种资源的时候,如果有英文简写(一般都有的,如ECS,CCE,CPT等),可以直接在任务列表后面的搜索框直接敲,快一点。这里是使用云性能测试服务之前需要进行的授权,这里就好玩了!看到那个红色的“同意授权”按钮了么?要想让它呈现出来,总共需要三步:1,把手册关上2,右上角实验桌面全屏3,firefox最下面的提示条叉掉哈哈哈,无用的知识又增加了。启动测试任务需要购买CCE服务,买它,9块钱。买好后回到执行页面,因为CCE拉起需要时间,这里要等大概1分钟左右,再执行。总共也没用30分钟,很顺利。
-
【重要公告】《开发者最佳实践挑战营》第八期活动已结束打卡名单及邀请名单已公示见:FAQ帖>>>注:统计截止2020年12月31日24:00前打卡数据为保证您顺利领取活动奖品,请全通关和获得邀请TOP奖的伙伴提前填写下方奖品收货信息链接。填写截止时间为1月8日,如您没有填写,视为放弃奖励填写地址请戳我>>欢迎参加华为云“开发者最佳实践挑战营”第八期这是本次挑战营的第5关,坚持闯关成功有机会获12900码豆/机械键盘/背包等精美好礼!本期活动截止12月31日。注意:参与闯关前,请确保已报名加入活动群并领取实践资源,如未入群请添加小助手微信(hwpaas01),回复“最佳实践”进入学习交流群!点击这里了解活动详情>> | 点击这里查看活动FAQ>>为避免无法发放码豆,请从未登录过会员中心的用户需提前登陆下DevCloud会员中心电商抢购已成为当前互联网应用的普遍需求,有并发用户高、突发请求大、失败用户反复重试等特征,如何保证在高负载运行情况下网站的可用性已经成为运维保障的重点。优势· 真实场景模拟:秒级百万并发能力,瞬间发起大量并发压力,可在一个测试模型里面模拟全网站高负载。· 专业测试报告:提供按时延响应区间的统计,客观反映用户体验。· 失败用户重试:多种表达式的自定义结果比对,未正常进入网站的可以重试。图1 电商抢购测试 (1)实践资源说明:CPTS云性能测试服务,提供1万VUM免费测试额度和共享资源组,100以下并发长期免费使用,可点击这里进入CPTS控制台,点击“免费领取套餐包”领取1万VUM免费测试额度。(2)最佳实践指南: 点击查看实践指南>>(3)视频演示:点击查看实践视频演示>>任务一:领取免费套餐包,并将CPTS控制台-总览-我的资源-已购套餐包VUM剩余额度进行截图,截图需包含右上角华为云账号名,并按回帖格式要求在本帖中回帖;任务二:根据实践指南完成实践操作(可查看实践视频演示),将测试报告截图,并按回帖格式要求在本帖中回帖;注:已参加过上一期在本帖已闯关完成打卡的用户参与第八期通本关将不在发放通关奖励1.【通关、参与奖励&规则】点击这里填写报名登记表,完成提交可获100码豆(已提交的可忽略)① 参与奖励:每关完成创建实例可获100码豆,共8关最高可获得800码豆;② 通关奖励:通过2关赠送:2000码豆(可选关)通过4关赠送:4000码豆(可选关)通过6关赠送:6000码豆(可选关)通过8关赠送:8000码豆(全通关)取通关最高数发放码豆,全通关可额外获得旅行本(套装)1本(限量100本取最先全通关者发放)和“开发者最佳实践挑战达人”荣誉证书;全通关用户点击填写问卷,以便证书发放;2.【邀请奖励】:每邀请1位好友并成功完成1关或多关实践并打卡,可额外获得1000码豆(最高可获得3000码豆);3.【邀请TOP榜奖励】:邀请好友并完成1关或多关实践并打卡,邀请榜前3可获得机械键盘(雷柏)1个,邀请榜4-10名可获得华为云定制背包1个(如有并列取最先邀请完成打卡者)4.【分享奖励】:点击这里进入分享活动(最高可获1000码豆)>>>5.【邀请有礼】:点击这里进入邀请好友报名活动瓜分30万码豆,(最高可获得66666码豆)>>>活动结束后5个工作日内公示通关名单,15个工作日内发放码豆奖励; 码豆有什么用?码豆为虚拟货币可用于在华为云码豆会员中心-兑换商城中进行实物/虚拟礼品的兑换(礼品会不定期更换)兑换礼品点击查看:华为云专属码豆商城>>>请务必按照以下格式要求进行回帖,否则无法计算奖励:1、华为云账号:xxx(即右上角的字母数字组合ID)2、邀请人华为云账号:xxx(即右上角的字母数字组合ID,如无就不填)3、实践感想:(如对课程内容、产品体验的建议或感想等)4、体验任务截图:(打卡样例图)注:华为云账号请勿填错,如填错码豆无法发放到账。实践截图:需包含(a)CPTS控制台总览页VUM剩余额度截图;(b)完整测试报告截图,可分多张截图;(c)下载离线报告,并在回帖时将报告上传附件。 【快速传送门】第1关任务:基于API网关的电话号码归属地查询第2关任务:使用函数工作流服务为图片打水印第3关任务:使用Redis实现排行榜功能第4关任务:使用DMS Kafka优化消费者poll第5关任务:使用CPTS进行电商网站性能测试第6关任务:基于ServiceStage的天气预报应用部署第7关任务:使用CloudIDE在云端环境开发AI交付实操第8关任务:使用ModelArts实现零代码美食分类模型开发>>点击进入:开发者最佳实践挑战营第八期活动页>>点击进入:活动FAQ帖>>点击进入:邀请有礼,瓜分30万码豆,最高可获66666码豆!>>点击进入:分享任务,获码豆换好礼!
-
【华为云开发者最佳实践挑战营】第八期打卡名单已公示见附件:《最佳实践挑战营(第八期)通关名单公示》注:为保证您顺利领取活动奖品,请全通关及获得邀请TOP奖的伙伴提前填写下方奖品收货信息链接。填写截止时间为1月8日,如您没有填写,视为放弃奖励填写地址请戳我>>注:全通关用户请点击填写问卷,以便证书发放;【邀请奖励】和【邀请TOP榜】名单公示邀请榜前3可获得机械键盘(雷柏)1个邀请榜4-10名可获得华为云定制背包1个(如有并列取最先邀请完成打卡者)【邀请有礼】邀请好友报名活动瓜分30万码豆,(最高可获得66666码豆)获奖名单已公示,点击查看名单>>注:活动结束后15个工作日内统一发放码豆奖励&实物奖励;Hello!欢迎参加开发者最佳实践挑战营第八期!这是一篇帮助帖,我们会将常见问题和难点疑点记录在帖子中。为减少群内打扰,节省大家的时间,请遇到问题后先查阅本帖内容,如没有对应解答,再在用户群中提问哦! 常用链接1、实践前资源准备第1关、第2关资源:APIG、FunctionGraph服务资源为按用量计费,预计消耗金额:0元≤实际费用<1元,详见任务帖。 第3关资源:1元ECS+Redis资源。点击这里领取资源或复制打开链接购买:http://suo.im/5FyHMG (华南广州) 第4关资源:免费Kafka实例资源:点击这里领取资源或复制打开链接领取→ http://suo.im/6wgWsU (华南广州)注意:可用区3/5 已售罄,请选择可用区2;需和ECS在同一VPC,以实现内网访问。 第5关资源:CPTS免费套餐包:点击进入CPTS控制台,点击“免费领取套餐包”即可领取1万VUM测试额度。 第6关资源:注:702.8元代金券已被领完1元CCE集群资源,请填写报名问卷→https://devcloud.huaweicloud.com/expert/open-assessment/qtn?id=fc825904636f43eda3c7f6030ec5d23e填写完后稍后再复制链接领取702.8元代金劵http://6tt.co/tyAR ,领取成功即可根据第六关资源创建指南进行创建,如出现提示:“抱歉,您不符合本次活动参与条件”可稍等段时间在领取,最高延迟1个工作日,或添加小助手微信(hwpaas01)咨询领取问题; 第7关资源:CPU架构选鲲鹏计算资源限时免费,复制链接创建http://6tt.co/tQSf第8关资源:点击进入AI开发平台控制台领取新人福利100元券,参与实践时计算规格选:自动学习免费规格(GPU) 2、快速传送门第1关任务:基于API网关的电话号码归属地查询第2关任务:使用函数工作流服务为图片打水印第3关任务:使用Redis实现排行榜功能第4关任务:使用DMS Kafka优化消费者poll第5关任务:使用CPTS进行电商网站性能测试第6关任务:基于ServiceStage的天气预报应用部署第7关任务:使用CloudIDE在云端环境开发AI交付实操第8关任务:使用ModelArts实现零代码美食分类模型开发>>点击进入:邀请有礼,瓜分30万码豆,最高可获66666码豆!>>点击进入:分享任务,获码豆换好礼!【打卡闯关榜单公示】
-
感谢参与本期活动!本期《开发者最佳实践挑战营》活动已于7月8日24:00结束,可添加小助手微信等待下期开启添加小助手微信:zhongjianjianxiaoge欢迎参加华为云“开发者最佳实践挑战营”!这是本次挑战营的第5关,坚持闯关成功有机会获7000+码豆/体脂秤/手环/摄像机等精美好礼!本期活动截止7月8日。注意:参与闯关前,请确保已报名加入活动群并领取实践资源,如未入群请添加小助手微信(zhongjianjianxiaoge),回复“最佳实践”报名入群!点击这里了解活动详情>> | 点击这里查看活动FAQ>> 电商抢购已成为当前互联网应用的普遍需求,有并发用户高、突发请求大、失败用户反复重试等特征,如何保证在高负载运行情况下网站的可用性已经成为运维保障的重点。优势· 真实场景模拟:秒级百万并发能力,瞬间发起大量并发压力,可在一个测试模型里面模拟全网站高负载。· 专业测试报告:提供按时延响应区间的统计,客观反映用户体验。· 失败用户重试:多种表达式的自定义结果比对,未正常进入网站的可以重试。图1 电商抢购测试 (1)实践资源说明:CPTS云性能测试服务,提供1万VUM免费测试额度和共享资源组,100以下并发长期免费使用,可点击这里进入CPTS控制台,点击“免费领取套餐包”领取1万VUM免费测试额度。(2)最佳实践指南: 点击查看实践指南>>(3)视频演示:点击查看视频演示>> 任务一:领取免费套餐包,并将CPTS控制台-总览-我的资源-已购套餐包VUM剩余额度进行截图,截图需包含右上角华为云账号名,并按回帖格式要求在本帖中回帖;任务二:根据实践指南完成实践操作,将测试报告截图,并按回帖格式要求在本帖中回帖;1)通关、参与奖励&规则参与奖励、通关奖励限前150名完成的开发者(码豆奖励有限先到先得)① 参与奖励:每关完成创建实例可获100码豆,共6关最高可获得600码豆② 通关奖励:通过2关赠送:1000码豆通过4关赠送:2000码豆通过6关赠送:4000码豆活动结束后5个工作日内公示通关名单,15个工作日内发放码豆奖励。注:取通关最高值发放码豆奖励 2)分享任务规则&奖励:分享海报,每次分享可获得500码豆,最多可分享5次,可获2500码豆激励第一步: 分享以下文案+海报至朋友圈或100人以上技术群(微信、QQ、钉钉不限)。每次分享可获得500码豆,最高2500码豆!码豆可用于兑换DevCloud会员中心精美实物礼品。(1)文案:我正在参与华为云开发者最佳实践挑战营,场景化实战get云上开发技能,闯关还能赢好礼!(2)海报:添加小助手微信(zhongjianjianxiaoge),回复“分享海报”获取海报和文案。第二步: 分享完成后,截图点击链接https://www.wjx.top/jq/79372993.aspx 上传分享截图;符合要求的截图即可算作分享成功1次,获得500码豆,最高可获2500码豆!码豆奖励会在活动结束后15个工作日内发放3)幸运奖抽奖规则&奖励:(1)全通关可参与抽取:荣耀小哨兵智能摄像机 广角版、华为手环跑步精灵3e手环、荣耀智能体脂秤2;(2)活动结束后5个工作日内公示通关名单,并在微信群中统一抽奖。中奖名单公布后,用户需单独提供收件信息,奖品将于15个工作日内发放。为避免无法发放码豆,从未登录过会员中心的用户需提前登陆下DevCloud会员中心本次活动发放的码豆有效期至2020年9月1日 请务必按照以下格式要求进行回帖,否则无法计算奖励:华为云账号名:XXX(即右上角的字母数字组合ID)微信昵称:XXX实践感想:XXX实践截图:需包含(a)CPTS控制台总览页VUM剩余额度截图;(b)完整测试报告截图,可分多张截图;(c)下载离线报告,并在回帖时将报告上传附件。附各关卡快速入口:第1关任务:基于API网关的电话号码归属地查询第2关任务:使用函数工作流服务为图片打水印第3关任务:使用Redis实现排行榜功能第4关任务:使用DMS Kafka优化消费者poll第5关任务:使用CPTS进行电商网站性能测试第6关任务:基于ServiceStage的天气预报应用部署
-
企业业务上云,面对难题如何一站解决?应用面临高并发读写压力,缓存扩容难、监控不便?业务流程之间强耦合性,消息队列性能弱,业务处理缓慢?业务上线前,如何快速识别复杂场景下的性能问题?新业务如何一站云端开发、部署……何以解忧?华为云精选云服务帮你一站解决难题!低成本、高性能、高可靠,让云上开发事半功倍!▸分布式缓存服务 Redis:解决高并发、大数据场景下,热点数据访问的性能问题▸软件开发平台 DevCloud:一站式云端DevOps平台▸云性能测试服务 CPTS:为应用的接口和全链路提供性能测试服务▸微服务引擎 CSE:提供高性能微服务框架和服务注册、服务治理、配置管理等全场景能力▸分布式消息队列 Kafka:高吞吐、高可用消息中间件服务精选服务+专享优惠才是绝配!云上开发精选优惠来袭,全场低至1元云服务器、Redis、DevCloud等服务4折起消费满额赠豪礼,新用户首购送码豆,千元好礼等你拿!活动时间:即日起至6月15日扫描下图二维码进入活动了解详情
-
Store size-3.124213032GBTranslog size-2.790678718GBHeap used for segments-15.03110981MBHeap used for doc values-0.043689728MBHeap used for terms-13.85075188MBHeap used for norms-0.077697754MBHeap used for points-0.266856194MBHeap used for stored fields-0.792114258MBSegment count-99-Min Throughputindex-append92446.94docs/sMedian Throughputindex-append92935.55docs/sMax Throughputindex-append93217.68docs/s50th percentile latencyindex-append176.7329985ms90th percentile latencyindex-append285.5450693ms100th percentile latencyindex-append333.228537ms50th percentile service timeindex-append176.7329985ms90th percentile service timeindex-append285.5450693ms100th percentile service timeindex-append333.228537mserror rateindex-append0%Min Throughputindex-stats90.04ops/sMedian Throughputindex-stats90.06ops/sMax Throughputindex-stats90.11ops/s50th percentile latencyindex-stats3.6713165ms90th percentile latencyindex-stats3.919960223ms99th percentile latencyindex-stats4.500246093ms99.9th percentile latencyindex-stats20.14171663ms100th percentile latencyindex-stats21.36778278ms50th percentile service timeindex-stats3.604376499ms90th percentile service timeindex-stats3.8517339ms99th percentile service timeindex-stats4.36148177ms99.9th percentile service timeindex-stats20.0748024ms100th percentile service timeindex-stats21.300971mserror rateindex-stats0%Min Throughputnode-stats90.05ops/sMedian Throughputnode-stats90.09ops/sMax Throughputnode-stats90.32ops/s50th percentile latencynode-stats4.056046ms90th percentile latencynode-stats4.256959922ms99th percentile latencynode-stats7.993649534ms99.9th percentile latencynode-stats15.0162469ms100th percentile latencynode-stats18.79192022ms50th percentile service timenode-stats3.989104ms90th percentile service timenode-stats4.1902188ms99th percentile service timenode-stats7.39785926ms99.9th percentile service timenode-stats14.95028028ms100th percentile service timenode-stats15.226284mserror ratenode-stats0%Min Throughputdefault50.03ops/sMedian Throughputdefault50.04ops/sMax Throughputdefault50.09ops/s50th percentile latencydefault2.890284501ms90th percentile latencydefault3.054330301ms99th percentile latencydefault3.41013575ms99.9th percentile latencydefault4.536945459ms100th percentile latencydefault5.063877001ms50th percentile service timedefault2.82345ms90th percentile service timedefault2.987489999ms99th percentile service timedefault3.34539951ms99.9th percentile service timedefault4.466092296ms100th percentile service timedefault4.996857mserror ratedefault0%Min Throughputterm150.06ops/sMedian Throughputterm150.09ops/sMax Throughputterm150.14ops/s50th percentile latencyterm2.822069666ms90th percentile latencyterm2.927460233ms99th percentile latencyterm3.585279107ms99.9th percentile latencyterm9.586351776ms100th percentile latencyterm13.36534567ms50th percentile service timeterm2.755832ms90th percentile service timeterm2.8613018ms99th percentile service timeterm3.4037467ms99.9th percentile service timeterm4.571924473ms100th percentile service timeterm13.301659mserror rateterm0%Min Throughputphrase149.99ops/sMedian Throughputphrase150.07ops/sMax Throughputphrase150.13ops/s50th percentile latencyphrase3.207932333ms90th percentile latencyphrase3.514073ms99th percentile latencyphrase26.65015757ms99.9th percentile latencyphrase38.92041855ms100th percentile latencyphrase40.044182ms50th percentile service timephrase3.1409695ms90th percentile service timephrase3.3666699ms99th percentile service timephrase9.39342965ms99.9th percentile service timephrase18.80974216ms100th percentile service timephrase21.417291mserror ratephrase0%Min Throughputcountry_agg_uncached4.01ops/sMedian Throughputcountry_agg_uncached4.01ops/sMax Throughputcountry_agg_uncached4.01ops/s50th percentile latencycountry_agg_uncached153.726532ms90th percentile latencycountry_agg_uncached156.0977097ms99th percentile latencycountry_agg_uncached167.696362ms100th percentile latencycountry_agg_uncached198.43754ms50th percentile service timecountry_agg_uncached153.606521ms90th percentile service timecountry_agg_uncached155.9869715ms99th percentile service timecountry_agg_uncached167.5793267ms100th percentile service timecountry_agg_uncached198.325432mserror ratecountry_agg_uncached0%Min Throughputcountry_agg_cached100.04ops/sMedian Throughputcountry_agg_cached100.05ops/sMax Throughputcountry_agg_cached100.07ops/s50th percentile latencycountry_agg_cached2.7020445ms90th percentile latencycountry_agg_cached2.783604899ms99th percentile latencycountry_agg_cached3.03382523ms99.9th percentile latencycountry_agg_cached3.635769276ms100th percentile latencycountry_agg_cached4.106574ms50th percentile service timecountry_agg_cached2.6356045ms90th percentile service timecountry_agg_cached2.717349899ms99th percentile service timecountry_agg_cached2.93948264ms99.9th percentile service timecountry_agg_cached3.567144201ms100th percentile service timecountry_agg_cached4.039871999mserror ratecountry_agg_cached0%Min Throughputscroll20.04pages/sMedian Throughputscroll20.05pages/sMax Throughputscroll20.07pages/s50th percentile latencyscroll421.9468245ms90th percentile latencyscroll433.3017323ms99th percentile latencyscroll450.0724775ms100th percentile latencyscroll505.502723ms50th percentile service timescroll421.0948965ms90th percentile service timescroll432.4389587ms99th percentile service timescroll449.2045264ms100th percentile service timescroll504.653479mserror ratescroll0%Min Throughputexpression2ops/sMedian Throughputexpression2ops/sMax Throughputexpression2ops/s50th percentile latencyexpression270.920167ms90th percentile latencyexpression277.4334041ms99th percentile latencyexpression286.5631326ms100th percentile latencyexpression293.09254ms50th percentile service timeexpression270.662187ms90th percentile service timeexpression277.1779957ms99th percentile service timeexpression286.3073191ms100th percentile service timeexpression292.826178mserror rateexpression0%Min Throughputpainless_static1.5ops/sMedian Throughputpainless_static1.5ops/sMax Throughputpainless_static1.5ops/s50th percentile latencypainless_static360.9218617ms90th percentile latencypainless_static368.2584616ms99th percentile latencypainless_static382.3877013ms100th percentile latencypainless_static425.989704ms50th percentile service timepainless_static360.5910995ms90th percentile service timepainless_static367.9205895ms99th percentile service timepainless_static382.0613883ms100th percentile service timepainless_static425.659728mserror ratepainless_static0%Min Throughputpainless_dynamic1.5ops/sMedian Throughputpainless_dynamic1.5ops/sMax Throughputpainless_dynamic1.5ops/s50th percentile latencypainless_dynamic354.4270103ms90th percentile latencypainless_dynamic362.9108269ms99th percentile latencypainless_dynamic409.7732626ms100th percentile latencypainless_dynamic410.1049017ms50th percentile service timepainless_dynamic354.0901565ms90th percentile service timepainless_dynamic362.5730453ms99th percentile service timepainless_dynamic409.4442952ms100th percentile service timepainless_dynamic409.777646mserror ratepainless_dynamic0%Min Throughputdecay_geo_gauss_function_score1ops/sMedian Throughputdecay_geo_gauss_function_score1ops/sMax Throughputdecay_geo_gauss_function_score1ops/s50th percentile latencydecay_geo_gauss_function_score354.387216ms90th percentile latencydecay_geo_gauss_function_score358.9124798ms99th percentile latencydecay_geo_gauss_function_score363.9485787ms100th percentile latencydecay_geo_gauss_function_score371.780245ms50th percentile service timedecay_geo_gauss_function_score353.7158425ms90th percentile service timedecay_geo_gauss_function_score358.2845019ms99th percentile service timedecay_geo_gauss_function_score363.275623ms100th percentile service timedecay_geo_gauss_function_score371.114045mserror ratedecay_geo_gauss_function_score0%Min Throughputdecay_geo_gauss_script_score1ops/sMedian Throughputdecay_geo_gauss_script_score1ops/sMax Throughputdecay_geo_gauss_script_score1ops/s50th percentile latencydecay_geo_gauss_script_score379.4620745ms90th percentile latencydecay_geo_gauss_script_score383.2876548ms99th percentile latencydecay_geo_gauss_script_score389.7544834ms100th percentile latencydecay_geo_gauss_script_score395.75293ms50th percentile service timedecay_geo_gauss_script_score378.8137045ms90th percentile service timedecay_geo_gauss_script_score382.6389076ms99th percentile service timedecay_geo_gauss_script_score389.1097136ms100th percentile service timedecay_geo_gauss_script_score395.100654mserror ratedecay_geo_gauss_script_score0%Min Throughputfield_value_function_score1.5ops/sMedian Throughputfield_value_function_score1.5ops/sMax Throughputfield_value_function_score1.51ops/s50th percentile latencyfield_value_function_score142.4418055ms90th percentile latencyfield_value_function_score146.0292471ms99th percentile latencyfield_value_function_score149.4448299ms100th percentile latencyfield_value_function_score154.4188467ms50th percentile service timefield_value_function_score141.8792295ms90th percentile service timefield_value_function_score145.4722711ms99th percentile service timefield_value_function_score148.8731825ms100th percentile service timefield_value_function_score153.87006mserror ratefield_value_function_score0%Min Throughputfield_value_script_score1.5ops/sMedian Throughputfield_value_script_score1.5ops/sMax Throughputfield_value_script_score1.51ops/s50th percentile latencyfield_value_script_score200.310233ms90th percentile latencyfield_value_script_score206.2690364ms99th percentile latencyfield_value_script_score216.7453505ms100th percentile latencyfield_value_script_score252.6694313ms50th percentile service timefield_value_script_score199.886616ms90th percentile service timefield_value_script_score205.7897592ms99th percentile service timefield_value_script_score216.2602712ms100th percentile service timefield_value_script_score252.180659mserror ratefield_value_script_score0%Min Throughputrandom_function_score1.5ops/sMedian Throughputrandom_function_score1.5ops/sMax Throughputrandom_function_score1.5ops/s50th percentile latencyrandom_function_score242.6018717ms90th percentile latencyrandom_function_score251.1366288ms99th percentile latencyrandom_function_score290.9842466ms100th percentile latencyrandom_function_score307.5584597ms50th percentile service timerandom_function_score242.149128ms90th percentile service timerandom_function_score250.6830153ms99th percentile service timerandom_function_score290.5378949ms100th percentile service timerandom_function_score307.111375mserror raterandom_function_score0%Min Throughputrandom_script_score1.5ops/sMedian Throughputrandom_script_score1.5ops/sMax Throughputrandom_script_score1.5ops/s50th percentile latencyrandom_script_score258.3288777ms90th percentile latencyrandom_script_score262.5996219ms99th percentile latencyrandom_script_score276.7350459ms100th percentile latencyrandom_script_score278.8234443ms50th percentile service timerandom_script_score257.8902625ms90th percentile service timerandom_script_score262.1680452ms99th percentile service timerandom_script_score276.3056912ms100th percentile service timerandom_script_score278.384714mserror raterandom_script_score0%Min Throughputlarge_terms1.5ops/sMedian Throughputlarge_terms1.5ops/sMax Throughputlarge_terms1.5ops/s50th percentile latencylarge_terms429.023917ms90th percentile latencylarge_terms438.5573247ms99th percentile latencylarge_terms468.2661402ms100th percentile latencylarge_terms494.4412297ms50th percentile service timelarge_terms428.772941ms90th percentile service timelarge_terms438.29435ms99th percentile service timelarge_terms468.0068679ms100th percentile service timelarge_terms494.168992mserror ratelarge_terms0%Min Throughputlarge_filtered_terms1.5ops/sMedian Throughputlarge_filtered_terms1.5ops/sMax Throughputlarge_filtered_terms1.5ops/s50th percentile latencylarge_filtered_terms433.0397738ms90th percentile latencylarge_filtered_terms443.241508ms99th percentile latencylarge_filtered_terms460.8045067ms100th percentile latencylarge_filtered_terms486.396965ms50th percentile service timelarge_filtered_terms432.7802525ms90th percentile service timelarge_filtered_terms442.9739873ms99th percentile service timelarge_filtered_terms460.7444745ms100th percentile service timelarge_filtered_terms486.145846mserror ratelarge_filtered_terms0%Min Throughputlarge_prohibited_terms1.5ops/sMedian Throughputlarge_prohibited_terms1.5ops/sMax Throughputlarge_prohibited_terms1.5ops/s50th percentile latencylarge_prohibited_terms430.1467708ms90th percentile latencylarge_prohibited_terms436.8730103ms99th percentile latencylarge_prohibited_terms484.5697929ms100th percentile latencylarge_prohibited_terms492.75088ms50th percentile service timelarge_prohibited_terms429.8833325ms90th percentile service timelarge_prohibited_terms436.6196592ms99th percentile service timelarge_prohibited_terms484.3087876ms100th percentile service timelarge_prohibited_terms492.492977mserror ratelarge_prohibited_terms0%Min Throughputdesc_sort_population1.5ops/sMedian Throughputdesc_sort_population1.51ops/sMax Throughputdesc_sort_population1.51ops/s50th percentile latencydesc_sort_population45.9402765ms90th percentile latencydesc_sort_population49.01190953ms99th percentile latencydesc_sort_population58.5120831ms100th percentile latencydesc_sort_population60.027354ms50th percentile service timedesc_sort_population45.2962825ms90th percentile service timedesc_sort_population48.3757462ms99th percentile service timedesc_sort_population57.86711494ms100th percentile service timedesc_sort_population59.377354mserror ratedesc_sort_population0%Min Throughputasc_sort_population1.5ops/sMedian Throughputasc_sort_population1.51ops/sMax Throughputasc_sort_population1.51ops/s50th percentile latencyasc_sort_population46.02105783ms90th percentile latencyasc_sort_population48.79212977ms99th percentile latencyasc_sort_population55.94577758ms100th percentile latencyasc_sort_population72.898199ms50th percentile service timeasc_sort_population45.37886ms90th percentile service timeasc_sort_population48.1426418ms99th percentile service timeasc_sort_population55.30153109ms100th percentile service timeasc_sort_population72.260339mserror rateasc_sort_population0%Min Throughputdesc_sort_geonameid1.5ops/sMedian Throughputdesc_sort_geonameid1.51ops/sMax Throughputdesc_sort_geonameid1.51ops/s50th percentile latencydesc_sort_geonameid52.22274167ms90th percentile latencydesc_sort_geonameid69.4325779ms99th percentile latencydesc_sort_geonameid79.57920996ms100th percentile latencydesc_sort_geonameid80.11872267ms50th percentile service timedesc_sort_geonameid51.6055115ms90th percentile service timedesc_sort_geonameid68.801679ms99th percentile service timedesc_sort_geonameid79.41158055ms100th percentile service timedesc_sort_geonameid79.465491mserror ratedesc_sort_geonameid0%Min Throughputasc_sort_geonameid1.5ops/sMedian Throughputasc_sort_geonameid1.51ops/sMax Throughputasc_sort_geonameid1.51ops/s50th percentile latencyasc_sort_geonameid51.35154333ms90th percentile latencyasc_sort_geonameid52.2966503ms99th percentile latencyasc_sort_geonameid55.33079961ms100th percentile latencyasc_sort_geonameid55.520544ms50th percentile service timeasc_sort_geonameid50.7138335ms90th percentile service timeasc_sort_geonameid51.6588923ms99th percentile service timeasc_sort_geonameid54.68967127ms100th percentile service timeasc_sort_geonameid54.874135mserror rateasc_sort_geonameid0%
-
节点规格为ess.spec-4u16g、节点数为3的集群性能测试结果MetricTaskValueUnitCumulative indexing time of primary shards-11.95073333minMin cumulative indexing time across primary shards-0minMedian cumulative indexing time across primary shards-2.339941667minMax cumulative indexing time across primary shards-2.470116667minCumulative indexing throttle time of primary shards-0minMin cumulative indexing throttle time across primary shards-0minMedian cumulative indexing throttle time across primary shards-0minMax cumulative indexing throttle time across primary shards-0minCumulative merge time of primary shards-4.21495minCumulative merge count of primary shards-65-Min cumulative merge time across primary shards-0minMedian cumulative merge time across primary shards-0.813216667minMax cumulative merge time across primary shards-0.974483333minCumulative merge throttle time of primary shards-0.83345minMin cumulative merge throttle time across primary shards-0minMedian cumulative merge throttle time across primary shards-0.157775minMax cumulative merge throttle time across primary shards-0.24605minCumulative refresh time of primary shards-2.164983333minCumulative refresh count of primary shards-291-Min cumulative refresh time across primary shards-0minMedian cumulative refresh time across primary shards-0.425391667minMax cumulative refresh time across primary shards-0.450516667minCumulative flush time of primary shards-0.1559minCumulative flush count of primary shards-11-Min cumulative flush time across primary shards-0minMedian cumulative flush time across primary shards-0.0248minMax cumulative flush time across primary shards-0.043433333minTotal Young Gen GC-6.421sTotal Old Gen GC-0s
-
通过Elasticsearch官方提供的benchmark脚本rally1.0.0,对云搜索服务的集群(版本:7.1.1) 进行性能测试,测试结果如下所示。本次测试采用官方提供的geonames,大小3.2G,11396505个doc。索引采用6个shard(默认为5个)。节点规格为ess.spec-2u8g、节点数为3的集群性能测试结果MetricTaskValueUnitCumulative indexing time of primary shards-11.48263333minMin cumulative indexing time across primary shards-0minMedian cumulative indexing time across primary shards-2.313783333minMax cumulative indexing time across primary shards-2.401766667minCumulative indexing throttle time of primary shards-0minMin cumulative indexing throttle time across primary shards-0minMedian cumulative indexing throttle time across primary shards-0minMax cumulative indexing throttle time across primary shards-0minCumulative merge time of primary shards-6.466066667minCumulative merge count of primary shards-85-Min cumulative merge time across primary shards-0minMedian cumulative merge time across primary shards-1.257475minMax cumulative merge time across primary shards-1.417283333minCumulative merge throttle time of primary shards-1.089583333minMin cumulative merge throttle time across primary shards-0minMedian cumulative merge throttle time across primary shards-0.200458333minMax cumulative merge throttle time across primary shards-0.28265minCumulative refresh time of primary shards-3.641266667minCumulative refresh count of primary shards-530-Min cumulative refresh time across primary shards-0minMedian cumulative refresh time across primary shards-0.725791667minMax cumulative refresh time across primary shards-0.74775minCumulative flush time of primary shards-0.3056minCumulative flush count of primary shards-11-Min cumulative flush time across primary shards-0minMedian cumulative flush time across primary shards-0.059858333minMax cumulative flush time across primary shards-0.09155minTotal Young Gen GC-11.519sTotal Old Gen GC-0sStore size-3.045436038GBTranslog size-2.791873856GBHeap used for segments-15.81298065MBHeap used for doc values-0.037128448MBHeap used for terms-14.63806534MBHeap used for norms-0.073120117MBHeap used for points-0.272666931MBHeap used for stored fields-0.791999817MBSegment count-95-Min Throughputindex-append41705.19docs/sMedian Throughputindex-append46911.27docs/sMax Throughputindex-append47765.4docs/s50th percentile latencyindex-append642.339781ms90th percentile latencyindex-append1114.672936ms99th percentile latencyindex-append1733.648438ms99.9th percentile latencyindex-append4770.059011ms100th percentile latencyindex-append7045.246771ms50th percentile service timeindex-append642.339781ms90th percentile service timeindex-append1114.672936ms99th percentile service timeindex-append1733.648438ms99.9th percentile service timeindex-append4770.059011ms100th percentile service timeindex-append7045.246771mserror rateindex-append0%Min Throughputindex-stats90.05ops/sMedian Throughputindex-stats90.07ops/sMax Throughputindex-stats90.12ops/s50th percentile latencyindex-stats2.834653556ms90th percentile latencyindex-stats3.527868712ms99th percentile latencyindex-stats4.332674769ms99.9th percentile latencyindex-stats8.392195267ms100th percentile latencyindex-stats9.692270112ms50th percentile service timeindex-stats2.766648ms90th percentile service timeindex-stats3.448194001ms99th percentile service timeindex-stats4.26309684ms99.9th percentile service timeindex-stats8.322068306ms100th percentile service timeindex-stats9.624071001mserror rateindex-stats0%Min Throughputnode-stats90.06ops/sMedian Throughputnode-stats90.1ops/sMax Throughputnode-stats90.35ops/s50th percentile latencynode-stats3.205233055ms90th percentile latencynode-stats3.595145422ms99th percentile latencynode-stats4.469114152ms99.9th percentile latencynode-stats8.306063762ms100th percentile latencynode-stats8.748160444ms50th percentile service timenode-stats3.1379455ms90th percentile service timenode-stats3.5278055ms99th percentile service timenode-stats4.397312671ms99.9th percentile service timenode-stats8.236949997ms100th percentile service timenode-stats8.680502mserror ratenode-stats0%Min Throughputdefault50.03ops/sMedian Throughputdefault50.05ops/sMax Throughputdefault50.09ops/s50th percentile latencydefault2.354736001ms90th percentile latencydefault2.7983462ms99th percentile latencydefault4.59134772ms99.9th percentile latencydefault13.97301623ms100th percentile latencydefault16.199022ms50th percentile service timedefault2.286799ms90th percentile service timedefault2.7289099ms99th percentile service timedefault4.511846871ms99.9th percentile service timedefault13.90608139ms100th percentile service timedefault16.130242mserror ratedefault0%Min Throughputterm150.07ops/sMedian Throughputterm150.1ops/sMax Throughputterm150.15ops/s50th percentile latencyterm2.316147835ms90th percentile latencyterm2.610932901ms99th percentile latencyterm5.968978318ms99.9th percentile latencyterm10.37105939ms100th percentile latencyterm12.147341ms50th percentile service timeterm2.249188999ms90th percentile service timeterm2.5313585ms99th percentile service timeterm5.32149807ms99.9th percentile service timeterm9.589421289ms100th percentile service timeterm11.204094mserror rateterm0%Min Throughputphrase150.07ops/sMedian Throughputphrase150.1ops/sMax Throughputphrase150.16ops/s50th percentile latencyphrase2.350160666ms90th percentile latencyphrase2.689091867ms99th percentile latencyphrase4.606508314ms99.9th percentile latencyphrase11.32920839ms100th percentile latencyphrase11.53972367ms50th percentile service timephrase2.283426499ms90th percentile service timephrase2.6023857ms99th percentile service timephrase4.073278879ms99.9th percentile service timephrase11.26236945ms100th percentile service timephrase11.471612mserror ratephrase0%Min Throughputcountry_agg_uncached4ops/sMedian Throughputcountry_agg_uncached4.01ops/sMax Throughputcountry_agg_uncached4.01ops/s50th percentile latencycountry_agg_uncached154.036113ms90th percentile latencycountry_agg_uncached160.160262ms99th percentile latencycountry_agg_uncached217.9470218ms100th percentile latencycountry_agg_uncached270.401061ms50th percentile service timecountry_agg_uncached153.9164235ms90th percentile service timecountry_agg_uncached160.0393962ms99th percentile service timecountry_agg_uncached217.8203381ms100th percentile service timecountry_agg_uncached270.314704mserror ratecountry_agg_uncached0%Min Throughputcountry_agg_cached100.04ops/sMedian Throughputcountry_agg_cached100.06ops/sMax Throughputcountry_agg_cached100.07ops/s50th percentile latencycountry_agg_cached1.772262999ms90th percentile latencycountry_agg_cached1.943878399ms99th percentile latencycountry_agg_cached2.796966468ms99.9th percentile latencycountry_agg_cached6.427875642ms100th percentile latencycountry_agg_cached14.575363ms50th percentile service timecountry_agg_cached1.7050655ms90th percentile service timecountry_agg_cached1.878483099ms99th percentile service timecountry_agg_cached2.689127631ms99.9th percentile service timecountry_agg_cached4.762661218ms100th percentile service timecountry_agg_cached14.506126mserror ratecountry_agg_cached0%Min Throughputscroll20.05pages/sMedian Throughputscroll20.06pages/sMax Throughputscroll20.07pages/s50th percentile latencyscroll387.0272235ms90th percentile latencyscroll400.7843767ms99th percentile latencyscroll452.1627557ms100th percentile latencyscroll478.26665ms50th percentile service timescroll386.143462ms90th percentile service timescroll399.8976064ms99th percentile service timescroll451.295933ms100th percentile service timescroll477.360055mserror ratescroll0%Min Throughputexpression2ops/sMedian Throughputexpression2ops/sMax Throughputexpression2ops/s50th percentile latencyexpression285.121047ms90th percentile latencyexpression292.0323929ms99th percentile latencyexpression336.1215281ms100th percentile latencyexpression389.221478ms50th percentile service timeexpression284.883145ms90th percentile service timeexpression291.78961ms99th percentile service timeexpression335.9078465ms100th percentile service timeexpression388.982388mserror rateexpression0%Min Throughputpainless_static1.5ops/sMedian Throughputpainless_static1.5ops/sMax Throughputpainless_static1.5ops/s50th percentile latencypainless_static414.4142772ms90th percentile latencypainless_static428.3021712ms99th percentile latencypainless_static551.0764984ms100th percentile latencypainless_static586.564512ms50th percentile service timepainless_static414.134189ms90th percentile service timepainless_static428.0409987ms99th percentile service timepainless_static550.7989791ms100th percentile service timepainless_static586.432656mserror ratepainless_static0%Min Throughputpainless_dynamic1.5ops/sMedian Throughputpainless_dynamic1.5ops/sMax Throughputpainless_dynamic1.5ops/s50th percentile latencypainless_dynamic387.1022877ms90th percentile latencypainless_dynamic402.260061ms99th percentile latencypainless_dynamic472.1731577ms100th percentile latencypainless_dynamic480.22595ms50th percentile service timepainless_dynamic386.7965725ms90th percentile service timepainless_dynamic401.955634ms99th percentile service timepainless_dynamic471.9657896ms100th percentile service timepainless_dynamic479.91248mserror ratepainless_dynamic0%Min Throughputdecay_geo_gauss_function_score1ops/sMedian Throughputdecay_geo_gauss_function_score1ops/sMax Throughputdecay_geo_gauss_function_score1ops/s50th percentile latencydecay_geo_gauss_function_score364.5783855ms90th percentile latencydecay_geo_gauss_function_score369.3249541ms99th percentile latencydecay_geo_gauss_function_score376.4548957ms100th percentile latencydecay_geo_gauss_function_score402.051915ms50th percentile service timedecay_geo_gauss_function_score364.0542175ms90th percentile service timedecay_geo_gauss_function_score368.6669817ms99th percentile service timedecay_geo_gauss_function_score375.7975505ms100th percentile service timedecay_geo_gauss_function_score401.399591mserror ratedecay_geo_gauss_function_score0%Min Throughputdecay_geo_gauss_script_score1ops/sMedian Throughputdecay_geo_gauss_script_score1ops/sMax Throughputdecay_geo_gauss_script_score1ops/s50th percentile latencydecay_geo_gauss_script_score388.6800445ms90th percentile latencydecay_geo_gauss_script_score404.632834ms99th percentile latencydecay_geo_gauss_script_score450.7542979ms100th percentile latencydecay_geo_gauss_script_score538.551451ms50th percentile service timedecay_geo_gauss_script_score388.0335405ms90th percentile service timedecay_geo_gauss_script_score403.9975599ms99th percentile service timedecay_geo_gauss_script_score450.1032284ms100th percentile service timedecay_geo_gauss_script_score537.919936mserror ratedecay_geo_gauss_script_score0%
-
一、前言 我们经常有这样的需求,表定义或者表定义数据已经有了,需要评估某些语句的的性能,比如有如下表: DROP TABLE IF EXISTS `testiptable`; CREATE TABLE `testiptable` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ipaddr` varchar(20) DEFAULT NULL, `rectime` varchar(30) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; 此时我们需要评估某个实例写入的性能,该如何进行呢? 目前业界常用的mysql性能评估工具,最流行、对mysql最亲和的就是sysbench。sysbench除了自带的lua脚本,比如oltp_read_write.lua、oltp_insert.lua等等,当然,sysbench还支持今天我们重点要介绍的自定义脚本。 insert的关键的语句如下: insert into testiptable(ipaddr, rectime) values(‘192.168.10.121’, ‘2020-03-29 09:20:18’),(‘192.168.10.121’, ‘2020-03-29 10:20:18’); 注:测试写入性能的时候,会进行多线程和批量insert。 sysbench执行,一般函数:thread_init、event、thread_done,这三个函数分别对应线程初始化、线程执行事件、线程结束执行操作。Sysbench执行时会按照thread_init-> event-> thread_done顺序进行。二、脚本定义2.1 线程初始化和线程结束脚本 function thread_init(thread_id) drv = sysbench.sql.driver() con = drv:connect() end 注:thread_init函数最重要的就是驱动连接。 function thread_done() con:disconnect() end 注:thread_done函数主要是执行完成 函数内部没有local标识的变量,脚本内都可以使用,如con和drv后续的脚本内部都可以使用。2.2 线程执行事件 sysbench.cmdline.options = { bulk_inserts = {"Number of values to to insert", 1} } sysbench.cmdline.options,可以在执行脚本时将输入参数传入脚本。我们在写入时需要进行批量insert, 通过--bulk_inserts=xx来设置批量修改。 注意:大括号中前面是说明,后面是默认值。如果不输入参数,脚本自动按照默认值执行。除了能传递数字,还可以传递bool型的true和false,如: sysbench.cmdline.options = { skip_trx= {"skip transaction", false} } 我们来看一下数据insert部分函数是如何实现的: function execute_inserts(thread_id) local ipaddr local rectime local sql = "insert " ..tablename.." (ipaddr,rectime) values" for i=1,sysbench.opt.bulk_inserts do ipaddr = string.format("192.168.%d.%d",sysbench.rand.pareto(10,40),sysbench.rand.pareto(1,250)) rectime = os.date("%Y-%m-%d %H:%M:%S",os.time()) sql = sql .. string.format("('%s','%s')",ipaddr,rectime) if ( i ~= sysbench.opt.bulk_inserts) then sql = sql .. "," end end con:query(sql) end 注:con:query(sql),该语句作用为执行数据库语句。 function event(thread_id) execute_inserts(thread_id) end三、脚本执行 sysbench ./insert.lua --mysql-user=root --mysql-password='Test_123' --mysql-db=test --report-interval=1 --events=0 --time=180 --mysql-host=192.168.0.139 --bulk_inserts=100 run 注:如果不输入--bulk_inserts=100,脚本默认--bulk_inserts=1。 四、总结 Sysbench自定义脚本,主要要实现event逻辑,可以通过sysbench.cmdline.options列表进行命令行传参。
-
随着分布式架构和微服务技术的普及,应用的复杂程度越来越高,在架构解构和性能提升的同时,也带来了生产环境性能问题定位难度高、修复周期长等挑战,因此提前进行性能测试逐渐成为了应用上线前的必选环节。云性能测试服务(Cloud Performance Test Service,简称CPTS)是一项为基于HTTP/HTTPS/TCP/UDP/WEBSOCKET/RTMP/HLS等协议构建的云应用提供性能测试的服务,具备强大的分布式压测能力。CPTS支持快速模拟大规模并发用户的真实业务高峰场景,可以很好的支持报文内容和时序自定义、多事务组合的复杂场景测试。通过CPTS,我们希望将性能压测本身的工作持续简化,将更多的精力回归到关注业务和性能问题本身,同时降低成本、提升稳定性、优化用户体验,最大程度地帮助企业提升商业价值。专业性能测试报告,应用性能表现一目了然· 提供事务TPS、并发用户、响应时延、访问累计、响应结果校验失败、响应超时等多种细分维度统计能力。· 提供实时、离线两种类型的测试报告,供用户随时查看和分析测试数据。 现在,机会来了!03月09日至03月24日华为云云端实验室:《60分钟体验云端应用性能测试》限时免费报名中….精心设计云上实验,深度体验CPTS云服务,打卡赢码豆换好礼! 实验内容:本实验指导用户基于华为云云性能测试服务对云端应用进行性能测试。实验目标:通过本实验,您将能够:1.使用CCI资源组基于云性能测试服务测试云端应用2.了解网站性能的各项指标 扫描下图二维码添加小助手好友回复“CPTS”入群学习↓↓↓↓
-
欢迎参加华为云“中间件最佳实践挑战营”!这是本次挑战营的第5关,坚持闯关成功有机会获第五期好礼:码豆/荣耀手环/华为背包等,全通关还有大奖!本期活动截止5月24日。注意:参与闯关前,请确保已报名加入活动群并领取实践资源,如未入群请添加小助手微信(zhongjianjianxiaoge),回复“中间件”报名入群!点击这里了解活动详情>> | 点击这里查看活动FAQ>> 一、 场景介绍电商抢购已成为当前互联网应用的普遍需求,有并发用户高、突发请求大、失败用户反复重试等特征,如何保证在高负载运行情况下网站的可用性已经成为运维保障的重点。优势· 真实场景模拟:秒级百万并发能力,瞬间发起大量并发压力,可在一个测试模型里面模拟全网站高负载。· 专业测试报告:提供按时延响应区间的统计,客观反映用户体验。· 失败用户重试:多种表达式的自定义结果比对,未正常进入网站的可以重试。图1 电商抢购测试 二、 实践指南(1)实践资源说明:CPTS云性能测试服务,提供1万VUM免费测试额度和共享资源组,100以下并发长期免费使用,可点击这里进入CPTS控制台,点击“免费领取套餐包”领取1万VUM免费测试额度。(2)最佳实践指南: 点击查看实践指南>>(3)视频演示:点击查看视频演示>> 三、 闯关任务任务一:领取免费套餐包,并将CPTS控制台-总览-我的资源-已购套餐包VUM剩余额度进行截图,截图需包含右上角华为云账号名,并按回帖格式要求在本帖中回帖;奖励:100码豆; 任务二:根据实践指南完成实践操作,将测试报告截图,并按回帖格式要求在本帖中回帖;奖励:本期闯1关可参与抽取“荣耀手环4 Running版”;闯2关可参与抽取“华为背包”;详见FAQ评奖规则 四、 回帖格式请务必按照以下格式要求进行回帖,否则无法计算奖励:华为云账号名:XXX(即右上角的字母数字组合ID)微信昵称:XXX实践感想:XXX实践截图:需包含(a)CPTS控制台总览页VUM剩余额度截图;(b)完整测试报告截图,可分多张截图;(c)下载离线报告,并在回帖时将报告上传附件。 附各关卡快速入口:第1关任务:基于API网关的电话号码归属地查询第2关任务:使用函数工作流服务为图片打水印第3关任务:使用Redis实现排行榜功能第4关任务:使用DMS Kafka优化消费者poll第5关任务:使用CPTS进行电商网站性能测试
-
文档位置已迁移至如下链接:https://support.huaweicloud.com/tstg-kunpenghpcs/kunpenghpcs_tstg_0001.html
上滑加载中
推荐直播
-
DTT年度收官盛典:华为开发者空间大咖汇,共探云端开发创新
2025/01/08 周三 16:30-18:00
Yawei 华为云开发工具和效率首席专家 Edwin 华为开发者空间产品总监
数字化转型进程持续加速,驱动着技术革新发展,华为开发者空间如何巧妙整合鸿蒙、昇腾、鲲鹏等核心资源,打破平台间的壁垒,实现跨平台协同?在科技迅猛发展的今天,开发者们如何迅速把握机遇,实现高效、创新的技术突破?DTT 年度收官盛典,将与大家共同探索华为开发者空间的创新奥秘。
回顾中 -
GaussDB应用实战:手把手带你写SQL
2025/01/09 周四 16:00-18:00
Steven 华为云学堂技术讲师
本期直播将围绕数据库中常用的数据类型、数据库对象、系统函数及操作符等内容展开介绍,帮助初学者掌握SQL入门级的基础语法。同时在线手把手教你写好SQL。
回顾中 -
算子工具性能优化新特性演示——MatMulLeakyRelu性能调优实操
2025/01/10 周五 15:30-17:30
MindStudio布道师
算子工具性能优化新特性演示——MatMulLeakyRelu性能调优实操
即将直播
热门标签