Thursday, 30 January 2014

What is Garbage Collector Compaction in Java?


Compaction means moving objects in RAM so that objects become contiguous in RAM.
There are some cases when you will get out of memory error without any memory leak . And there may be memory available but there is no place for new object because of no  contiguous availability of memory. The algorithmic difficulty in a compaction algorithm is about updating all pointers, so that they point to the new object location. GC works preferentially with young objects only. Here, this means compacting only the end of the heap. full compaction being applied  rarely.  .Lets see with an example :-
Garbage Collector Compaction in Java
Garbage Collector Compaction in Java


 The point here is that a full compaction,  could  induce a noticeable pause. Generational GC tries to make such pauses rarer . In GC pause all threads of your application will be suspended

Sunday, 26 January 2014

What is difference between Web Server and Application Server ?


Hemant
Kurmi
Web Server Definition

A web server is a service that handles specifically requests in the HTTP protocol format. The server responses to requests made using the HTTP format, and in turn responds using a valid HTTP response. All responses from a web server follow the W3 standards for HTTP protocols.Web server can be either a computer program or a computer running a program that is responsible for accepting HTTP requests from clients, serving back HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects on it.This is mainly used for Servlets and JSP.

Or we can say Web server can be either a computer program or a computer running a program that is responsible for accepting HTTP requests from clients, serving back HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects on it.
The Web Server does not support the concept of multi-threading

As web servers are well suited for static content and app servers for dynamic content, most of the production environments have web server acting as reverse proxy to app server. That means while service a page request, static contents such as images/Static html is served by web server that interprets the request. Using some kind of filtering technique (mostly extension of requested resource) web server identifies dynamic content request and transparently forwards to app server

Some more defination:-
A Web server is process running on a machine that "listens" specifically on TCP/IP Channel using one of the "internet" protocols, (http, https, ftp, etc..) and does whatever it does based on those incoming requests... Generally, (as origianly defined), it fetched/generated and returned an html web page to the client, either fetched from a static html file on the server, or constructed dynamically based on parameters in the incoming client request.


Some Web Server  are 
Tomcat : Servlet
Jetty : Servlet
Apache : Php, CGI

Application Server 

An application server is a service that handles specifically requests for business operations, and performs business logic. It is not limited to the HTTP protocol, but can operate using that protocol if it fits the business requirements.
It can be provided other protocol support such as RMI/RPC
In Application Server we have features like connection pooling,
isolation pooling, multi-threading, and majorly the Transaction feature which is not there in Web Server.Applicatin server supports distributed transaction and EJB's
Web servers support to deploy .war files only while Application servers support to deploy .war and .ear files.It can also provid other protocol support such as RMI/RPC


Some Application Servers are 

WAS : EJB
JBoss : EJB
WebLogic Application Server : EJB

Some more task taht are done by Application server but not web server are
1)A (proprietary or not) API
2)Load balancing, fail over...
3)Object life cycle management
4)State management (session)
5)Resource management (e.g. connection pools to database)



You may also like:-

How to Reduce Garbage-Collection Pause Time?

4 Mains causes of Long Garbage Collection Pause?

How Application Performance get impacted by Garbage Collection?

Java Performance Tuning options Java heap

Why Memory leak in Java ?

What is a Memory Leak in java?

What is Garbage collector in java and how it works?

What is Garbage Collector Compaction in Java?

What are Java heap Young, Old and Permanent Generations?

What is difference between Web Server and Application Server ?

What is the maximum ram for 32 bits and 64 bits computer?

Some Amazing fact about memory (petabyte,exabyte,zettabyte) And How much data exists on the Web?

Now have some jokes:-
Best Alok Nath jokes    Best C.I.D. returns Jokes    Rajinikanth 99 KILLING JOKES Best Kejriwal jokes  Jethalal JOKES     Husband wife awesome jokes  Winners at 59th Idea Filmfare Awards 2013      Girl Friend boy Friend Awesome jokes    Hi-tech salespeople DictionarY   Student Teacher ever best jokes   FriendShip SMS and Quotes
Hansa Praful jokes     Puzzle Messages     Life SMS    WhatsApp Status messages  Sweat Msg on MAA 


