Posts

Showing posts from December, 2017

A brief history of garbage collection

How does garbage collection work? The benefits of garbage collection are indisputable -- increased reliability, decoupling of memory management from class interface design, and less developer time spent chasing memory management errors. The well-known problems of dangling pointers and memory leaks simply do not occur in Java programs. (Java programs can exhibit a form of memory leak, more accurately called unintentional object retention, but this is a different problem.) However, garbage collection is not without its costs -- among them performance impact, pauses, configuration complexity, and nondeterministic finalization. An ideal garbage collection implementation would be totally invisible -- there would be no garbage collection pauses, no CPU time would be lost to garbage collection, the garbage collector wouldn't interact negatively with virtual memory or the cache, and the heap wouldn't need to be any larger than the residency (heap occupancy) of the...

Importance of the Java heap size In WebSphere Application Server

Introduction Java heap is the area of memory that is used by the Java virtual machine (JVM) for storing Java objects. Optimal Java heap size is application and use dependent. Setting the JVM heap size is directly related to the number of server instances that needs to be started on a specific node and the total RAM available on the machine. The maximum heap should be incremented not to exceed 50% of overall physical memory. The Java heap memory is used by the applications that are deployed and the component running in WebSphere Application Server. It is extremely important to monitor for Java heap size usage, which can be done by enabling verbose Garbage Collection. Every WebSphere Application Server instance runs in its own JVM. The default JVM setting for the initial heap, which is 50 MB, and the maximum heap, which is 256 MB, are usually good enough for very small volume applications. However, they are not good for a live production environment. The following list describes Java H...

"Unveiling the java.lang.Out OfMemoryError"

What Is a java.lang.OutOfMemoryError?   A java.lang.OutOfMemoryError is a subclass of java.lang.VirtualMachineError that is thrown when the Java Virtual Machine is broken or has run out of resources that are necessary to continue the operation of the Java Virtual Machine. Obviously, memory is the exhausted resource for a java.lang.OutOfMemoryError, which is thrown when the Java Virtual Machine cannot allocate an object due to memory constraints. Unfortunately, the Java specification of java.lang.OutOfMemoryError does not elaborate further on what kind of memory it's talking about. There are six different types of runtime data areas, or memory areas, in the Java Virtual Machine 1. Program Counter Register 2. Java Virtual Machine Stack 3. Heap 4. Method Area 5. Runtime Constant Pool 6. Native Method Stack   The Program Counter Register, also known as the pc register, stores the address of the Java byte code instruction that is currently being executed (just like the proces...

Important question and answers for Websphere Application server

1Q).. How does nodeagent monitor the application server and how does it know the previous state of the application server? When the nodeagent monitors the application server (with the monitoring policy created as mentioned in question 1) it saves the server state information in the monitoring.state file. It will maintain the previous server state and the application server PID. In case of an application server crash or hang, the nodeagent will get the previous state of the server from the monitoring.state file and then try to start the application server automatically. Note: If you notice StringIndexOutOfBoundsException or any other exception in the NodeAgent.loadNodeState stack (nodeagent Systemout.log file), it means the monitored.state file is corrupted. You must stop all servers, delete the file and then start the nodeagent again. For example: Caused by: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1115) at com.ibm.ws.management.nodeagent.No...

Load Balancing

Image
Load balancers : A load balancer, also referred to as an IP sprayer, enables horizontal scalability by dispatching TCP/IP traffic among several identically configured servers. Depending on the product used for load balancing, different protocols are supported. Load balancer is implemented using the Load Balancer Edge component provided with the Network Deployment package, which provides load balancing capabilities for HTTP, FTP, SSL, SMTP, NNTP, IMAP, POP3, Telnet, SIP, and any other TCP based application. Horizontal scaling topology with an IP sprayer Load balancing products can be used to distribute HTTP requests among Web servers running on multiple physical machines. The Load Balancer component of Network Dispatcher, for example, is an IP sprayer(LB) that performs intelligent load balancing among Web servers based on server availability and workload.              Figure below illustrates a horizontal scaling configuration ...

fix pack installation on websphere using command line (imcl)

 Hi friends, Today here is one more important topic in WAS. For installing fix packs , ifixes with command line we use imcl commnd. * During installing Products and Fixes with IBM Installation Manager, Installation Manager searches open repositories where Packages and Fixes exist. But how can you verify the applicable packages, updates, and features are in a target repository from the   command line? Installation Manager provides the command line tool, imcl, to manage installation. The imcl command can be found in <IM_ROOT>/eclipse/tools subdirectory. **Following are the commands and description for it 1] encryptString stringToEncrypt:    Encrypt the entered string. Use the encryptString command with the -passwordKey option to increase encryption security. 2] exportInstallData outputFileName:      Export the installation data to the specified file in a compressed file format where outputFileName is the name of the generated file that ...

Useful commands for WebSphere Application Server:

Finding what versions are running:     While version information is available from the admin console, it is also available for most IBM products in the source file product.xml .Beginning with WebSphere Application Server Version 4.0.x, this file will also include information on eFixes that have been installed. Access this file for WebSphere Application Server using these commands: