Whenever you are getting the error for trying to access particular function via stored procedure, and you get the error, most probably the CurrentFunctionPath does not include the valid (or contains not enough) schema names.
The CurrentFunctionPath is a property, and can contain one or more schema names, separated by commas and enclosed in double quotation marks. Also, the order of the defined schemas determines the orders in which the function and procedure names are resolved.
The default value is the default CURRENT PATH (or CURRENT_PATH) special register setting at the database server.
Blog about middleware/ weblogic/ websphere hidden gems, problems and solutions, security issues and hacks
Most Popular Posts
-
TL;DR Servlet - html in java JSP - java in html Details: JSP (Java Server Pages) are pages that contain Java code tha...
-
How to disable remote shutdown in Tomcat Examples: change the port number from default to different one (not recommended) chang...
Showing posts with label jvm. Show all posts
Showing posts with label jvm. Show all posts
27/08/2013
Garbage Collectors - IBM JVM
TL;DR
-Xgcpolicy:gencon (default in V8)-Xgcpolicy:optthruput (previously default)
-Xgcpolicy:optavgpause
-Xgcpolicy:balanced
Details:
Garbage collector in IBM JVM, just as other GCs collects unused, dead, objects from the heap in order to recover some memory so it is able to allocate new objects on the heap. IBM JVM provides several GC algorithms:
Read more on:
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.60%2Fdiag%2Fappendixes%2Fcmdline%2Fcommands_gc.html
-Xgcpolicy:gencon (default in V8)-Xgcpolicy:optthruput (previously default)
-Xgcpolicy:optavgpause
-Xgcpolicy:balanced
Details:
Garbage collector in IBM JVM, just as other GCs collects unused, dead, objects from the heap in order to recover some memory so it is able to allocate new objects on the heap. IBM JVM provides several GC algorithms:
- -Xgcpolicy:gencon
- Unused objects are removed, and the survivors are allocated in survivor spaces. After some time it is promoted to the Tenure space.
- -Xgcpolicy:optthruput (previously default)
- This algorithm works as MSC (Mark-Sweep-Compact). This means in the first run collector marks live objects, in the second run sweeps unused objects, and compacts the free space. This is being done in parallel. MSC process differs between different JVMs.
- -Xgcpolicy:optavgpause
- This policy can be used when the application can't tolerate long pauses in exchange for overall throughput. System tries to determine when next GC would be needed and then runs concurrent GC. before allocating new objects, some GC would be done.
- -Xgcpolicy:balanced
- This is a new in V8 collector policy. different regions of a heap map are dealt individually. More information soon
Read more on:
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.60%2Fdiag%2Fappendixes%2Fcmdline%2Fcommands_gc.html
19/04/2013
JVM 64-bit OutOfMemory / Compressed references
If you are running on 64-bit OS and JRockit JVM 64-bit has the heap < 4GB in size and you experience OutOfMemory errors, try disabling compressed references by using the following option in your scripts:
where 1/true stands for enabling the option.
-XXcompressedRefs[=[true|1|false|0]]
or
-XXcompressedRefs:parameter=value
where 1/true stands for enabling the option.
You can also use the following format, when using different heap sizes:
-XXcompressedRefs:enable=true
or
What compressed references does, it limits all pointers (to classes, objects, threads) stored on the heap to 32bits, hence less usage of the heap.
-XXcompressedRefs:size=4GB for Xmx <=2g
-XXcompressedRefs:size=32GB for Xmx <=25g
-XXcompressedRefs:size=64GB for Xmx <=57g
What compressed references does, it limits all pointers (to classes, objects, threads) stored on the heap to 32bits, hence less usage of the heap.
Labels:
4gb,
64-bit,
compressed,
heap,
jrockit,
jvm,
references,
xxcompressedrefs
18/04/2013
Define Heap Size/ Memory management
Define Heap Size/ Memory management
HotSpot
|
JRockit
|
Function
|
|
-Xmx:[size]
|
Xmx sets
the maximum size of the heap. Maximum value should be the maximum available,
but in such a way that it does not cause any error, or about 75% of the
system physical memory (depends on the OS).
|
||
-Xms:[size]
|
Xms sets the minimum & initial size of the heap.
Recommended to set the same value as the Xmx to minimize allocation
overhead of the heap.
|
||
-Xmn,
-XXNewSize, -XXMaxNewSize
|
-Xns
|
Xns sets
the size of the Young/ Nursery generation heap. This is the place where new
objects land in the first place before being promoted to the other space.
XX:NewSize - Use this option to set the
New generation Java heap size. Can be set to be one-fourth the size of the
maximum heap size. Increase the value of this option for larger numbers of
short-lived objects.
-XX:MaxNewSize
- Use this option to set the maximum New
generation Java heap size.
|
|
-verbose:gc
|
-Xverbose:memory
|
Prints
the additional information
|
|
-XX:+AggressiveHeap
|
XXaggressive:memory
|
Configures
the memory system for memory-intensive workloads and sets an expectation to
enable large amounts of memory resources to ensure high throughput. The
JRockit JVM will also use large pages, if available.
|
|
XX:+UseConcMarkSweepGC
|
Xgc:singlecon
|
Sets the
garbage collector to use a concurrent strategy
|
|
XX:+UseParallelGC
|
Xgc:parallel
|
Sets the
garbage collector to use a parallel strategy
|
|
|
Specifies
what to prioritize: even pause times or maximum throughput
|
||
|
Specifies
a suitable pause time for the application
|
||
-XX:MaxPermSize
|
Define
Maximum heap for the Perm Genaration.
.
(Permanent generation) (non-heap) Stores
classes, methods and other meta data
|
||
Other settings:
- -Xss - If the thread stack size (-Xss) has not been set the default value depends on the threading system and the platform you are running on. When using thin threads the minimum thread stack size is 8 kilobytes and the default is 64 kilobytes. When using native threads the minimum thread stack size is 16 kilobytes. For Windows the default thread stack size when using native threads is 64 kilobytes and for Linux it is 128 kilobytes.
- -XX:SurvivorRatio - The New generation area is divided into several sub-areas: Eden, Survival Space I and Survival Space II. Use the -XX:SurvivorRatio=X option to configure the ratio of the Eden/Survivor Space size. When it is 1:x Eg., -XX:SurvivorRatio=6 - each survivor space will be 1/8 the young generation).
- –XX:NewRatio=n is used divide heap into old and new generation. If we use. -- XX:NewRatio=5, then you create an old-to-new ratio of 5:1; the old generation occupies 5/6 of the heap while the new generation occupies 1/6 of the heap (-XX:NewRatio=3 - the young generation will occupy 1/4 the overall heap).
Tables were taken from the Oracle website, and changed to suit the blog.
JRockit vs HotSpot JVM Difference
Jrockit was developed by Appeal Virtual Machines and acquired by BEA Systems, and later on acquired by Oracle.
HotSpot is a Java Virtual Machine (JVM) currently hold by Oracle Corporation.
JRockit is based on the HotSpot JVM by Sun Microsystems, and now Oracle. It has been developed in order to make HotSpot more reliable, and faster to used in server side environment. Jrockit has a slightly bit different heap organisation, garbage collector methods, and optimisations. More information about GC for HotSpot can be found here.
Although JRockit is supposed to have more optimised functions, it is not the rule. Some applications might run faster under HotSpot, and some can be tuned more for JRockit. You don't know it until you try it :)
Additional information:
http://stackoverflow.com/questions/8068717/jrockit-jvm-versus-hotspot-jvm
http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html
Garbage Collectors - JRockit
TL;DR
- Dynamic (default one)
- Throughput – for maximum throughput (default): –XgcPrio:throughput
- Pausetime – for short and even pause times: –XgcPrio:pausetime
- Deterministic – for very short and deterministic pause times (requires Oracle JRockit Real Time)
- Static (1x Generational, 2x Concurrent, 1x Parallel)
- Generational
- Generational Copy: -Xgc:gencopy
- Concurrent
- Single-spaced mostly concurrent: –Xgc:singlecon
- Generational mostly concurrent: –Xgc:gencon
- Parallel
- General parallel: –Xgc:genpar
Details:
Static:
- Generational Copy:
- best to use with small heap and for testing purposes
- splits heap into generations
- Generational parallel collector:
- causes longer pauses/ stop-the-world
- multiple threads to speed up the process
- segments the heap into nursery and tenured generations (objects that survive two cycles are promoted from nursery to tenured generation)
- use when the application has many short lived objects
- Concurrent:
- Single-spaced mostly concurrent collector:
- almost no pauses
- works concurrently
- uses entire heap
- will not pause the application as long as it can collect dead objects
- Generational mostly concurrent collector:
- frequent stop-the-world
- splits the heap -> parallel on nursery, concurrent on tenured generation
- shorter nursery will cause more objects in tenured, hence more stop-the-world
- Parallel:
- Single-spaced parallel collector:
- causes longer pauses/ stop-the-world
- multiple threads to speed up the process
- does not segment heap into multiple generations
- use when the application has more long lived objects
Dynamic:
Throughput:
"The higher the memory throughput the shorter is the time between the two events. Moreover, the higher the memory throughput the smaller the heap you will need."PauseTime:
" The longer the pause, the more unresponsive your system will be. The worst pause time and the average pause time are the two most interesting values you can use for tuning the system."
16/04/2013
Garbage Collectors - HotSpot
TL;DR
Types of Garbage Collectors in HotSpot:
- Serial
- Parallel
- Concurrent (CMS)
Young Generation Collectors:
- -XX:+UseSerialGC
- -XX:+UseParallelGC (Use parallel for Young, Serial for Old)
- -XX:+UseParNewGC
Old Generation Collectors:
- -XX:+UseParallelOldGC (Parallel Young and Old)
- -XX:+UseConcMarkSweepGC –XX:-UseParNewGC (Concurrent Mark Sweep with Serial Young)
- -XX:+UseConcMarkSweepGC –XX:+UseParNewG (Concurrent Mark Sweep + Parallel Young)
-XX:+DisableExplicitGC - prevent calls to System.gc()
Details:
Serial collector:
Serial Collector - runs in single thread. No communication overhead between the threads. Used for mini data sets (<100MB). This collector is quick but suited for single CPU machines.
Serial collector:
-XX:+UseSerialGC
Serial Collector - runs in single thread. No communication overhead between the threads. Used for mini data sets (<100MB). This collector is quick but suited for single CPU machines.
Parallel collector:
-XX:+UseParallelGCand (optionally) enable parallel compaction with
-XX:+UseParallelOldGC
-XX:+UseParNewGCThis type of collector is similar to the serial collector, but runs with multiple threads and does the minor collection in these threads. Be default:
N garbage collector threads = N CPUs on the host.
We can take the control over the number of threads by using the following option:
-XX:ParallelGCThreads=[number of threads]
-XX:+UseConcMarkSweepGC
One thread is used during initial mark and remark phase. For the concurrent marking and sweeping, CMS thread runs along the application threads. Used when the short pauses and response time are crucial.
In this collector parallel version of the young generation collector is used. For the Old/ Tenured generation, serial collector is used.
Concurrent low pause collector:
This collector is used to collect Old Generation and is done concurrently with the running application, however application is still paused for short amounts of time during the collection.. A parallel version of the young generation copying collector is used with the concurrent collector.
In this collector parallel version of the young generation collector is used. For the Old/ Tenured generation, serial collector is used.
Concurrent low pause collector:
-Xincgc ™ or -XX:+UseConcMarkSweepGC
This collector is used to collect Old Generation and is done concurrently with the running application, however application is still paused for short amounts of time during the collection.. A parallel version of the young generation copying collector is used with the concurrent collector.
Incremental low pause collector:
-XX:+UseTrainGC
This is currently not under the development, and has not changed since the J2SE Platform version 1.4.2
Note:
ParallelGC partially implies the -XX:+UseConcMarkSweepGC and should not (this doesn't mean you can't use it ;) ) be used in the same cmd line.
ParallelGC partially implies the -XX:+UseConcMarkSweepGC and should not (this doesn't mean you can't use it ;) ) be used in the same cmd line.
Garbage Collection (GC)
Garbage Collection is integral part of the JVM (Java Virtual Machine) and it is used to reclaim memory occupied by the unused objects.
When the application runs, it creates objects. Once the object is created it occupies some memory. When the object is not used/ referenced it can be considered as unused and will remain in the memory until the garbage collector claims the memory occupied by this object.
Objects at first are created and put in the Young Generation space. After some time can be moved (Partial/ Minor Garbage Collection) into the Old Generation space. Once the Young and Old Generation is FULL, Full Garbage Collection is run.
This operation might impact the flow of the application, as it might take a very long time to complete. During this operation application becomes unresponsive.
To avoid this, we can tune the JVM Heap/ other settings. Different JVMs have different GC policy algorithms which will be discussed in the next posts.
Examples:
If we add the following option to the command line for the JVM:
-verbose:gc
we will get the information about the heap and result of the garbage collection for each collection.
[GC 325407K->83000K(776768K), 0.2300771 secs]In this scenario we can see two minor GC and one Full/ Major GC.
[GC 325816K->83372K(776768K), 0.2454258 secs]
[Full GC 267628K->83769K(776768K), 1.8479984 secs]
- First numbers stand for the size of live objects before and after the GC.
- Numbers in parentheses represent memory space usable for java objects (perm/ survivor spaces not included).
- Secs stands for the amount of time in seconds that was taken to perform the action
[GC [DefNew: 64575K->959K(64576K), 0.0457646 secs] 196016K->133633K(261184K), 0.0459067 secs]Here the second numbers represent the heap usage reduction (196016K -> 133633K(261184K)
If we want to get even more details on the GC results we can add the following options:
-XX:+PrintGCDetails
If we add:
-XX:+PrintGCTimeStamps
we will get additional information regarding timestamps when the GC occurred Based on such results we can see how often GC occurs.
Subscribe to:
Posts (Atom)