#hemant #kurmi #hemant #kurmi #hemant #kurmi
#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi   Seminar of wifes   jokes on Husbands
What's Marriage?(jokes)   Smart kids jokes(god is missing)
Amazing mathematics of life    TV Anchor joke    Best suspense jokes jokes-on-husbands

Tuesday, 21 January 2014

What is the maximum ram for 32 bits and 64 bits computer?




To bet the answer lets begin with our running 32 bits computer .
As we know the maximum ram is the locations that OS can handle
and for a processor it is the register bus. so we can make a simple formula for this

2^(width of data bus in bits)
or
 2^(how much bits OS is)

So for 32 bit computer(4 bytes pointer) the maximum RAM that can be addressed will

 2^32 --->> can address 4,294,967,296 locations = 4GB

So a 32 bits OS can have maximum of 4GB of ram.

Exeption 
These can be extended by hardware coding and including more "hidden" address lines.The number of these "hidden" address lines decides by how much you can extend your RAM.But its complicated

Now moving towards 64 bits OS . As said by Moore’s Law, That the number of transistors on a chip doubles every 1.5 to 2 years.
now its too easy to calculate

i.e 2^64 --->>can address 1.84467440737e+19 locations

Means
Maximum RAM  = 16*1000*1000 *1000GB
Maximum RAM = 16*1000*1000 TB
Maximum RAM = 16*1000 Petabyte=16 Exabyte

So its 16 PB  ,to give you short intro about memory
1000 kb = 1MB
1000 MB = 1GB
1000 GB = 1TB
1000 TB = 1PB
1000 PB = 1EB

For more amazing facts about memory you can visit
Some Amazing fact about memory (petabyte,exabyte,zettabyte)
And How much data exists on the Web

For more idea 
If the average MP3 encoding for mobile is around 1MB per minute, and the average song lasts about four minutes, then a petabyte of songs would last over 2,000 years playing continuously.

As of now it is not possible to build a processor which can support 16 Petabytes of RAM
For example, the AMD64 architecture as of 2011 allowed 52 bits for physical memory and 48 bits for virtual memory.[7] These limits allow memory sizes of 4 PiB (4 × 10245 bytes) and 256 TiB (256 × 10244 bytes), respectively. A PC cannot currently contain 4 petabytes of memory (due to the physical size of the memory chips) and its price is too high and need more high end processors to maintain this huge amount of address.

And Operation systems also charge different for different RAMs some are given below

For Windows 7, the maximums are:
Starter: 2GB
Home Basic: 8GB
Home Premium: 16GB
Professional: 192GB
Enterprise: 192GB
Ultimate: 192GB




What about server with 1 Petabytes server and its coat?

If you want your own personal server or a storage with 1000 Tb memory then what should be its cost?

Answer:- $109,950 or nearly  66 lakhs  RS

And you will need the rack which can handle 12000 Kgs of weight

So now we have data to be managed and devices to store but we lack in the processors and transfer speed to manage this huge data.
Now have some jokes:-
Best Alok Nath jokes    Best C.I.D. returns Jokes    Rajinikanth 99 KILLING JOKES Best Kejriwal jokes  Jethalal JOKES     Husband wife awesome jokes  Winners at 59th Idea Filmfare Awards 2013      Girl Friend boy Friend Awesome jokes    Hi-tech salespeople DictionarY   Student Teacher ever best jokes   FriendShip SMS and Quotes
Hansa Praful jokes     Puzzle Messages     Life SMS    WhatsApp Status messages  Sweat Msg on MAA    Seminar of wifes   jokes on Husbands
What's Marriage?(jokes)   Smart kids jokes(god is missing)
Amazing mathematics of life    TV Anchor joke    Best suspense jokes jokes-on-husbands



#hemant #kurmi #hemant #kurmi #hemant #kurmi
#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi

Some Amazing fact about memory (petabyte,exabyte,zettabyte) And How much data exists on the Web?



Now the Digital world is growing so fast that our need for storing data is increasing day by day. I remember once our computer teacher told me that he purchased a  Personal Computer XT/370 and paid more than a lakh for it and contains 512K of memory chips. but Now you can find 64-bit computers with 8 GB of ram laptops. Even mobiles come with 3 Gb ram(Note 3 of the same gang)


