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 323573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:02:37+00:00 2026-05-12T09:02:37+00:00

We experience several minutes lags in our server. Probably they are triggered by stop

  • 0

We experience several minutes lags in our server. Probably they are triggered by “stop the world” garbage collections. But we use concurrent mark and sweep GC (-XX:+UseConcMarkSweepG) so, I think, these pauses are triggered by memory fragmentation of old generation.

How can memory fragmentation of old generation be analyzed? Are there any tools for it?

Lags happen every hour. Most time they are about 20 sec, but sometimes – several minutes.

  • 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-05-12T09:02:37+00:00Added an answer on May 12, 2026 at 9:02 am

    Look at your Java documentation for the “java -X…” options for turning on GC logging. That will tell you whether you are collecting old or new generation, and how long the collections are taking.

    A pause of “several minutes” sounds extraordinary. Are you sure that you aren’t just running with a heap size that is too small, or on a machine with not enough physical memory?

    • If your heap too close to full,
      the GC will be triggered again and
      again, resulting in your server
      spending most of its CPU time in the
      GC. This will show up in the GC
      logs.

    • If you use a large heap on a machine
      with not enough physical memory,
      a full GC is liable to cause
      your machine to “thrash”, spending
      most of its time madly moving virtual
      memory pages to and from disc. You
      can observe this using system
      monitoring tools; e.g. by watching
      the console output from “vmstat 5” on
      a typical UNIX/Linux system.

    FOLLOWUP

    Contrary to the OP’s belief, turning on GC logging is unlikely to make a noticeable difference to performance.

    The Understanding Concurrent Mark Sweep Garbage Collector Logs page on the Oracle site should be helpful in interpreting GC logs.

    Finally, the OP’s conclusion that this is a “fragmentation” problem is unlikely, and (IMO) unsupported by the snippets of evidence that he has provided. It is most likely something else.

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

Sidebar

Related Questions

We use varnish as our load balancer (among other things) but we get some
In my limited experience, I've been on several projects that have had some sort
I have experience with RelativeLayout but I've never run across a way to solve
I am a .net web developer. I have several years of experience in this
We use Wix to build an installer for our .NET application and are just
My Company is running several international websites for selling insurance products. Our current setup
Does anyone have any experience with pjsip on android devices? I see several non-commercial/test
I've been programming in PHP for several years now, but I also have some
I've been doing server-side development for several years, and have not had much (read
I started using Dist::Zilla several months ago. However, at YAPC::NA someone mentioned that they

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.