How To Speedup Java Over 100%スピードアップする方法をジャワ100 %を超える
Java is used either for long running server side applications / application servers or for running short scripts.長い間のいずれかのJavaが使用されサーバー側で実行中のアプリケーション/アプリケーションサーバーやスクリプトの実行をショートします。 Let’s look at how you can speed-up both these type of applications.方法について見てみましょうスピードアップすることができます。両方のタイプのアプリケーションに最適です。
How to speed-up server-side Java applicationsスピードアップする方法をサーバー側のJavaアプリケーション
It is very simple really.本当にこれは非常に簡単です。 Just add -server after the java command like this:サーバーだけを追加した後、 javaコマンドのようなこの:
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スピードアップする方法をクライアント側のJavaアプリケーション
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のは、単純なアプリケーションサーバーのJavaプログラムを実行することを可能にするサーバーインスタンスを通じて急速にします。 The nailgun client (ng for linux and ng.exe for windows) is a small c program which works on both windows and linux platforms.のNailGunのクライアント( ng.exeのLinuxおよびWindowsの場合)は、小さなCプログラムをWindowsおよびLinuxプラットフォームの両方で動作します。 To run Java applications you just have to substitute ng (assuming it is in path) for java. Javaアプリケーションを実行するのを代用するしかない(と仮定のことはパス) 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 @ジャガープロジェクト] $時間Javaの世界のHelloWorldハロー! real 0m0.107s user 0m0.049s sys 0m0.012sリアル0m0.107sユーザー0m0.049sシステム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.002sユーザー0m0.000sシステム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 @ジャガープロジェクト] $ JavaのバージョンのJavaバージョン" 1.6.0_01 " Javaの( ) seランタイム環境(ビルド1.6.0_01 - b06 ) Javaのホットスポット( )サーバVM (ビルド1.6.0_01 - b06 、混在モード) The Java code is: Javaのコードは:
public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } }パブリッククラスのHelloWorld (公共の静的な無効メイン(文字列args [ ] ) ( system.out.println ( " Hello World ! "を) ; ) ) The c code is:のCコードは:
#include #含まれてint main(void) { printf(”Hello World!\n”); } intメイン(無効) ( printf ( "こんにちは世界! \ n " ) ; )
Let’s finally put to rest the myth that “レッツ最後に置くことを残りの神話" Java is slow Javaは遅い “. "です。
Filed under提出されて Enterprise Softwareエンタープライズソフトウェア , 、 Headline Newsニュースの見出し , 、 How Toどのように , 、 Java Software Javaソフトウェア , 、 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 pmの
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.それは次のようではないのビルドはサポートされていません…最終更新02月、 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.私は1つの場合には十分な需要をビルドします。
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.たとえば、同じようなトリックでWinampのエージェントです。
But of course very nice idea for some small applications run by user to do small tasks.しかしもちろん、非常にニースアイデアをいくつかの小さなアプリケーションを実行されるユーザこれを行うに小さなタスクです。