And going towards hard disk we are no more talking about GBs now it's all about Terabytes. And not stop here we moved toward Petabyte(1000 TB). I here remember
 Moore’s Law, says that the number of transistors on a chip doubles every 1.5 to 2 years.

Let me share an interesting fact:-

The biggest photo-sharing website Facebook has over 15 billion photos. For each uploaded photo, Facebook generates and stores four images of different sizes, which translated to a total of 60 billion images and 1.5 petabytes of storage, to date this will be even greater.

 If the average MP3 encoding for mobile is around 1MB per minute, and the average song lasts about four minutes, then a petabyte of songs would last over 2,000 years playing continuously.
    If the average smartphone camera photo is 3MB in size and the average printed photo is 8.5 inches wide, then the assembled petabyte of photos placed side by side would be over 48,000 miles long - almost long enough to wrap around the equator twice.
      One petabyte is enough to store the DNA of the entire population of the US – and then clone them, twice.
        If you counted one byte per second, it would take 35.7 million years.


        It would take 223,000 DVDs (4.7 GB each) to hold 1Pb.

        It would take 746 million 3.5-inch high-density floppy discs (1.44Mb each) to hold one petabyte; 746 billion floppy discs weigh 13,422 tonnes (if each one weighs 18g)

        Astronomical project: “The Square Kilometer Array (SKA), funded by 20 countries to the sum €1.5bn is a radio telescope that can read faint signals from the Big Bang." 
        The SKA (due to be completed in 2024), estimates Big Blue, will generate 1,376 petabytes per day, twice daily global internet traffic.

        Facebook was storing 100 petabytes one year ago, according to its IPO filing to the US Security and Exchange Commission on 1 February 2012.

        Google processed about 24 petabytes of data per day in 2009.
         It is estimated that the human brain's ability to store memories is equivalent to about 2.5 petabytes of binary data





        How much data exists on the Web

        Now a big question raises here if I want to download the internet then what should be the size of the hard disk.
        or in other words How much data exists online?
        So here is the Answer according to some research it is  1.2 Zettabytes (1.3 trillion gigabytes) is now stored. So if you want to download the complete data from the internet and you are getting the speed of 
        100MB/sec then it will take 380517 years to complete.

        This year it is estimated that 70 percent of the data coming on the internet will be user generated and it will be about  900 Exabytes.


        #hemant #kurmi 
        #hemant #kurmi #hemant #kurmi
        #hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant#hemant #kurmi #hemant #kurmi #hemant #kurmi
        #hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi

        You may also like:-

        How to Reduce Garbage-Collection Pause Time?

        4 Mains causes of Long Garbage Collection Pause?

        How Application Performance get impacted by Garbage Collection?

        Java Performance Tuning options Java heap

        Why Memory leak in Java ?

        What is a Memory Leak in java?

        What is Garbage collector in java and how it works?

        What is Garbage Collector Compaction in Java?

        What are Java heap Young, Old and Permanent Generations?

        What is difference between Web Server and Application Server ?

        What is the maximum ram for 32 bits and 64 bits computer?

        Some Amazing fact about memory (petabyte,exabyte,zettabyte) And How much data exists on the Web?


        Now have some jokes:-
        Best Alok Nath jokes    Best C.I.D. returns Jokes    Rajinikanth 99 KILLING JOKES Best Kejriwal jokes  Jethalal JOKES     Husband wife awesome jokes  Winners at 59th Idea Filmfare Awards 2013      Girl Friend boy Friend Awesome jokes    Hi-tech salespeople DictionarY   Student Teacher ever best jokes   FriendShip SMS and Quotes
        Hansa Praful jokes     Puzzle Messages     Life SMS    WhatsApp Status messages  Sweat Msg on MAA    Seminar of wifes   jokes on Husbands
        What's Marriage?(jokes)   Smart kids jokes(god is missing)
        Amazing mathematics of life    TV Anchor joke    Best suspense jokes jokes-on-husbands
                                           Home

        Hemant Kurmi - 2021 - Some Amazing Facts About Memory: Petabyte, Exabyte, and Zettabyte

        Some Amazing Facts About Memory: Petabyte, Exabyte, and Zettabyte As technology advances, our ability to store and process data has grown ...