CKB:Improve performance for systems under high load: Unterschied zwischen den Versionen

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche
(Imported from text file)
 
Keine Bearbeitungszusammenfassung
Zeile 2: Zeile 2:


== Applies to: ==
== Applies to: ==
{{NoteBox|title=|content=All Versions of Cryptshare
{{NoteBox|title=|content=All Versions of Cryptshare}}
}}


== Purpose: ==
== Purpose: ==
Zeile 10: Zeile 9:


== Solution: ==
== Solution: ==
{{Panel|title=lauchner.ini|content='''1. Update Cryptshare Server'''<br /><br />{{TipBox{{!}}title={{!}}content=Since the performance improves with every new Cryptshare version, it is advisable to update to the latest version of Cryptshare<br />}}<br /><br />'''2. Check system hardware'''<br /><br />If your system is always under high load you need to increase the system hardware (CPU cores & RAM) of your Cryptshare Server.<br />{{InfoBox{{!}}title={{!}}content=Check your system performance with the following commands:<br />Windows: open '''task manager''' and switch tab to performance<br />Linux: enter command '''htop'''<br />}}<br /><br />'''If you are running you Cryptshare Server on a virtual appliance it is also advisable to set up hardware version to the latest version!  <br />  <br />'''[[File:51971899.png]]<br />[[File:51971904.png]]<br /><br />'''3. Assign more memory to Cryptshare application'''<br /><br />The Cryptshare Application uses 25% of your system memory for default.<br />To set-up more memory (at least 50%) for Cryptshare Application follow these steps:<br /># open '''launcher.ini''' (/opt/cryptsahre-3/launcher.ini) with text editor<br /># Add the Xms flag to the launcher.ini file: '''-Xms<size>  <br />vm.arg.<number>=-Xms<size>'''<br /># Add the Xmx flag to the launcher.ini file: '''-Xmx<size>  <br />vm.arg.<number>=-Xmx<size>'''<br /># restart the Cryptshare Service/Daemon '''rccryptshare restart'''<br />{{InfoBox{{!}}title=Example{{!}}content=If your system has 8GB memory and you want use 50% (4GB) for Cryptshare Application enter the following values:<br /> '''lauchner.ini'''<br /> <br /> vm.arg.1=-Xms4G<br /> vm.arg.2=-Xmx4G<br />}}<br /><br />'''4. Change Guest OS settings'''<br /><br />For Cryptshare Server running on vSphere the Guest OS settings should be set to the newest version provided by your vSphere<br />[[File:51971901.png]]<br />[[File:51971902.png]]<br />[[File:51971903.png]]<br /><br />'''5. Adjust the Web Server Configuration'''<br /><br />The configuration file "resources/WEB-INF/ui-config.xml" in the Cryptshare Server installation directory can be used to adjust how the web server behaves, the following section includes comments to highlight the options that can be adjusted to improve performance under high load. You can find the full documentation for the configuration file in the [http://www.eclipse.org/jetty/documentation/current/reference-section.html#jetty-xml-syntax Jetty Wiki].  <br />'''ui-config.xml'''<br /><br />{{{!}} class="wikitable"<br />{{!}}-<br />{{!}}1  <br />2  <br />3  <br />4  <br />5  <br />6  <br />7  <br />8  <br />9  <br />10  <br />11  <br />12  <br />13  <br />14  <br />15  <br />16  <br />17  <br />18  <br />19  <br />20  <br />21  <br />22  <br />23  <br />24  <br />25  <br />26  <br />27  <br />28  <br />29  <br />30  <br />31  <br />32  <br />33  <br />34  <br />35  <br />36  <br />37  <br />38  <br />39<br /><br />{{!}}`<?``xml` `version``=``"1.0"` `encoding``=``"UTF-8"``?>`  <br />`<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "resources/WEB-INF/configure.dtd">`  <br />`<``Configure` `id``=``"Cryptshare"` `class``=``"org.eclipse.jetty.server.Server"``>`  <br /> `<``Arg` `name``=``"threadpool"``>`  <br /> `<``New` `class``=``"org.eclipse.jetty.util.thread.QueuedThreadPool"``>`  <br /> `<``Arg` `name``=``"minThreads"` `type``=``"int"``>5</``Arg``>`  <br /> `<``Arg` `name``=``"maxThreads"` `type``=``"int"``>25</``Arg``>` `<!-- OPTION: If a lower value is set, the maximum amount of requests the web server will process is reduced. This will cause the server to handle fewer request but be more responsive. -->`  <br /> `<``Arg` `name``=``"idleTimeout"` `type``=``"int"``>1000</``Arg``>`  <br /> `<``Arg` `name``=``"queue"``>`  <br /> `<``New` `class``=``"java.util.concurrent.ArrayBlockingQueue"``>`  <br /> `<``Arg` `type``=``"int"``>200</``Arg``>` `<!-- OPTION: If a lower value is set, the server will accept less requests while all threads are used. This will cause the server to handle fewer request but be more responsive. -->`  <br /> `</``New``>`  <br /> `</``Arg``>`  <br /> `</``New``>`  <br /> `</``Arg``>`  <br /> `<!-- [...] -->`  <br /> `<``Call` `name``=``"addConnector"``>`  <br /> `<``Arg``>`  <br /> `<``New` `class``=``"org.eclipse.jetty.server.ServerConnector"``>`  <br /> `<!-- [...] -->`  <br /> `<``Set` `name``=``"idleTimeout"``>`  <br /> `<``Property` `name``=``"http.timeout"` `default``=``"15000"``/>` `<!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total server load. -->`  <br /> `</``Set``>`  <br /> `<!-- [...] -->`  <br /> `</``New``>`  <br /> `</``Arg``>`  <br /> `</``Call``>`  <br /> `<``Call` `id``=``"sslConnector"` `name``=``"addConnector"``>`  <br /> `<``Arg``>`  <br /> `<``New` `class``=``"org.eclipse.jetty.server.ServerConnector"``>`  <br /> `<!-- [...] -->`  <br /> `<``Set` `name``=``"idleTimeout"``>`  <br /> `<``Property` `name``=``"http.timeout"` `default``=``"15000"``/>` `<!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total server load. -->`  <br /> `</``Set``>`  <br /> `<!-- [...] -->`  <br /> `</``New``>`  <br /> `</``Arg``>`  <br /> `</``Call``>`  <br />`</``Configure``>`<br />{{!}}}<br /><br />Additionally, other settings of the Cryptshare Server can be adjusted to improve responsiveness as described here: [https://wiki.cryptshare.com/display/CSM/Advanced+Cryptshare+Configuration Advanced Cryptshare Configuration]
===1. Update Cryptshare Server===
{{TipBox|title=|content=Since the performance improves with every new Cryptshare version, it is advisable to update to the latest version of Cryptshare}}
 
===2. Check system hardware===
If your system is always under high load you need to increase the system hardware (CPU cores & RAM) of your Cryptshare Server.
{{InfoBox|title=|content=Check your system performance with the following commands:<br />Windows: open '''task manager''' and switch tab to performance<br />Linux: enter command '''htop'''
}}
}}
'''If you are running you Cryptshare Server on a virtual appliance it is also advisable to set up hardware version to the latest version!<br />
'''[[File:51971899.png]]
[[File:51971904.png]]
===3. Assign more memory to Cryptshare application===
The Cryptshare Application uses 25% of your system memory for default.<br />To set-up more memory (at least 50%) for Cryptshare Application follow these steps:
# open '''launcher.ini''' (/opt/cryptsahre-3/launcher.ini) with text editor
# Add the Xms flag to the launcher.ini file: '''-Xms<size>  <br />vm.arg.<number>=-Xms<size>'''
# Add the Xmx flag to the launcher.ini file: '''-Xmx<size>  <br />vm.arg.<number>=-Xmx<size>'''
# restart the Cryptshare Service/Daemon '''rccryptshare restart'''
{{InfoBox|title=Example|content=If your system has 8GB memory and you want use 50% (4GB) for Cryptshare Application enter the following values:<br /> '''lauchner.ini'''<br /> <br /> vm.arg.1=-Xms4G<br /> vm.arg.2=-Xmx4G<br />}}
===4. Change Guest OS settings===
For Cryptshare Server running on vSphere the Guest OS settings should be set to the newest version provided by your vSphere<br />[[File:51971901.png]]<br />[[File:51971902.png]]<br />[[File:51971903.png]]
===5. Adjust the Web Server Configuration===
The configuration file "resources/WEB-INF/ui-config.xml" in the Cryptshare Server installation directory can be used to adjust how the web server behaves, the following section includes comments to highlight the options that can be adjusted to improve performance under high load. You can find the full documentation for the configuration file in the [http://www.eclipse.org/jetty/documentation/current/reference-section.html#jetty-xml-syntax Jetty Wiki].
'''ui-config.xml'''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "resources/WEB-INF/configure.dtd">
<Configure id="Cryptshare" class="org.eclipse.jetty.server.Server"> 
<Arg name="threadpool">
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Arg name="minThreads" type="int">5</Arg>
<Arg name="maxThreads" type="int">25</Arg> <!-- OPTION: If a lower value is set, the maximum amount of requests the web server will process is reduced. This will cause the server to handle fewer request but be more responsive. -->
<Arg name="idleTimeout" type="int">1000</Arg>
<Arg name="queue">
<New class="java.util.concurrent.ArrayBlockingQueue">
<Arg type="int">200</Arg> <!-- OPTION: If a lower value is set, the server will accept less requests while all threads are used. This will cause the server to handle fewer request but be more responsive. -->
</New>
</Arg>
</New>
</Arg>
[...]
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ServerConnector">
  [...]
<Set name="idleTimeout">
<Property name="http.timeout" default="15000"/> <!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total
server load. -->
</Set>
[...]
  </New>
</Arg>
</Call>
<Call id="sslConnector" name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ServerConnector">
[...]
<Set name="idleTimeout">
<Property name="http.timeout" default="15000"/> <!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total server load. -->
</Set>
[...]
</New>
</Arg>
</Call>
</Configure>
Additionally, other settings of the Cryptshare Server can be adjusted to improve responsiveness as described here: [[CSSCurrent_en:Advanced_Configuration|Advanced Cryptshare Configuration]]

Version vom 30. Dezember 2022, 14:24 Uhr


Applies to:

All Versions of Cryptshare

Purpose:

If your Cryptshare Server is highly frequented it is sometimes necessary to improve the performance of the server.


Solution:

1. Update Cryptshare Server

Since the performance improves with every new Cryptshare version, it is advisable to update to the latest version of Cryptshare

2. Check system hardware

If your system is always under high load you need to increase the system hardware (CPU cores & RAM) of your Cryptshare Server.

Check your system performance with the following commands:
Windows: open task manager and switch tab to performance
Linux: enter command htop

If you are running you Cryptshare Server on a virtual appliance it is also advisable to set up hardware version to the latest version!
51971899.png 51971904.png

3. Assign more memory to Cryptshare application

The Cryptshare Application uses 25% of your system memory for default.
To set-up more memory (at least 50%) for Cryptshare Application follow these steps:

  1. open launcher.ini (/opt/cryptsahre-3/launcher.ini) with text editor
  2. Add the Xms flag to the launcher.ini file: -Xms<size>
    vm.arg.<number>=-Xms<size>
  3. Add the Xmx flag to the launcher.ini file: -Xmx<size>
    vm.arg.<number>=-Xmx<size>
  4. restart the Cryptshare Service/Daemon rccryptshare restart
Example
If your system has 8GB memory and you want use 50% (4GB) for Cryptshare Application enter the following values:
lauchner.ini

vm.arg.1=-Xms4G
vm.arg.2=-Xmx4G

4. Change Guest OS settings

For Cryptshare Server running on vSphere the Guest OS settings should be set to the newest version provided by your vSphere
51971901.png
51971902.png
51971903.png

5. Adjust the Web Server Configuration

The configuration file "resources/WEB-INF/ui-config.xml" in the Cryptshare Server installation directory can be used to adjust how the web server behaves, the following section includes comments to highlight the options that can be adjusted to improve performance under high load. You can find the full documentation for the configuration file in the Jetty Wiki.

ui-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "resources/WEB-INF/configure.dtd">
<Configure id="Cryptshare" class="org.eclipse.jetty.server.Server">  
	<Arg name="threadpool">
		<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
			<Arg name="minThreads" type="int">5</Arg>
			<Arg name="maxThreads" type="int">25</Arg> 
			<Arg name="idleTimeout" type="int">1000</Arg>
			<Arg name="queue">
				<New class="java.util.concurrent.ArrayBlockingQueue">
					<Arg type="int">200</Arg> 
				</New>
			</Arg>
		</New>
	</Arg>

	[...]

	<Call name="addConnector">
		<Arg>
			<New class="org.eclipse.jetty.server.ServerConnector">
 				[...]
	 			<Set name="idleTimeout">
					<Property name="http.timeout" default="15000"/> 
				</Set>
				[...]
 			</New>
		</Arg>
	</Call>
	<Call id="sslConnector" name="addConnector">
		<Arg>
			<New class="org.eclipse.jetty.server.ServerConnector">
			[...]
			<Set name="idleTimeout">
				<Property name="http.timeout" default="15000"/> 
			</Set>
			[...]
			</New>
		</Arg>
	</Call>
</Configure>

Additionally, other settings of the Cryptshare Server can be adjusted to improve responsiveness as described here: Advanced Cryptshare Configuration