Click to give Water and Food

Tuesday, December 16, 2014

Managing Oracle Database 12c with Enterprise Manager – Part III


We are discussing the management of Oracle Database 12c in Oracle Enterprise Manager 12c. In our previous blog posts on this topic, we came to the Provision Pluggable Databases page as seen below. This is accessible via the Container Database Home Page in Enterprise Manager 12c, from the Oracle Database menu.
When it comes to licensing for this page, it needs to be clearly understood. The licensing requirements for the Enterprise Manager Database Lifecycle Management Pack (DBLM) are explained in the Enterprise Manager Licensing information guide here.  This mentions that “On the Provision Pluggable Databases page, all operations are licensed except for those explicitly mentioned in the Base Database Management Features section.” Section 2.3.1 of the same licensing guide mentions that the following PDB provisioning features require the DBLM license:

  • Pluggable Database (PDB) Create/Plug/Unplug:   
  • Create PDB from seed, plug PDB from unplugged PDB, and unplug PDB (multiple targets operations or performed using a customized deployment procedure).
  • PDB Clone:        Create a clone of an existing PDB.
  • PDB Migrate:     Migrate Non-Container Databases (CDB) database to a PDB.
  • Pluggable Database (PDB) Create/Plug/Unplug     
  • Create PDB from seed, plug PDB from unplugged PDB and unplug PDB (single target operations only using non-customized deployment procedure).

The Base Database Management Features section specifies that the following PDB operations are included in the base database management functionality of Enterprise Manager (i.e. these operations do not require the EM DBLM license):
So in plain words, PDB cloning and migration definitely require the DBLM license. For PDB Create/Plug/Unplug, if you specify more than 1 PDB, then you need the DBLM license, or if you change (customize) the EM-supplied OOTB (out-of-the-box) deployment procedure, then you need the license.
On the other hand, if you use the standard OOTB procedure, and if you specify only 1 PDB in your operation, then the DBLM license is not needed.  
Note that these are general guidelines to give you an idea of your licensing requirements for PDB provisioning via Enterprise Manager.  For specific needs and details of Oracle software licensing for your situation and company, please be sure to verify with your local Oracle Sales contact.

Regards,

Porus.
This blog post was originally posted at this link.

Managing Oracle Database 12c with Enterprise Manager – Part II


Friends,
In the last post, we saw what the discovery of an Oracle 12.1 Container Database (CDB) would look like in Oracle Enterprise Manager 12c, with the CDB and component PDBs all being discovered by the EM Agent that has been installed on the target database server.
Drilling down to a CDB, the following screenshot illustrates how the CDB Home page would appear. The Home Page shows the list of Pluggable Databases in this Container Database.
Enterprise Manager 12c allows you to easily open/close component Pluggable Databases from the Container Database Menu.
Pluggable Databases can be opened “Read Only” or for “Read Write”. The “Open” in the menu below indicates a normal open, i.e. for Read Write.
It is also possible to provision new Pluggable Databases directly from Enterprise Manager, from the Container Database menu as seen below.
This brings up the Provision Pluggable Databases page. On this page, you can migrate an existing non-CDB database to be a new pluggable database. You can create a new pluggable database either from a seed database, or by cloning an existing pluggable database,  or from an unplugged database.  You can also unplug a pluggable database, or delete it totally along with the datafiles.
In the next blog post, we will talk more about the Enterprise Manager licensing requirements for this page. These aspects need to be clearly understood.
Regards,
Porus.
This blog post was originally posted at this link.

Managing Oracle Database 12c with Enterprise Manager – Part I


A friend from a lovely country in South America wrote to me :
“Hi My Friend!! My colleague has installed an Oracle Database 12c Container database (CDB) and he has created 2 Pluggable databases (PDBs) on it. He is keen to manage the CDB and PDBs in Enterprise Manager.
“But, when he adds the database to Enterprise Manager 12c, he sees it like a non-CDB and there is no way to work with PDB’s (in fact, he can’t see the arrow left of the database for drilldown to the PDB’s)
“Do you know if he must follow some steps after adding the database to EM, in order to work with PDB's?”
My reply to my friend:
This may happen if he has not downloaded the latest database plug-in for Oracle Database. He needs to download the latest Database plug-in using Self-Update. The latest Oracle Database Plug-in version, as of August 2014, is 12.1.0.6.
A bit of EM history: Plug-in “Enterprise Manager for Oracle Database (DB) 12.1.0.3” was released by Enterprise Manager Self-Update in early 2013. This Plug-in supported the 12.1.0.1.0 Database as soon as it was released. So support for the new database 12c has been there even before the database was released!!
 This means that Enterprise Manager Cloud Control 12c was immediately able to discover, monitor and manage the newly released Oracle Database 12c, including the new feature of Pluggable databases (PDBs) and Container databases (CDBs).  
