Skip to Content
Web容量规划之美
book

Web容量规划之美

by Arun Kejariwal, John Allspaw
August 2019
Beginner to intermediate
232 pages
3h 50m
Chinese
China Electric Power Press Ltd.
Content preview from Web容量规划之美
57
第3章
测量:容量的单位
我知道的唯一行为理智的人是我的裁缝师,每次给
我做衣服的时候,他都会重新测量我的身体尺寸,
而其他人则期望我适配他们以前的测量。
——George Bernard Shaw
58
3
如果你还没有测量当前容量的办法,你就不能进行容量规划,而只能去猜测。幸
运的是貌似有用之不尽的现成工具可以用来测量计算机性能和使用量。大多数操
作系统都有一些内置的基本应用程序可以用来测量各种性能和资源消耗度量。它
们中的大多数工具通常还会提供记录结果的方法。例如在
Linux
中有以下常用命令:
uptime
可以使用此视图查看负载平均值,而这又指示了队列运行的任务(进程)的数
量。有关理解
uptime
的讨论的链接,请转到本章后面的“参考资料”部分。
dmesg
可以使用此视图查看最后
10
个系统消息,如果有的话,查找可能导致性能问
题的错误。
vmstat 1
这提供了关键的服务器统计信息如
CPU
运行和等待过程的一个总结,剩余内
存(
KB
)、
Swap
分区每秒的换入换出值。
mpstat –P ALL 1
CPU
每秒的时间统计信息。
pistat 1
该命令提供每个进程的动态变化概要。
iostat –xz 1
该命令可以用来查看块设备(磁盘)当前的工作负载和由此产生的性能情况。
free –m
该命令可以查看可用内存的数量、缓冲区大小和文件缓存的大小。
sar -n DEV 1
该命令用来查看网卡吞吐量
rxkb/s
txkb/s
,测量网卡负载同时检查是否
有些指标达到上限。
sar –n TCP,ETCP 1
该命令可以查看本地 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GPT-3

GPT-3

Sandra Kublik, Shubham Saboo

Publisher Resources

ISBN: 9787519831073