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{\%}$ 이상 저하되는 최악의 경우가 관찰되었다.