LoginSignup
0
1

More than 5 years have passed since last update.

MacのApache Benchで測れない

Posted at
  • タイトルのとおりですが、apache benchで測定すると8000超でエラーになります。
sh-3.2$ ab -n10000 -c100 "http://127.0.0.1/"
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
apr_socket_recv: Operation timed out (60)
Total of 8302 requests completed
  • systemログをみると下記のようなのがでてました。
Jul  2 21:10:32 imac5k httpd[8698]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8699]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8700]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8701]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8702]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8703]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8704]: no path for address 0x10f363000
Jul  2 21:10:32 imac5k httpd[8705]: no path for address 0x10f363000
Jul  2 21:11:01 imac5k com.avast.proxy[255]: Error connecting to 127.0.0.1:80: Operation timed out
  • インストールされてるapacheが古いのかな?

Apacheのバージョン

  • そんなに古くはないと思うんですけどねぇ…
  • This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
  • Apache/2.4.25 (Unix)
sh-3.2$ ab -V
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

sh-3.2$ httpd -V
Server version: Apache/2.4.25 (Unix)
Server built:   Feb  6 2017 20:02:10
Server's Module Magic Number: 20120211:67
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
sh-3.2$

avastを止めたら動いた!

  • avastのwebシールドを停止したらさくっと動きました!
sh-3.2$ ab -n10000 -c100 "http://127.0.0.1/"
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        Apache/2.4.25
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /
Document Length:        1799 bytes

Concurrency Level:      100
Time taken for tests:   1.487 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      20460000 bytes
HTML transferred:       17990000 bytes
Requests per second:    6726.46 [#/sec] (mean)
Time per request:       14.867 [ms] (mean)
Time per request:       0.149 [ms] (mean, across all concurrent requests)
Transfer rate:          13439.78 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0      23
Processing:     1   14   5.2     15      45
Waiting:        1   14   5.1     15      45
Total:          3   15   5.3     15      46

Percentage of the requests served within a certain time (ms)
  50%     15
  66%     17
  75%     18
  80%     19
  90%     20
  95%     22
  98%     23
  99%     40
 100%     46 (longest request)
  • avastめぇ〜〜
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1