java takes more memory in linux?

Discussion in 'Java' started by Elhanan, Aug 5, 2005.

  1. Elhanan

    Elhanan Guest

    hi...

    i'm trying to use a java server in windows xp and in linux FC3 i'm
    trying to see how much memory they will take.

    using Alt+Ctrl+Del in windows i can see that the java process takes
    around 193mb , but in linux's x system monitor i can see it takes
    around 422mb does it make sense?
    Elhanan, Aug 5, 2005
    #1
    1. Advertising

  2. Elhanan

    pwt Guest

    Elhanan wrote:
    > hi...
    >
    > i'm trying to use a java server in windows xp and in linux FC3 i'm
    > trying to see how much memory they will take.
    >
    > using Alt+Ctrl+Del in windows i can see that the java process takes
    > around 193mb , but in linux's x system monitor i can see it takes
    > around 422mb does it make sense?


    It's likely that task manager is only showing you the active memory
    used, and not the memory that's been paged out. Goto View->Select
    Columns, and check Virtual Memory Size, and any other memory-related
    columns that tickle your fancy.

    And what in the world could be eating nearly half a gigabyte of memory?
    pwt, Aug 7, 2005
    #2
    1. Advertising

  3. Elhanan

    Matt Parker Guest

    pwt wrote:

    > Elhanan wrote:
    >> hi...
    >>
    >> i'm trying to use a java server in windows xp and in linux FC3 i'm
    >> trying to see how much memory they will take.
    >>
    >> using Alt+Ctrl+Del in windows i can see that the java process takes
    >> around 193mb , but in linux's x system monitor i can see it takes
    >> around 422mb does it make sense?

    >
    > It's likely that task manager is only showing you the active memory
    > used, and not the memory that's been paged out. Goto View->Select
    > Columns, and check Virtual Memory Size, and any other memory-related
    > columns that tickle your fancy.
    >
    > And what in the world could be eating nearly half a gigabyte of memory?


    Because of the way Linux's threading model interacts with Java, Linux will
    report the total memory used as the memory used for each thread.

    So if you have an application with 3 threads running with a total
    application memory usage of 193Mb, you may see 579Mb as the memory usage in
    some tools.

    Matt
    Matt Parker, Aug 7, 2005
    #3
  4. Matt Parker wrote:
    >
    > Because of the way Linux's threading model interacts with Java, Linux will
    > report the total memory used as the memory used for each thread.
    >
    > So if you have an application with 3 threads running with a total
    > application memory usage of 193Mb, you may see 579Mb as the memory usage in
    > some tools.


    Didn't kernel 2.4 sort that?

    Still Linux and Windows report memory in very different ways, and the
    two are not directly comparable. On Windows, I believe, reported memory
    usage can depend upon whether some DLLs are considered as part of the
    operating system or not. So you can't even compare Windows applications
    together.

    Tom Hawtin
    --
    Unemployed English Java programmer
    http://jroller.com/page/tackline/
    Thomas Hawtin, Aug 8, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alf P. Steinbach
    Replies:
    2
    Views:
    377
    Alf P. Steinbach
    Jan 25, 2004
  2. Karl Heinz Buchegger
    Replies:
    2
    Views:
    386
    Nils Petter Vaskinn
    Jan 26, 2004
  3. Michael
    Replies:
    4
    Views:
    396
    Matt Hammond
    Jun 26, 2006
  4. Replies:
    7
    Views:
    334
  5. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    202
    Jeff Wood
    Sep 29, 2005
Loading...

Share This Page