How To Speedup Java Over 100% 자바하는 방법을 100 % 이상 고속
Java is used either for long running server side applications / application servers or for running short scripts. 서버 쪽 중 하나를 실행 오랫동안 자바를 사용 응용 프로그램 / 애플 리케이션 서버 또는 짧은 스크립트를 실행하기위한합니다. Let’s look at how you can speed-up both these type of applications. 수있는 방법에 대해 살펴보겠 속도 -을이 두 유형의 응용 프로그램을합니다.
How to speed-up server-side Java applications 하는 방법을 스피드 - 접속 서버 - 사이드 자바 애플 리케이션
It is very simple really. 그것은 매우 간단합니다 진짜. Just add -server after the java command like this: - 서버 이후에 추가 자바 명령을 이렇게 :
java -server HelloWorld 자바 - 서버 helloworld
Replace HelloWorld with your application name. 신청서와 함께 제출하실 helloworld 이름을 바꿉니다. That wasn’t so hard was it? 그리 어렵지 었죠?
How to speed-up client-side Java applications 속도 -을하는 방법을 클라이언트 - 사이드 자바 애플 리케이션
Download 다운로드 and install nailgun. NailGun의를 설치합니다. You may want to read the 을 읽을 할 수있습니다 quickstart guide 설명서 for details. 대한 자세한 내용은.
Nailgun is a simple application server which allows you to run Java programs rapidly through the server instance. NailGun의 응용 프로그램 서버는 간단한 자바 프로그램을 실행할 수있는 서버 인스턴스를 통해 급속하게합니다. The nailgun client (ng for linux and ng.exe for windows) is a small c program which works on both windows and linux platforms. the NailGun의 클라이언트 (ng.exe를 위해 리눅스 및 windows)가 작은 c 프로그램을 윈도우와 리눅스 플랫폼에서 모두 작동합니다. To run Java applications you just have to substitute ng (assuming it is in path) for java. 자바 응용 프로그램을 실행하기만하면 뉴스를 대체 (추측의 뜻이 경로)에 대한 자바합니다. ng reduces startup time by running programs from the same instance. 시동 시간을 줄일에서 실행중인 프로그램의 동일한 인스턴스를합니다. However it uses socket connection for communication which can be further optimized. 그러나 통신을 위해 소켓 연결을 사용 추가 수있는 최적화된합니다.
Let’s see how much ng improves the performance for simple client side applications. 어디 보자 어느 정도의 간단한 클라이언트 측 애플 리케이션의 성능을 향상시킵니다.
Here is a simple HelloWorld program I ran using java: 여기는 간단한 helloworld를 사용하여 프로그램을 봤는데 자바 :
[angsuman@jaguar project]$ time java HelloWorld Hello World! [angsuman @ 재규어 프로젝트] $ 타임 자바 helloworld 여러분, 안녕하세요! real 0m0.107s user 0m0.049s sys 0m0.012s 실제 0m0.049s 시스템 0m0.107s 사용자 0m0.012s
Here is the same program run using nailgun: 여기에 사용하는 프로그램이 실행은 동일합니다 NailGun의 :
[angsuman@jaguar project]$ time ../software/nailgun-0.7.1/ng HelloWorld Hello World! [angsuman @ 재규어 프로젝트] $ 시간 ../software/nailgun-0.7.1/ng helloworld 여러분, 안녕하세요! real 0m0.002s user 0m0.000s sys 0m0.001s 실제 0m0.000s 시스템 0m0.002s 사용자 0m0.001s
Can you see the difference? 의 차이보실 수 있습니까?
Here is the result of running helloworld in C (compiled with gcc): helloworld의 실행의 결과를 여기 c (컴파일 gcc) :
[angsuman@jaguar project]$ time ./hello Hello World! [angsuman @ 재규어 프로젝트] $ 시간. / 안녕 여러분, 안녕하세요! real 0m0.001s user 0m0.001s sys 0m0.001s 실제 0m0.001s 시스템 0m0.001s 사용자 0m0.001s
I am using: 나는를 사용하여 :
[angsuman@jaguar project]$ java -version java version “1.6.0_01″ Java(TM) SE Runtime Environment (build 1.6.0_01-b06) Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode) [angsuman @ 재규어 프로젝트] $ 자바 - 버젼 자바 버전 "1.6.0_01"자바 () 남동 런타임 환경 (빌드 1.6.0_01 - b06) 자바 핫스팟 () 서버 vm (빌드 1.6.0_01 - b06, 혼합 모드) The Java code is: the 자바 코드는 :
public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } } 공용 클래스 helloworld (공공 정적 무효 메인 (문자열 args []) (system.out.println ( "여러분, 안녕하세요!");)) The c code is: the c 코드 :
#include # 포함int main(void) { printf(”Hello World!\n”); } int 메인 (무효) (printf ( "여러분, 안녕하세요! \ n");)
Let’s finally put to rest the myth that “ 마지막으로 자신의 신화 나머지 봅시다 " Java is slow 자바가 느리 “. "합니다.
Filed under 밑에 Enterprise Software 엔터 프라이즈 소프트웨어를 , Headline News 헤드 라인 뉴스 , How To 하는 방법을 , Java Software 자바 소프트웨어 , Linux 리눅스 , Open Source Software 오픈 소스 소프트웨어 , Programming 프로그래밍 , Tech Note 기술 참고 사항 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |




August 29th, 2007 at 3:14 pm 2007년 8월 29일에서 오후 3시 14분
I downloaded Nailgun and tried out a little test and was impressed by the speed. NailGun의 다운로드를 시도 감명을 아웃의 속도가 약간을 테스트하고있습니다. I did have issues when I tried to run multiple clients through it at the same time. 나는 할 때 문제가 있다고해서 그것을 통해 여러 클라이언트를 실행하는 노력을 동시에합니다. When the first exited, they all did. 첫 번째 접속을 종료한 경우, 그들 모두는 한합니다. It looks like it is not supported anymore… Last build was Feb, 2005. 그런 것 같아 더 이상은 지원되지 않습니다 마지막으로 빌드는… 2월, 2005. Is there any similar alternatives out there? 비슷한 대안이있는가?
September 25th, 2007 at 7:11 am 2007년 9월 25일에서 오전 7시 11분
I can build one if there is sufficient demand. 나는 하나를 만들 수있는 충분한 수요있다면합니다.
March 13th, 2008 at 10:10 am 2008년 3월 13일에서 오전 10시 10분
It looks like it just speedups the startup time, but most of proffesional apps are started only once a month, so there is no speedup in that case. 것 같습니다 speedups 단지의 시작 시간, 그러나 proffesional 애플 리케이션의 대부분은 한 달에 한 번만을 시작, 그래서이 경우 고속가없습니다.
The same trick like for example in winamp agent. 예를 들어 윈앰프 에이전트처럼 동일한 마술을합니다.
But of course very nice idea for some small applications run by user to do small tasks. 물론 아주 좋은 아이디어를 사용자에게 약간의 작은 응용 프로그램을 운영하는 소규모 작업을 할합니다.