The screenshot below shows how Database 12c targets can be discovered. Enterprise Manager discovers Container databases (CDBs) as well as Pluggable databases (PDBs).
Once discovered, the Database 12c Targets appear in the Database Target List.
Regards,
Porus.
This blog post was originally posted at this link.

Saturday, October 25, 2014

Using JVM Diagnostics (JVMD) to help tune production JVMs

Using JVM Diagnostics (JVMD) to help tune production JVMs

Contributing Author: Shiraz Kanga, Consulting Member of Technical Staff, Oracle

Tuning a production JVM involves more than merely adding more RAM to it via the -Xmx parameter. It depends upon an understanding of how your application truly behaves in a production environment. Most JVM tuning is done by developers with a simulated load in their Development or QA environment. This is unlikely to be truly representative of the production load running on production hardware with regards to proper JVM tuning.

One of the tools that actually contains real-world production data is JVM Diagnostics (JVMD). Hence it is a good idea to use data collected by JVMD for tuning your production JVMs. Note that JVMD is a component of Oracle Enterprise Manager, licensed as part of both Weblogic Management Pack and the Non-oracle Middleware Management Pack.

Figure 1. Heap Utilization and Garbage Collections for a specific JVM

In this document we are primarily addressing the Hotspot JVM. There are several aspects of tuning this JVM that we will look into:

Tuning Heap Size

The main parameters needed to tune heap size are:
  • -Xms[g|m|k] is the initial and minimum size of the Java heap
  • -Xmx[g|m|k] is the maximum possible size that the Java heap can grow upto
Figure 2. Heap after GC and Garbage Collection Overhead for a specific JVM

The Java Heap size here refers to the total size of the young and the old generation spaces. To start, take a look at the Heap usage chart (Figure 1) of your production JVM under maximum load in the JVMD Performance Diagnostics page. You should see some patterns in the minimum and the maximum heap sizes over time. You can use this data as a rough guide for your choice of -Xms and -Xmx with a reasonable amount of padding. After setting these you should start monitoring the garbage collection charts of your production JVMs (Figure 2) in the JVMD Live Heap Analysis page. It is useful to look into the JVMD metric called "Heap use after GC" which provides a good reflection of the actual amount of heap memory being used by your application. Ideally this metric should remain relatively steady over time with only few full garbage collections occuring. If there are too many full garbage collections then performance of your production application is impacted since GC is done by blocking threads that take a while to scan the entire heap. You can monitor this metric with the JVM GC Overhead% chart on the same page of JVMD. Garbage collection overhead is the percentage of total time spent in garbage collection. Increasing -Xmx can help to make these happen less frequently but actually it is time to dig deeper into your tuning options.

The key questions that you need to answer are - How frequently does garbage collection take place, How long does each collection take and what is the actual memory used (i.e. heap after GC). Also be sure that you NEVER make the heap size larger than the available free RAM on your system as disk will decrease performance as RAM will start getting swapped to disk.

The Sun HotSpot JVM relies on generational garbage collection to achieve optimum performance. The -XX:SurvivorRatio command line parameter could further help in tuning garbage collection.

The Java heap has a young generation for newly created objects and an old generation for long lived objects. The young generation is further subdivided into the Eden space where new objects are allocated and the Survivor space where new objects that are still in use can survive their first few garbage collections before being promoted to old generations. The Survivor Ratio is the ratio of Eden to Survivor space in the young object area of the heap. Increasing this setting optimizes the JVM for applications with high object creation and low object preservation. In applications that generate more medium and long lived objects, this setting should be lowered from the default and vice versa.

For example, -XX:SurvivorRatio=10 sets the ratio between each survivor space and eden space to be 1:10. If survivor spaces are too small, they will overflow directly into the old generation. If survivor spaces are too large, they will be empty. At each GC, the JVM determines the number of times an object can be copied before it is tenured, called the tenure threshold. This threshold should be set to keep the survivor space half full.

