Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8661033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:23:55+00:00 2026-06-12T16:23:55+00:00

I’m focused on Derive architectural understanding of our Java application through footprint analysis Improve

  • 0

I’m focused on

  • Derive architectural understanding of our Java application through footprint analysis
  • Improve application performance by tuning memory footprint and optimizing Java collections and Java cache usage

For this purpose I ran a load test and analyzed a Java heap dump snapshots by using the Java heap analysis tool memoryanalyzer on our Java EE application which uses WebSphere application server v7.

I’m asking if the "Soft Reference Statistic" and "Weak Reference Statistics" can help for my goal, i.e:
to understand if we have a problem or there is something to fix ( or just improve ) in the application java code or in the configurazione of the application server.

advice to figure out how to figure out how to exploit these data would be greatly appreciated

Soft Reference Statistics

A total of 11.416 java.lang.ref.SoftReference objects have been found,
which softly reference 393 objects.
2.414 objects totalling 122,9 KB are retained (kept alive) only via soft references. No objects totalling 0 B are softly referenced and
also strongly retained (kept alive) via soft references.

Weak Reference Statistics

A total of 28.849 java.lang.ref.WeakReference objects have been found,
which weakly reference 11.663 objects.
132.437 objects totalling 7,4 MB are retained (kept alive) only via weak references. No objects totalling 0 B are weakly referenced and
also strongly retained (kept alive) via weak references.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:23:56+00:00Added an answer on June 12, 2026 at 4:23 pm

    First rule: Never use soft refereces. The guys a Sun who added that regret their decision, as they are useless and make GC more expensive.

    Weak References are ok.

    The question is: If you do need all that data in memory, trying to reduce the footprint will result in extra CPU, network or disk overhead, as you’ll need to store the data somewhere else.

    How big is the heap of the app, that you need to make it perform better? And what is the maximum latency that you’re able to accept when GC kicks in? Have you tried tuning the GC?


    Edit

    Why never use soft references. Soft references are bad because

    • They require 2 GC cycles to be collected. The first GC cycle marks them, and the second actually collects the memory. (this is not related in any way to the MarkSweep collectors)
    • They are marked for collection after a full GC.

    If you actually need the data held in the SoftReference, a cycle of load SF, full GC, load SF again, full GC will start, which is bad as it gets. The app potentially won’t crash because of an OOME, but it will be close to unusable.

    Weak references are better, as they only cleared when they are "weakly" reachable, rather than when the app runs out of memory. The best (and only) example I know of a framework that uses weak references is Robotium (an android testing framework).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.