iWiz ShareBase

IT Specialist À±ÅÂÇöÀÇ iWiz ShareBase´Â IT»Ó ¾Æ´Ï¶ó °¢Á¾ Àâ´ÙÇÑ Áö½ÄµéÀ» ÇÔ²² ³ª´©´Â Áö½Ä°øÀ¯ Ä¿¹Â´ÏƼÀÔ´Ï´Ù.

iWiz,ShareBase,À±ÅÂÇö,Java,JSP,EJB,IT,Á¤º¸±â¼ú,À¥ÇÁ·Î±×·¡¹Ö,PHP,ASP,DBMS,MySQL,¼­¹ö,³×Æ®¿öÅ©,server,network,WAS,À¥¾ÖÇø®ÄÉÀ̼Ç,ºí·Î±×,blog,À¥¼­¹ö,DB,¿À¶óŬ,oracle,mysql,JRun,À¥·ÎÁ÷,ÅèĹ,tomcat,¾ÆÆÄÄ¡,ÀÚµ¿Â÷,EF½î³ªÅ¸,·Î¶Ç 6/45

°¶·¯¸® Pixelgrapher.com | ·Î¶Ç 6/45 ¹øÈ£»ý¼º ¹× Åë°è µ¥ÀÌÅÍ | Àüü±â»çº¸±â | Àüü±Û #1 | Àüü±Û #2 | Àüü±Û #3 | Àüü±Û #4 | Àüü±Û #5 | Àüü±Û #6 | Àüü±Û #7 | Àüü±Û #8 | Àüü±Û #9 | Àüü±Û #10 |
HOME iWiz
ShareBase
Remember 0523 & 0818
Áö½ÄÀº ³ª´­¼ö·Ï Ä¿Áý´Ï´Ù - iWiz's ShareBase
À¥ÇÁ·Î±×·¡¹Ö(±âŸ) PHP, ASP, Perl, CGI µî °¢Á¾ À¥ÇÁ·Î±×·¡¹Ö¿¡ °üÇÑ ÀÚ·áµéÀÔ´Ï´Ù.


  iWiz(2004-01-04 22:38:20, Hit : 13015, Vote : 37
 http://www.wz.pe.kr

Optimizing the web application environment


Optimizing the web application environment

This section provides some ideas for improving the operating environment of JRun for your web application.

Optimizing session settings

Session objects are stored in memory on the server and referenced with a session ID that is passed back and forth between the client and the server. Because they are stored in memory, each session uses a small amount of system resources.

The following table describes session settings that you can change to reduce resource load:
Setting
Description
Maximum Sessions
The number of sessions JRun caches in memory before swapping them out to disk. To prevent JRun from serializing session objects, increase the number of sessions you cache in memory.
You set this value in the jrun-web.xml file.
Maximum Inactive Interval (MaxAge)
The amount of time before JRun destroys an inactive session object. The default is 1800 seconds (30 minutes). Decrease this time to clear unused sessions sooner.
If you are using cookies as the state-management mechanism, you can set the maximum age programmatically (with the cookie.setMaxAge method) or declaratively, in the jrun-web.xml file.

For more information on changing session settings, see "Working with sessions".

Disabling hot deployment

The hot deploy feature automatically restarts (redeploys) a running web component upon detection of changes to the component structure.

When hot deploy is enabled, JRun periodically checks the date/time stamps of all the resources to determine if the files have changed. This constant cycling uses up a small amount of system resources.

To disable hot deploy, add the following attribute to the jrun.deployment.DeployerService service in the jrun_root/servers/server_name/SERVER-INF/jrun.xml file:

<attribute name="hotDeploy">false</attribute>

Note:   You must always disable hot deployment on production servers.

Managing the thread pool

Part of configuring the connector between JRun and an external web server is optimizing the concurrency settings. Concurrency defines how HTTP requests are pooled and distributed. By changing these settings, you can limit the number of threads and requests that each JRun server processes. In effect, you can throttle the traffic for that JRun server.

If, for example, the average response time of your web application is slow because of a three-step RMI-CORBA-database transaction, then your site might need to queue up many more requests to maintain throughput without refusing any new requests. In this case, you should increase the maximum concurrent requests to a value greater than the number of expected requests. The maximum concurrent requests setting acts as a safety valve for resources.

Note:   Remember that "concurrent requests" and "concurrent users" are two distinct concepts.A website that must support 1000 concurrent users does not also need to support 1000 concurrent requests, since 1000 users will likely create only a fraction of that number of requests at one time.

The following table describes the settings with which you can configure concurrency settings for the connection to your web server:
Name
Description
Default
ActiveHandlerThreads
The initial size of the handler thread pool.
10
Backlog
The number of concurrent requests that are accepted before new requests are denied. (Previously known as Maximum Concurrent Requests.)
1000
MaxHandlerThreads
The number of concurrent requests that are accepted before new requests are queued.
If your application requires more than the default concurrent users, and you have enough CPU power, you can increase the MaxHandlerThreads value to improve performance.
20
MinHandlerThreads
The minimum number of handler threads in the pool.
In an environment where your website experiences spikes in traffic, set the MinHandlerThreads value higher so that a group of threads do not have to be created during a spike.
You can also set MinHandlerThreads value to the expected steady state load of concurrent requests. For example, if a website has 80 concurrent requests at all times, then set the MinHandlerThreads to 80.
1
Timeout
The idle thread time out, which is the number of seconds that threads remain idle before being destroyed.
300

To change concurrency settings, add the properties to the appropriate service in the jrun.xml file with the new values, as shown in the following example:

<service class="jrun.servlet.http.WebService" name="WebService">
 ...
 <attribute name="minHandlerThreads">80</attribute>
 ...
</service>

To edit the JRun web server's settings, change the attributes of the WebService. To edit the external web server connector settings, change the attributes of the ProxyService.

Note:   Before changing any of the default JRun concurrency settings, be sure that the traffic patterns are truly observable. Arbitrarily changing settings can waste resources. For more information on load-testing web applications, see the resources in "Other resources".

Trying different JVMs

Reusing and caching objects saves memory and CPU cycles associated with JVM garbage collection and object allocation. Object allocation takes CPU cycles and memory. Garbage collecting unreferenced objects requires suspension of all other threads in the JVM while the garbage collector threads run, which slows down an application.

Choosing a JVM can make a big difference in performance of your web applications. Sun Microsystems' HotSpot Server VM and Appeal's JRockit use advanced algorithms like generational garbage collection, which reduce the runtime duration of the garbage collection threads.

You should run load tests under different environments to determine which operating system/JVM combination is best for your particular web application.

Increasing the heap size of JVMs

Changing the memory settings of your JVM can increase performance of your JRun server. Before you make adjustments, though, you must know how much memory your application requires. Perform a load test on your application and display the heap size.

Set the JVM's minimum (or initial) heap size to the highest value (memory consumption) during load testing. Also, set the maximum heap size value to something less than the total memory available, minus other required resources, but choose the highest possible value. If the maximum heap size is set to the default value in the JDK that you are using (usually 128MB), but you exceed the maximum value, "OutOfMemory" errors can occur.

To set the maximum heap size value, edit the Max Heap Size (MB) field on the JVM Settings panel of the JMC. You can change other settings by adding command-line arguments to the VM Arguments field on the same panel.

The following table describes some possible arguments. These arguments depend on which JVM you are using.
Argument
Description

-Xms<value>

Initial (minimum) value of the Java heap size.

-Xmx<value>

Maximum value of the Java heap size.

-Xss<value>

Value of the Java thread stack size.

For optimal performance, set the minimum and maximum heap size to the same value. This eliminates the need for incremental increases by the JRun process.

For more information, see your JVM's documentation.

Reducing logging activities

While log files are useful tools for debugging and tracking usage of your web applications, the overhead required to generate substantial log files can be noticeable. For this reason, consider turning off logging in your production applications and instead using your web server's logs as a source of information.

To turn off logging in JRun, set the LoggerService attributes to false in the /jrun_root/servers/server_name/SERVER-INF/jrun.xml file, as shown in the following example:

...
<service class="jrunx.logger.LoggerService" name="LoggerService">
...
  <attribute name="errorEnabled">false</attribute>
  <attribute name="warningEnabled">false</attribute>
  <attribute name="infoEnabled">false</attribute>
  <attribute name="debugEnabled">false</attribute>
  <attribute name="metricsEnabled">false</attribute>
...
</service>
...

Verbose database logging is off by default. If you turned it on while developing your web application, turn it off by editing the appropriate data source in the jrun-resources.xml file and setting the debugging element's value to false.

* iWiz´Ô¿¡ ÀÇÇØ¼­ °Ô½Ã¹° À̵¿µÇ¾ú½À´Ï´Ù (2010-02-03 16:57)



62   mod_throttle ¸ðµâÀ» ÀÌ¿ëÇÑ »ç¿ëÀÚ Æ®·¡ÇÈ Á¦¾î  iWiz 2006/06/22 8911 0
61   Tomcat-Apache using JK2 connector  iWiz 2004/03/21 6503 41
60   RedHat 9.0¿¡¼­ÀÇ JRun JSP ÄÄÆÄÀÏ·¯ÀÇ ¹®Á¦Á¡  iWiz 2004/01/04 5382 50
59   RedHat 9.0¿¡¼­ÀÇ JRun-Apache Ä¿³ØÅÍÀÇ ¹®Á¦Á¡  iWiz 2004/01/04 5064 48
58   JRun 4.0ÀÇ Æ©´× °ü·Ã ¿É¼Ç  iWiz 2004/01/04 5811 68
57   JRun 4.0ÀÇ Activity ¸ð´ÏÅ͸µ ¹æ¹ý  iWiz 2004/01/04 4786 57
56   JRun4.0: DataSource Ä¿³Ø¼ÇÇ® °ü·Ã ¿É¼Ç [4]  iWiz 2004/01/04 6532 46
55   JRun¿¡¼­ JSP ÄÄÆÄÀϽà java ÆÄÀÏ »ý¼ºÇÏ±â  iWiz 2004/01/04 7916 63
54   JRunÀÇ ½ÇÁ¦ ¼­ºñ½º ¿î¿µ½Ã °í·Á»çÇ×  iWiz 2004/01/04 6194 44
53   ¼öÁ¤µÈ ÀÎÅÍ³Ý ÀͽºÇ÷η¯¿¡¼­ »óÈ£ÀÛ¿ë ActiveX ÄÁÆ®·Ñ Ȱ¼ºÈ­ °¡ÀÌµå  iWiz 2006/03/03 8226 4
52   HTML Ư¼ö±âÈ£ ¿£ÅÍÆ¼(Entity) Å×À̺í [2]  iWiz 2006/03/03 13887 2
51   À¥»çÀÌÆ®ÀÇ »õ·Î¿î Çõ¸í Ajax [13]  iWiz 2005/11/22 5724 6
50   MSN ¸Þ½ÅÀú Ä£±¸ ÀÚµ¿µî·Ï ½ºÅ©¸³Æ®  iWiz 2004/10/12 6069 35
49   JavaScript MD5 ÇØ½¬ »ý¼º ÇÔ¼ö  iWiz 2004/01/07 8886 35
48   JavaScript·Î ¸¸µç Áø¹ýº¯È¯ ¹× º¸¼ö°è»ê±â [4]  iWiz 2004/01/04 157949 51

1 [2][3][4][5]
 

Copyright 1999-2023 Zeroboard / skin by zero
iWiz ShareBase, ¨ÏCopyleft by iWiz.  For more information contact .
º» À¥»çÀÌÆ®¿¡ °Ô½ÃµÈ À̸ÞÀÏ ÁÖ¼Ò°¡ ÀüÀÚ¿ìÆí ¼öÁý ÇÁ·Î±×·¥À̳ª ±× ¹ÛÀÇ ±â¼úÀû ÀåÄ¡¸¦ ÀÌ¿ëÇÏ¿© ¹«´ÜÀ¸·Î ¼öÁýµÇ´Â °ÍÀ» °ÅºÎÇϸç, À̸¦ À§¹Ý½Ã¿¡´Â Á¤º¸Åë½Å¸Á¹ý¿¡ ÀÇÇØ Çü»çó¹úµÊÀ» À¯³äÇϽñ⠹ٶø´Ï´Ù. [°Ô½ÃÀÏ 2004. 1. 31]