Most tuning operations represent a trade-off of some type or another. In the case of garbage collection the trade-off usually involves the memory used v/s throughput and latency.
  • The throughput of a JVM is measured in terms of the time spent doing garbage collection vs. the time spent outside of garbage collection (referred to as application time). It is the inverse of GC overhead mentioned above and represents the amount of work done by an application as a ratio of time spent in GC. Throughput can be tuned with -XX:GCTimeRatio=99 where 99 is the default which represents a 1% GC overhead. 
  • Latency is the amount of time delay that is caused by garbage collection. Latency for GC pauses can be tuned by specifying rhe maximum pause time goal with the command line option -XX:MaxGCPauseMillis=. This is interpreted as a hint that pause times of milliseconds or less are desired. By default, there is no maximum pause time goal. If a pause time goal is specified, the heap size and other garbage collection related parameters are adjusted in an attempt to keep garbage collection pauses shorter than the specified value. Note that these adjustments may cause the garbage collector to reduce the overall throughput of the application and in some cases the desired pause time goal cannot be met.
Some lesser-known options are about permanent generation space which is used by the JVM itself to hold metadata, classes structures and so on:
  • -XX:PermSize=[g|m|k] is the initial and minimum size of the permanent generation space. 
  • -XX:MaxPermSize=[g|m|k] is the maximum size of the permanent generation space. If you ever get the message java.lang.OutOfMemoryError: PermGen space then it means that your application is loading a very large number of classes and this should be raised.
  • -Xss=[g|m|k]is the size of the thread stack. Each thread in a Java application has its own stack. The stack is used to hold return addresses, arguments to functions and method calls, and so on. The default stack size setting for a thread in Java is 1MB. In a highly multi-threaded system, like an application server at any given point in time there are multiple thread pools and threads that are in use so this may need to be reduced. Since stack size has to be allocated in contiguous blocks and if the machine is being used actively and there are many threads running in the system you may encounter an OutOfMemory error even when you have sufficient heap space. Recursive code can quickly exhaust the stack and if you use such code then you may need to increase the -Xss setting. However, if you see java.lang.OutOfMemoryError: unable to create new native thread then you may have too many threads, or each thread has a large stack; so you may need to decrease it.

Tuning Garbage Collection Algorithm

Garbage collection is expensive. Generational garbage collectors have the JVM  memory divided into several spaces.
  • Eden space: All objects are placed here when first created
  • Survivor spaces: One or more regions where objects mature
  • Tenured space: Where long lived objects are stored
  • Permanent generation: This area is only used by the JVM itself to hold metadata, such as data structures for classes, methods, interned strings
One thing that people often forget to try, is to lower the amount of garbage being created in the first place. There are a lot of ways to do this which are specific to the application/code that is being written. This often involves techniques such as using StringBuilder/StringBuffer instead of Strings, lowering the amount of logging, etc.

There are several GC algorithms which are available to be used in a Java VM. The following command line options allow to use a specific GC algorithm:
  • -XX:+UseSerialGC uses a single threaded, young generation, and old generation garbage collector (Normally this is a poor choice and should be used only for small Java heap sizes such as -Xmx256m or smaller)
  • -XX:+UseParallelGC utilizes a multithreaded (parallel) garbage collector for the young generation and a single-threaded garbage collector for the old generation space in parallel.
  • -XX:+UseParallelOldGC uses a multithread garbage collector for both the young and old generations.
  • -XX:+UseParNewGC -> enables a multithreaded, young generation garbage collector
  • -XX:+UseConcMarkSweepGC -> enables the VM’s mostly concurrent garbage collector. It also auto-enables -XX:+UseParNewGC (use if If you are not able to meet your application’s worst case latency requirements due to full garbage collection duration being too long)
  • -XX:+UseG1GC -> garbage first collector (default in java 7, can be also used in latest releases of Java 6)
In practice, the default in Java 6 is ParallelGC and in Java 7 it is the G1GC. Changing the algorithm requires detailed analysis of the application behavior. If you see a nice regular sawtooth chart in the heap usage you may not need any changes at all. If not, we recommend trying out each GC algorithm under a realistic load and then comparing it to the default algorithm's behavior under the same load. Usually you will find that the default algorithm outperforms the new setting and that there is no reason to change it.

As you can see, tuning the JVM and it's garbage collectors is largely a trade-off between space and time. If you had infinite heap space then you would never need to collect garbage. Inversely, if you could tolerate infinite time delays, then you could run a cleanup as frequently as you like and keep the heap compact. Clearly, both those situations are impossible. Finding the right middle ground that is right for you requires careful balancing act based on understanding how GC works and what the application requires.
References:
Java SE 6 HotSpot Virtual Machine Garbage Collection Tuning http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html

Thursday, October 23, 2014

