分享
 
 
 

Inside MSXML Performance(MSXML性能分析) (2)

王朝other·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

Metrics

度量指标

There are four key performance metrics that most of you are interested in as you develop your XML-based Web application:

当开发基于XML的Web应用程序时,大部分人对以下四个主要的性能度量指标感兴趣:

· Working set: The peak amount of memory used by MSXML to process requests. Once the working set exceeds available RAM, performance usually declines sharply as the operating system starts paging memory out to disk.

· 工作集(Work set):MSXML处理请求的峰值内存空间。一旦处理空间超过了可用的RAM,操作系统将页面调度到磁盘,性能通常会急剧下降。

· Megabytes per second: Simply a measure of raw speed for a given operation, such as the document load method. By itself it is interesting, but to get the real picture for a production application, you really need to consider the next two metrics as well.

· 百兆字节每秒:简单衡量一给定的操作(如文件load方法)的速度。但是在实际应用中,你还需要考虑以下两个衡量标准。

· Requests per second: A measure of how many requests the XML parser can handle per second. An XML parser might have a high megabytes-per-second rate, but if it is expensive to set up and tear down that parser, it will still have a low throughput in requests per second. This metric can help you calculate how many clients your server can handle under a peak load. Obviously, this depends on how heavily the clients are going to load up your server. For example, if the clients hit the server at a peak rate of one request per second, and if the server can do 150 requests per second, the server can probably handle up to 150 clients.

· 每秒处理的请求数:用来表示XML解析器每秒可处理的请求数。一个XML解析器可能每秒处理的百兆字节量很高,但是如果初始化和关闭该解析器的代价很大,那么它的每秒处理请求数仍旧很低。这个度量指标可以帮助你计算在峰值负载下,服务器能够接受多少客户。显然,这取决于客户端访问服务器的频率。例如,如果每个客户端点击服务器的峰值是每秒一个请求,而服务器能够在一秒钟内处理150个请求,那么服务器就能够同时处理150个客户。

· Scaling: A measure of how well your server can process requests in parallel. If your server is processing 150 client requests in parallel, then it is doing a lot of multi-threading. Processing 150 threads in parallel is rather much for one processor, which will spend a lot of time just switching between these threads. In this scenario, you might add more processors to the computer to share the load.

· 伸缩性:这是用来表示服务器并行处理请求的能力。如果你的服务器能够并行处理150个客户端请求,那么它会同时处理很多线程。并行处理150个线程对于一个处理器来说负担很大,大部分时间都消耗在线程切换上。在这种情况下,你必须增加更多的处理器来分担负荷。

For example, a quad-processor server would need to process only 37 threads per processor—a more reasonable amount. (Scaling beyond this can be done with Web farms.) The goal is to scale linearly with the number of processors you add (for example, a quad-processor server should be four times faster than a single-processor computer). However, this is rarely achieved because there is usually some sort of contention for shared resources, such as memory, file system, registry, and network. Most components also contend for their own internal shared resources (for example, a global state that is protected by locks). Typically, when you add processors, scaling problems become a lot more obvious. For more information on scaling up and scaling out, see the Duwamish Diary column.

例如,对于一个四处理器的服务器,每个处理器只需要处理37个线程了,这是更合理的数量。(Web farm可以用来处理更高层次的伸缩性。)我们的目的是使得增加的处理器数量与性能的提高成正比(例如,一个四处理器的服务器应该比单处理器的计算机要快四倍)。但是,这通常是做不到的,因为还有很多类型的内容要共享,如内存,文件系统,注册表和网络。大部分组件还要竞争一些内部的共享资源(例如,一个全局状态被锁保护了)。通常,当你增加处理器时,伸缩性问题变得明显起来。想要得到更多伸缩性方面的资料,请查阅Duwamish Diary的专栏文章。

Disclaimer: I want you to understand that the numbers published here are not official in any way, but are intended to paint the overall picture so that you can get a feel for what kinds of things to expect and be able to make the right design choices while building your XML applications.

声明:我想让你们理解,这里发表的数据并不是官方正式的,只是用来让你们有个全局的感觉:当建立XML应用程序时你必须考虑哪些事情,结果会怎样,应该做怎样的设计选择。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有