DOI QR코드

DOI QR Code

The Effect of C Language Output Method to the Performance of CGI Gateway in the UNIX Systems

유닉스 시스템에서 C 언어 출력 방법이 CGI 게이트웨이 성능에 미치는 영향

  • 이형봉 (강릉대학교 컴퓨터공학과) ;
  • 정연철 (호남대학교 컴퓨터게임학과) ;
  • 권기현 (삼척대학교 정보통신공학과)
  • Published : 2005.02.01

Abstract

CGI is a standard interface rule between web server and gateway devised for the gateway's standard output to replace a static web document in UNIX environment. So, it is common to use standard I/O statements provided by the programming language for the CGI gateway. But the standard I/O mechanism is one of buffer strategies that are designed transparently to operating system and optimized for generic cases. This means that it nay be useful to apply another optimization to the standard I/O environment in CGI gateway. In this paper, we introduced standard output method and file output method as the two output optimization areas for CGI gateways written in C language in the UNIX/LINUX systems, and applied the proposed methods of each area to Debian LINUX, IBM AIX, SUN Solaris, Digital UNIX respectively. Then we analyzed the effect of them focused on execution time. The results were different from operating system to operating system. Compared to normal situation, the best case of standard output area showed about $10{\%}$ improvement and the worst case showed $60{\%}$ degradation in file output area where some performance improvements were expected.

CGI는 유닉스 운영체제의 표준 입${\cdot}$출력 환경에서 프로그램의 출력 결과가 고정적인 웹 문서를 대신하도록 고안된 게이트웨이와 웹 서버 사이의 표준 접속 규약이다. 따라서 CGI 게이트웨이에서는 사용된 언어가 제공하는 표준 입${\cdot}$출력 문장을 사용하는 것이 자연스럽다. 그런데 표준 입${\cdot}$출력 메커니즘은 보편적인 환경에 적합하도록 운영체제에 투명하게 설계된 버퍼 전략 중의 하나이다. 이것은 CGI 환경이라는 독특한 특성이 고려될 경우 표준 입${\cdot}$출력 부분이 웹 성능향상을 위한 또 다른 최적화 대상이 될 수 있음을 의미한다. 이 논문에서는 유닉스/리눅스 시스템에서 C 언어로 작성된 CGI 게이트웨이를 위한 출력의 최적화 분야를 표준 출력 방법과 파일 출력 방법으로 분류하고, 각 분야별 제안된 최적화 방안들을 Debian LINUX, IBM AIX, SUN Solaris, Digital UNIX 등 네 운영체제를 대상으로 적용하여 그 영향을 실행시간 위주로 분석하였다. 그 결과 운영체제에 따라 상당한 차이를 보였는데, 기본 방법에 비해 표준 출력 분야에서 $10{\%}$ 이상 향상된 경우가 있었던 반면 성능 향상이 당연시 되었던 파일 출력 방법에서는 오히려 $60{\%}$ 이상 저하되는 최악의 경우가 관찰되었다.

Keywords

References

  1. World Wide Web Consortium, 'HTTP-Hypertext Transfer Protocol', http://www.w3.org/protocols/
  2. Robert Orfali, Dan Harkey, Jeri Edwards, 'The Essential Client/Server Survival Guide', 2nd Ed., WILEY, p. 7-22, 1996
  3. World Wide Web Consortium, 'CGI : Common Gateway Interface', http://www.w3.org/hypertext/wwwCGI
  4. H. Braun and K. Claffy, 'Web Traffic Characterization : An Assessment of the Impact of Caching Documents from NCSA's Web Server', Electronic Proceedings of the Second World Wide Web Conference '94 : Mosaic and the Web, Chicago, Ilinois, Oct., 1994
  5. A. Bestavros, R. Carter, M. Crovella, C. Cunha, A. Heddaya and S. Mirdad, 'Application-Level Document Caching in the Internet', Proceedings of the Second International Workshop on Services in Distributed and Networked Environments(SDNE'95), Whistler, BC, Canada, pp.166-173, Jun, 1995 https://doi.org/10.1109/SDNE.1995.470449
  6. Arun Iyengar, Eric Nahum, Anees Shaikh, Renu Tewari, 'Enhancing Web Performance', IPIP World Computer Congress, Montreal, Canada, Aug., 2002
  7. 김수정, 백승구, 김종근, '웹 정보시스템의 서비스 성능향상을위한 부하균형 모델 제안', 정보처리논문지, 제6권 제11호, pp.3179-3189, 1999
  8. Arun Iyengar, Jim Challenger, Daniel Dias, Paul Dantzig, 'High-Performance Web Site Design Techniques', IEEE Internet Computing, 4(2), Mar./Apr., 2000 https://doi.org/10.1109/4236.832942
  9. 김성수, 정지영, '웹 서버 클러스터를 위한 효율적인 부하 분배 알고리즘', 정보과학회논문지 : 정보통신, 제28권 제4호, pp.550-558, 2001
  10. James C. Hu, Sumedh Mungee, Douglas C. Schmidt, 'Techniques for Developing and Measuring High Performance Web servers over High Speed Networks', Proceedings of the 2nd Global Internet Conference, Phoenix, AZ, Nov., 1997
  11. Yiming Hu, Ashwini Nanda and Qing Yang, 'Measurement, Analysis and Performance Improvement of the Apache Web Server', Proceedings of the 18th IEEE International Performance, Computing and Communication Conference, Phoenix/Scottsdale, Arizona, Feb., 1999 https://doi.org/10.1109/PCCC.1999.749447
  12. 정진국, 낭종호, 박성용, '다중 처리기 기반 웹 서버 구조의 실험적 분석', 정보과학회논문지 : 정보통신, 제28권 제1호, pp.22-36, 2001
  13. Philippe Joubert, Robert B. King, Rich Neves, Mark Russinovich, John M. Tracey, 'High-Performance Memory-Based Web Servers: Kernel and User-space Performance', Proceedings of the USENIX Annual Technical Conference, Boston, MA, Jun, 2001
  14. Vivek S. Pai, Peter Druschel and Willy Zwaenepoel, 'I/O Lite: A copy-free UNIX I/O system', 3rd UNENIX Symposium on Operating Systems Design and Implementation, New Orlenas, LA, Feb., 1999
  15. Eric Nahum, TsipoSra Barzilai, Dilip Kandlur, 'Performance Issues in WWW Servers', IEEE/ACM Transactions on Networking, 10(2):2-11, Feb., 2002 https://doi.org/10.1109/90.986497
  16. Open Market, 'FastCGI', http://www.fastcgi.com
  17. 이기용, 곽태영, 서정현, 김명호, '대규모 온라인 검색요구를 효율적으로 처리하기 위한 KRISTAL-II 웹 게이트웨이의 설계 및 구현', 정보처리학회논문지 : 컴퓨팅의 실제, 제6권 제5호, pp.496-504, 2000
  18. 이형봉, '유닉스 시스템에서 효율적인 CGI 게이트웨이', 정보과학회논문지 : 컴퓨팅의 실제, 제10권 제1호, pp.55-74, 2004
  19. W. Richard Stevens, 'Advanced Programming in the UNIX Environment', pp.132-133, Addison Wesley, 1992
  20. Digital UNIX, 'Reference Pages Section 3: Routines Volume 3', p.1-499-1-502, Digital Press, 1996
  21. Uresh Vahalla, 'UNIX Internals-the new frontiers', pp.437-471, Prentice Hall, 1996