Web Server程序编写学习笔记(五)性能测试

本文使用Apache自带的HTTP服务器性能测试工具ab,在局域网环境下,对服务器程序分别在FreeBSD 4.7和Windows XP(Cygwin)下的运行情况进行测试。给出了不同环境下的测试数据,包括请求数、并发级别、响应时间等,以对比服务器在不同系统中的性能表现。

        使用apache自带的HTTP服务器性能测试工具ab对上述程序在FreeBSD和windows(Cygwin)下的运行情况进行测试。
        网路条件:局域网,192.168.1.7分别在FreeBSD和windows(Cygwin)下运行服务器程序,192.168.1.27运行ab测试程序对服务器程序进行测试;
        机器硬件条件:Intel (R) Celeron CPU 2.40GHz;256DDR,Maxtor 80G。
        1. FreeBSD 4.7环境:
/*****************************************************/
C:/>ab -n 1000 -c 50 192.168.1.7/124
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.7 (be patient)


Server Software:        mypngserver
Server Hostname:        192.168.1.7
Server Port:            80

Document Path:          /124
Document Length:        188 bytes

Concurrency Level:      50
Time taken for tests:   77.831917 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      346000 bytes
HTML transferred:       188000 bytes
Requests per second:    12.85 [#/sec] (mean)
Time per request:       3891.596 [ms] (mean)
Time per request:       77.832 [ms] (mean, across all concurrent requests)
Transfer rate:          4.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   77  41.7    100     100
Processing:    10 3718 481.4   3805    3905
Waiting:        0 1997 1104.4   2002    3905
Total:        110 3796 481.8   3905    3905

Percentage of the requests served within a certain time (ms)
  50%   3905
  66%   3905
  75%   3905
  80%   3905
  90%   3905
  95%   3905
  98%   3905
  99%   3905
 100%   3905 (longest request)
/*************************************************************/

        2. Windows XP (Cygwin)环境:
/*****************************************************/
C:/>ab -n 1000 -c 50 192.168.1.7/qwe
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.7 (be patient)


Server Software:        mypngserver
Server Hostname:        192.168.1.7
Server Port:            80

Document Path:          /qwe
Document Length:        193 bytes

Concurrency Level:      50
Time taken for tests:   719.454525 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      351000 bytes
HTML transferred:       193000 bytes
Requests per second:    1.39 [#/sec] (mean)
Time per request:       35972.726 [ms] (mean)
Time per request:       719.455 [ms] (mean, across all concurrent requests)
Transfer rate:          0.48 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  712 311.2    520    1191
Processing:  4326 34387 4359.4  35221   36192
Waiting:     3815 20803 9140.2  20769   36111
Total:       5127 35099 4359.4  36111   36933

Percentage of the requests served within a certain time (ms)
  50%  36111
  66%  36212
  75%  36312
  80%  36392
  90%  36612
  95%  36712
  98%  36812
  99%  36822
 100%  36933 (longest request)
/****************************************************/

考虑柔性负荷的综合能源系统低碳经济优化调度【考虑碳交易机制】(Matlab代码实现)内容概要:本文围绕“考虑柔性负荷的综合能源系统低碳经济优化调度”展开,重点研究在碳交易机制下如何实现综合能源系统的低碳化与经济性协同优化。通过构包含风电、光伏、储能、柔性负荷等多种能源形式的系统模型,结合碳交易成本与能源调度成本,提出优化调度策略,以降低碳排放并提升系统运行经济性。文中采用Matlab进行仿真代码实现,验证了所提模型在平衡能源供需、平抑可再生能源波动、引导柔性负荷参与调度等方面的有效性,为低碳能源系统的设计与运行提供了技术支撑。; 适合人群:具备一定电力系统、能源系统背景,熟悉Matlab编程,从事能源优化、低碳调度、综合能源系统等相关领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①研究碳交易机制对综合能源系统调度决策的影响;②实现柔性负荷在削峰填谷、促进可再生能源消纳中的作用;③掌握基于Matlab的能源系统模与优化求解方法;④为实际综合能源项目提供低碳经济调度方案参考。; 阅读议:议读者结合Matlab代码深入理解模型构与求解过程,重点关注目标函数设计、约束条件设置及碳交易成本的量化方式,可进一步扩展至多能互补、需求响应等场景进行二次开发与仿真验证。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值