호스팅 방법 별 성능 비교 (웹호스팅, VPS, 집 컴퓨터)

가격도 중요하지만, 호스팅의 성능 및 품질역시 중요하다.

이는 apache의 ab 를 이용해서 시험을 하였다. 시험 대상은 내 블로그의 메인 페이지이다.
옵션은 다음처럼 동접자 100명이 3번씩 내 블로그의 메인페이지를 접속했다고 가정하였다. (이 블로그는 그럴 일이 없어 ㅠㅠ)

ab -n 100 -c 3 http://www.jaehak0123.com/

1) 개인 서버
N40L은 시험해보지 못했고(추후 update), intel 1230v2에 윈도우 2012 server를 적용하고, Hyper-v 내에 centos를 설치하고 시험을 하였다.

원격지에서의 접속 시험은 해보지 못했고, local 시험만을 수행하였다.

centos6.4에 CPU 1 core 배정

Document Path: /
Document Length: 64969 bytes

Concurrency Level: 3
Time taken for tests: 51.864 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 6545700 bytes
HTML transferred: 6496900 bytes
Requests per second: 1.93 [#/sec] (mean)
Time per request: 1555.931 [ms] (mean)
Time per request: 518.644 [ms] (mean, across all concurrent requests)
Transfer rate: 123.25 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.0 0 9
Processing: 509 1546 115.3 1547 1830
Waiting: 119 360 53.2 355 632
Total: 509 1546 115.6 1547 1834

Percentage of the requests served within a certain time (ms)
50% 1547
66% 1549
75% 1551
80% 1553
90% 1559
95% 1580
98% 1830
99% 1834
100% 1834 (longest request)

2core 배정

Document Path:          /
Document Length:        64969 bytes

Concurrency Level:      3
Time taken for tests:   26.785 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      6545700 bytes
HTML transferred:       6496900 bytes
Requests per second:    3.73 [#/sec] (mean)
Time per request:       803.539 [ms] (mean)
Time per request:       267.846 [ms] (mean, across all concurrent requests)
Transfer rate:          238.66 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.0      0      16
Processing:   516  795 207.3    802    1174
Waiting:      119  199  63.5    216     446
Total:        516  796 207.7    802    1190

Percentage of the requests served within a certain time (ms)
  50%    802
  66%    929
  75%   1000
  80%   1031
  90%   1065
  95%   1083
  98%   1094
  99%   1190
 100%   1190 (longest request)

2) 웹호스팅
미리내닷컴에 내 블로그데이터의 일부(메인 페이지가 출력될 정도)를 copy후 시험하였다.

local 시험

Document Path:          /
Document Length:        64969 bytes

Concurrency Level:      3
Time taken for tests:   71.461043 seconds
Complete requests:      100
Failed requests:        3
   (Connect: 0, Length: 3, Exceptions: 0)
Write errors:           0
Total transferred:      6428183 bytes
HTML transferred:       6384821 bytes
Requests per second:    1.40 [#/sec] (mean)
Time per request:       2143.831 [ms] (mean)
Time per request:       714.610 [ms] (mean, across all concurrent requests)
Transfer rate:          87.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   662 2102 1652.6   1782   12213
Waiting:        0  709 1250.1    429    7664
Total:        662 2102 1652.6   1782   12213

Percentage of the requests served within a certain time (ms)
  50%   1782
  66%   1996
  75%   2125
  80%   2222
  90%   2603
  95%   2994
  98%  12087
  99%  12213
 100%  12213 (longest request)

remote 시험

Document Path:          /
Document Length:        64969 bytes

Concurrency Level:      3
Time taken for tests:   67.959 seconds
Complete requests:      100
Failed requests:        3
   (Connect: 0, Receive: 0, Length: 3, Exceptions: 0)
Write errors:           0
Total transferred:      6407464 bytes
HTML transferred:       6364540 bytes
Requests per second:    1.47 [#/sec] (mean)
Time per request:       2038.778 [ms] (mean)
Time per request:       679.593 [ms] (mean, across all concurrent requests)
Transfer rate:          92.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        2    3   0.7      3       6
Processing:    11 2026 1518.2   1624   11465
Waiting:        0  655 1078.8    425    6911
Total:         14 2029 1518.2   1627   11469

Percentage of the requests served within a certain time (ms)
  50%   1627
  66%   1879
  75%   2021
  80%   2105
  90%   2980
  95%   3508
  98%  10678
  99%  11469
 100%  11469 (longest request)

3) VPS
현재 내 블로그가 서비스되고 있는 digitalocean의 성능 측정을 하였다.

local 시험

Document Path:          /
Document Length:        65734 bytes

Concurrency Level:      3
Time taken for tests:   94.421 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      6622300 bytes
HTML transferred:       6573400 bytes
Requests per second:    1.06 [#/sec] (mean)
Time per request:       2832.640 [ms] (mean)
Time per request:       944.213 [ms] (mean, across all concurrent requests)
Transfer rate:          68.49 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0       9
Processing:   965 2815 256.2   2776    3429
Waiting:      324  718  60.4    710     901
Total:        965 2815 256.2   2776    3429

Percentage of the requests served within a certain time (ms)
  50%   2776
  66%   2790
  75%   2807
  80%   2828
  90%   3057
  95%   3409
  98%   3424
  99%   3429
 100%   3429 (longest request)

remote 시험

Document Path:          /
Document Length:        65734 bytes

Concurrency Level:      3
Time taken for tests:   111.992 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      6622300 bytes
HTML transferred:       6573400 bytes
Requests per second:    0.89 [#/sec] (mean)
Time per request:       3359.766 [ms] (mean)
Time per request:       1119.922 [ms] (mean, across all concurrent requests)
Transfer rate:          57.75 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      136  145   3.8    144     155
Processing:  2097 3210 276.0   3305    3677
Waiting:     1714 2845 271.8   2946    3252
Total:       2243 3355 276.8   3449    3820

Percentage of the requests served within a certain time (ms)
  50%   3449
  66%   3499
  75%   3515
  80%   3526
  90%   3596
  95%   3756
  98%   3803
  99%   3820
 100%   3820 (longest request)

그래서 결론을 내자면, 빠르기는 집의 컴퓨터가 가장 빠르겠지만 네트워크의 품질을 알 수 없기 때문에 물음표가 되겠다. 그리고, CPU core를 1개를 사용해도 느리지 않으나, 2개를 사용하면 속도가 거의 두배가 된다.(3개, 4개 이상을 할당하는 것은 큰 향상이 없음)

웹호스팅은 대부분의 경우 빠르나, 공동으로 호스팅 자원을 공유해서 그런건지 극히 일부분이 극도로 느려지는 경우가 있다. 이런 것들 하나 하나들 때문에 웹페이지의 반응이 떨어지는 것처럼 보이게 된다. (이는 local이나 remote나 모두 98%부분에서 시간이 10초 이상 소요되는 것을 보아 네트워크의 문제는 아님)

가격적으로 저렴한 외국 VPS는 CPU 자원을 공유하는지 local에서도 느렸다. 더군다나 LA에 있는 서버여서 한국과 ping이 150ms 정도 되기 때문에 rmote 반응 속도는 local 대비 300~400ms 더 느린 것을 알 수 있다. 하지만 품질적인 면에서는 99%에서도 50%대비 크게 느리지 않다. 즉, 전반적으로 느리지만 웹 페이지가 표시되는 시간은 항상 거의 일정한 시간에 출력이 된다. 즉, 신뢰성은 웹호스팅보다 좋다고 할 수 있다.

4

PS. 그나저나 회사에서나 집에서나 benchmark만 주구장창 하는 이유가 뭔지… 나 미쳤나봐.

답글 남기기

This site uses Akismet to reduce spam. Learn how your comment data is processed.