Oct 2014 Oracle Enterprise Manager Base Platform PSU patches have been Released

Oct 2014  Oracle Enterprise Manager Base Platform PSU patches have been Released
Oct 2014 Oracle Enterprise Manager Base Platform PSU patches were released on Oct 14, 2014. This includes:
  • Enterprise Manager Base Platform - Grid Control (OMS)  10.2.0.5.10 PSU.
  • Enterprise Manager Base Platform - Grid Control (OMS)  11.1.0.1.11 PSU.
  • Enterprise Manager Base Platform - Cloud Control (OMS) 12.1.0.4.1 PSU.
Here is the related information:


Sunday, September 7, 2014

Latest Bundle Patch for EM12c and White paper for reducing downtime when patching the OMS

Friends,
Enterprise Manager 12.1.0.4 was released in June 2014, and the 12.1.0.4 OMS Bundle patches  have also been released in July 2014. If you have recently upgraded your Enterprise Manager OMS  to 12.1.0.4, it is recommended to apply the latest available bundle patch to your 12.1.0.4 OMS.
For the list of the available Bundle patches or System patches, please refer to the My Oracle Support note “Enterprise Manager 12.1.0.4.0 (PS3) Master Bundle Patch List” (Doc ID 1900943.1). As per this document, the latest bundle patch was released on July 31st 2014 and is System Patch 12.1.0.4.2 which is Patch Number 19176910.
This is a single System patch that includes all the OMS-Side Plug-in Bundles released in July 2014 (Cloud, DB, FMW, Fusion Applications Plug-in (FA), Siebel, Storage Management Plug-in (SMF), Oracle Virtual Infrastructure Plug-in (OVI), and Virtualization Plug-in (VT)).
The previous bundle patch was 12.1.0.4.1 (released on July 2, 2014) which was Patch Number 18945232. This is now superseded by the latest bundle patch 12.1.0.4.2 i.e. Patch Number 19176910 as stated above.
Downtime on the Enterprise Manager OMS will be needed when applying the bundle patch. However, if you have multiple OMS servers (recommended for a large enterprise), then it is possible to reduce the downtime.
You can refer to the new whitepaper on OTN “Reducing Downtime while patching Multi-OMS Environments” for the steps you can take to reduce downtime.  The opatchauto command is used to generate scripts to automate the steps that are required to patch such a scenario.
This blog post was originally published at this link.
Regards,
Porus.

Sunday, August 3, 2014

Enhancements to Monitoring in EM12c Release 4

Dear Readers,
What are the enhancements to the Enterprise Monitoring Framework in EM12c Release 4? This is the framework that controls the monitoring of enterprise targets.
1.
Improvement - The “Target Down” status is detected by Enterprise Manager within seconds of its occurrence. This applies to the Database, Weblogic Server, Host, Agent as well as deployed applications. This kind of ability is very important for enterprise-level monitoring.
The Host level monitoring has also been improved. There is a new “Host Down” event, and a new “Host Up (Unmonitored)” status. This covers the situation where a host can be up but the agent is not running, rather than the situation in earlier releases where it was difficult to distinguish if the host was really up or down if the target showed as down.
These kinds of enhancements improve higher target availability, compliance with SLA goals, and diagnosability in the case of the agent unreachable event. See here for the documentation.
2.
Improvement - Thresholds are now more flexible, with the introduction of Time-based Static thresholds and Adaptive thresholds.
In the case of time-based static thresholds, different thresholds can be set up for different times of the day or night, since the workload will be different during the day and night. Or, different thresholds for the weekend as opposed to weekdays as in the following example.
Adaptive Thresholds are also available; these are thresholds auto-calculated on a percentage deviation from the norm. The norm is determined by a baseline behavior built from collected historical data. This helps us to be alerted on abnormal behavior. See here for the details.
3.
Improvement - SNMP Version 3 is now supported by Enterprise Manager; this version is more secure than the previous version. Notifications on events can be sent using SNMPv3 traps.
Security enhancements in Version 3 include authentication, that the message is from a valid source, and message integrity and encryption, that ensures the packet sent has not been tampered with. This enables Data Centers to comply with security best practices when sending event information from Enterprise Manager to third party monitoring systems.
This blog post was originally posted at this link.
Regards,
Porus.

Disclaimer

Opinions expressed in this blog are entirely the opinions of the writers of this blog, and do not reflect the position of Oracle corporation. No responsiblity will be taken for any resulting effects if any of the instructions or notes in the blog are followed. It is at the reader's own risk and liability.

Blog Archive