faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
faq [2020/07/14 15:13]
jrutte02 removed
— (current)
Line 1: Line 1:
-====== Frequently Asked Questions ====== 
  
-===== Java ===== 
- 
-To run Java on Mogon, you need to reserve **much** more memory than you think. 
-==== Memory ==== 
-E.g. even for just calling ''​java -version''​ with a specified maximum heap size (1GB in this example), you need to use the ''​Reserve5G''​ application profile or Java won't start. 
-<code bash> 
-$ bsub -app Reserve5G -n 1 -q short java -Xmx1G -version 
-</​code>​ 
-Note that for larger heap sizes, you just need to keep the offset large enough. For example, the "​Reserve10G"​ profile is usually large enough to support a heap size of 5GB. 
-==== CPU ==== 
-As Java creates additional threads for JVM maintainance (e.g. garbage collection) it is advisable to reserve an additional core for the Java overhead. I.e., if you have a single-threaded Java application,​ you should reserve a second CPU slot by using the //-n 2// option. 
-However, note that memory reserved via an //-app// profile is allocated per CPU slot, so you would end up reserving twice the memory you need. 
-To reserve two CPU cores and 10 GB of total memory for a single process java program, you could reserve the total memory with the //M// option (in KB) and use the //-R rusage// option to specify that each process will nead 5 GB (written in MB) of memory. The //span// option makes sure both CPU slots are on the same machine. 
-<code bash> 
-bsub -n 2 -M 10485760 -R rusage[mem=5120] -R span[hosts=1] java -jar job.jar 
-</​code>​ 
- 
-===== TMPDIR ===== 
-See [[local_scratch#​setting_tmpdir_without_batch_script]]