Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-01-31 21:07:51

jsherk
Member
Registered: 2010-01-29
Posts: 13

Taskmanager shows huge VM-Size?

Using CentOS 5.4 with XFCE version: 4.4.2

When running Taskmanager, there are two columns labeled VM-Size and RSS. I cannot find any specific docs that tell me exactly what these columns mean. My concern is that the VM-Size column shows numbers in the 2GB to 140GB range, which are quite astronomically high! The RSS column numbers seem to be what I would expect the process to be using, but not sure if that is what it means or not

Here's a couple examples:


init        VM-Size=2,121,728 kB    RSS= 158 kB
mysqld      VM-Size=142,577,184 kB  RSS= 4849 kB
xfdesktop   VM-Size=78,434,384 kB   RSS=2861 kB
xfce4-panel VM-Size=43,651,072 kB   RSS=2321 kB


I guess my two questions are:
#1 - What do these two columns represent?
#2 - Why is VM-Size so huge?

Thanks

Offline

#2 2010-02-01 00:12:34

ManOfSteel
Member
Registered: 2005-10-06
Posts: 104

Re: Taskmanager shows huge VM-Size?

I've never used CentOS, but I don't think there's anything to worry about.

You should look at RSS or Resident Set Size (reserved memory). This represents (more or less) how much physical memory your applications are using.

VM or Virtual Memory is a technique that improves memory management by giving every application access to as much VM as physically addressable in a particular machine.
For example, 32-bit word machines (e.g. i386) may have a maximum of 2^32=4GB physical memory installed. Therefore every application will have a 4GB-big unique and contiguous virtual address space, usually divided into 3GB for user-space and 1GB for kernel-space, even though the machine may not even have that much physical memory, the application may never need to access that much memory, and the physical memory used by a particular application may be highly fragmented. VM may even be stored on a disk drive through memory pages swapping. It does not represent real (physical) usage of memory at all.

Offline

#3 2010-02-01 19:01:06

DMcCunney
Member
Registered: 2010-01-28
Posts: 21

Re: Taskmanager shows huge VM-Size?

ManOfSteel wrote:

I've never used CentOS, but I don't think there's anything to worry about.

You should look at RSS or Resident Set Size (reserved memory). This represents (more or less) how much physical memory your applications are using.

VM or Virtual Memory is a technique that improves memory management by giving every application access to as much VM as physically addressable in a particular machine.
For example, 32-bit word machines (e.g. i386) may have a maximum of 2^32=4GB physical memory installed. Therefore every application will have a 4GB-big unique and contiguous virtual address space, usually divided into 3GB for user-space and 1GB for kernel-space, even though the machine may not even have that much physical memory, the application may never need to access that much memory, and the physical memory used by a particular application may be highly fragmented. VM may even be stored on a disk drive through memory pages swapping. It does not represent real (physical) usage of memory at all.

Are you sure?

Yes, the machine may have an enormous address space, in terms of memory it can theoretically access.  But in my installation under Ubuntu, RSS shows actual RAM used at the moment, and VM shows the amount of memory the application has attempted to allocate.  Total Virtual Memory under Windows or Linux is normally the sum of installed physical RAM plus the size of the swap partition on disk, not the total theoretical address space of the machine, and the VM size will be the amount of memory the application has requested, which should be much less than total virtual memory.

The figures the original poster gave make sense if you read the VM size as bytes, not kilobytes, which makes me wonder what LXTask ir really doing.  I'd run top in a terminal window as a sanity check.
______
Dennis

Offline

#4 2010-02-01 22:25:07

ManOfSteel
Member
Registered: 2005-10-06
Posts: 104

Re: Taskmanager shows huge VM-Size?

I'm sure about all that. It's how things work AFAIK. If you found an inaccuracy somewhere, please be more precise, and I'll correct it.

I was merely explaining what virtual memory is and how it is something the hardware (MMU) and the OS's memory management use internally, and how the user should not worry about it too much (or at all). The user should only be interested in the physical memory usage.

I was not justifying the very high numbers. As I said I've never used CentOS, so I can't even tell for sure what data the OS should be giving Taskmanager when asked.

Maybe it's a bug in Taskmanager (it doesn't understand what the system is saying).

Or the memory management algorithm might be more liberal about virtual memory usage if the machine has a 64-bit architecture, and if that's what jsherk has, of course.

Offline

#5 2010-02-02 13:33:37

DMcCunney
Member
Registered: 2010-01-28
Posts: 21

Re: Taskmanager shows huge VM-Size?

ManOfSteel wrote:

I'm sure about all that. It's how things work AFAIK. If you found an inaccuracy somewhere, please be more precise, and I'll correct it.

I think you're conflating address space and virtual memory.  They aren't the same thing.

Every machine will have a total address space - the amount of memory it can theoretically access.  The size of the address space is controlled by the size of the CPU register that holds the address, since the system must be able to access and change any individual byte of that memory, and each byte must have a unique address.  Early "8 bit" micros like the old Z-80 based CP/M systems or the Commodore 64 used CPUs with a 16 bit address register, and could see a maximum of 64 kilobytes of memory.  Modern machines tend to use CPUs with a 32 bit address register, providing a 4GB address space, and 64 bit machines which can theoretically access terabytes of memory are becoming more common.

Virtual Memory is a bit different.  The concept has been around a long time. (I first encountered it in the 70's on an IBM mainframe.) In addition to physical RAM, there is  a swap area on disk.  The OS divides RAM into 4K pages, and keeps track of what pages are being used by what processes.  If an operation requires more free RAM than is available, the OS swaps RAM pages not recently used to the swap area to make room.  If something tries to access a swapped out page, a "page fault" is generated, and the OS swaps the page back in.  This happens transparently to the user and the program.

This is why more RAM is the best upgrade to improve performance.  RAM is an order of magnitude faster than disk, and you want to reduce the need to swap.

I was merely explaining what virtual memory is and how it is something the hardware (MMU) and the OS's memory management use internally, and how the user should not worry about it too much (or at all). The user should only be interested in the physical memory usage.

Not entirely true.  See above about adding RAM to boost performance.

You can have a large Virtual Memory but bad performance.  The box I run Xfce on, for instance, is an old Fujitsu Lifebook.  It came from Fujitsu with 256MB of RAM and Windows XP Pro.  XP wants 512MB of RAM minimum to perform acceptably.  XP Technically ran, but it was snail slow because Windows was spending far more time swapping to disk than doing actual work.  (In the old mainframe days, this was called "death by thrashing".)

I installed Linux precisely to have something that would perform more or less acceptably on low end hardware.

I was not justifying the very high numbers. As I said I've never used CentOS, so I can't even tell for sure what data the OS should be giving Taskmanager when asked.

I've used CentOS, but not with Xfce.  It was all server installations, with no GUI.;  Access and modification were via telnet to a command line.

Maybe it's a bug in Taskmanager (it doesn't understand what the system is saying).

That sounds possible.

Or the memory management algorithm might be more liberal about virtual memory usage if the machine has a 64-bit architecture, and if that's what jsherk has, of course.

That may also be the case.

But as mentioned, the VM column should be the total amount of memory the application has attempted to allocate.  I have a hard time believing an app should request 140 gigabytes of memory, even on a 64 bit system.
______
Dennis

Offline

#6 2010-02-02 13:36:45

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

Thanks for replies...

I ran top and here is what I got:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2072  632  540 S  0.0  0.0   0:00.47 init
 2417 mysql     15   0  135m  18m 4048 S  0.0  0.6   0:00.40 mysqld
 3143 root      15   0 76596  11m 9496 S  0.0  0.3   0:00.12 xfdesktop
 2954 root      15   0 42628 9284 7416 S  0.0  0.3   0:00.14 xfce4-panel

If VIRT is the same as VM-Size, then there must be a bug in Taskmanager with how it is displayed!?!

Offline

#7 2010-02-02 13:44:06

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

Also, here are the specs for the machine it is running on.
I believe this is 32-bit machine but not entirely sure.
It has CentOS 5.4 as the OS.

Dell PowerEdge T100
Dual Core Xeon E3120 Processor6MB Cache, 3.16GHz, 1333MHz Front Side Bus
4GB, DDR2, 800MHz, 2x2GB,Dual Ranked DIMMs
2x 250GB 7.2K RPM Serial ATA 3Gbps 3.5-in Cabled Hard Drive
Onboard SATA, 1-2 Drives connected to onboard SATA controller

Offline

#8 2010-02-02 13:55:32

DMcCunney
Member
Registered: 2010-01-28
Posts: 21

Re: Taskmanager shows huge VM-Size?

jsherk wrote:

Thanks for replies...

I ran top and here is what I got:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2072  632  540 S  0.0  0.0   0:00.47 init
 2417 mysql     15   0  135m  18m 4048 S  0.0  0.6   0:00.40 mysqld
 3143 root      15   0 76596  11m 9496 S  0.0  0.3   0:00.12 xfdesktop
 2954 root      15   0 42628 9284 7416 S  0.0  0.3   0:00.14 xfce4-panel

If VIRT is the same as VM-Size, then there must be a bug in Taskmanager with how it is displayed!?!

I can't find docs for LXTask that define what it thinks VM is, but I'd expect it to be the same as VIRT under top.

The results you get from top are in line with what I'd expect.  LXTask is apparently displaying the total number of bytes of virtual memory used by mysqld, not the number of kilobytes, even though it says "kB".  (135 x 1,048,576 = 141,577,760)
______
Dennis

Offline

#9 2010-02-02 14:02:56

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

For mysqld, what does the little m mean beside 135? Is that mean Mbytes instead of bytes?

Offline

#10 2010-02-02 14:48:16

DMcCunney
Member
Registered: 2010-01-28
Posts: 21

Re: Taskmanager shows huge VM-Size?

jsherk wrote:

For mysqld, what does the little m mean beside 135? Is that mean Mbytes instead of bytes?

Yes.

______
Dennis

Offline

#11 2010-02-04 10:56:11

mmassonnet
Moderator
From: the milky way galaxy
Registered: 2006-07-30
Posts: 99
Website

Re: Taskmanager shows huge VM-Size?

No follow-ups on the mailing list for what I said, so I'm replying here:

http://foo-projects.org/pipermail/goodi … 02655.html
I'm running xfce4-taskmanager 0.4.1, I remember that in 0.3.x there
was a problem with the value for the memory usage (it was
miss-calculated) (and btw if lxde folk may by chance be reading, fix
this in your fork as well). You can always compare with top or 'ps x
-O vsz --sort vsz'.

So please, what version of the task-manager are you running?


Mike

Offline

#12 2010-02-04 14:05:45

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

Using CentOS 5.4 with XFCE version: 4.4.2

I cannot figure out how to find the Taskmanager version though... I googled it but am not finding how to figure that out!

Thanks

Offline

#13 2010-02-04 19:25:05

DMcCunney
Member
Registered: 2010-01-28
Posts: 21

Re: Taskmanager shows huge VM-Size?

jsherk wrote:

Using CentOS 5.4 with XFCE version: 4.4.2

I cannot figure out how to find the Taskmanager version though... I googled it but am not finding how to figure that out!

I believe you are using lxtask as  the task manager.  If so, there should be a menu line at the top of the lxtask window.  Clicking on Help/About should return a box with a version number.
______
Dennis

Offline

#14 2010-02-04 20:14:47

ManOfSteel
Member
Registered: 2005-10-06
Posts: 104

Re: Taskmanager shows huge VM-Size?

DMcCunney wrote:

I think you're conflating address space and virtual memory.  They aren't the same thing.
[...]
Virtual Memory is a bit different. [...] In addition to physical RAM, there is  a swap area on disk.

I don't think I'm confusing anything. As I said, "VM may even be stored on a disk drive through memory pages swapping".
You just added more information to- and repeated what I already said. Again, if you have a specific objection, quote a sentence I wrote and show me how it is false or incomplete.

DMcCunney wrote:

The OS divides RAM into 4K pages, and keeps track of what pages are being used by what processes.

It's the MMU (H/W) that divides physical memory into pages, not the OS. The OS merely manages these pages by initializing and subsequently modifying the page directory and page tables entries for each process. Other than that, the only thing an OS can do is enable/disable paging and PAE, and configure the size of pages: 4KB, 2MB or 4MB.

DMcCunney wrote:

This is why more RAM is the best upgrade to improve performance.

Naturally. But it has nothing to do with this thread. Those 4 process mentioned are not starving. They're using less than 10 physical memory megabytes altogether.

DMcCunney wrote:

Not entirely true.  See above about adding RAM to boost performance.

How does it contradict anything I said? I concluded by saying the "user should only be interested in the physical memory usage.", i.e. installed RAM, i.e. what you're talking about.

DMcCunney wrote:

You can have a large Virtual Memory but bad performance.

And I explicitly said users should not worry about VM because it's used internally by the H/W and OS. IOW, what you said concludes what I said.

Offline

#15 2010-02-04 20:33:28

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

There does not appear to be any Help/About with this taskmanager... I left-clicked and right-clicked everywhere on the Taskmanager window but no Help or About.

From the shell however, I ran "find . -name 'xfce4-taskmanager*' " and the following showed up:
./usr/share/doc/xfce4-taskmanager-0.4.0

So I will assume (never assume) that it is probably v0.4.0

And it would appear, if we compare the VM-Size in Taskmanager to VIRT in Top that there is a bug in Taskmanager and that it is displaying bytes only even though it says kilobytes.

Thanks

Offline

#16 2010-02-05 03:25:14

ManOfSteel
Member
Registered: 2005-10-06
Posts: 104

Re: Taskmanager shows huge VM-Size?

Please report it upstream to Bugzilla. Apparently no one has reported it yet there.

Offline

#17 2010-02-05 03:38:04

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

Offline

#18 2010-02-05 22:16:44

jsherk
Member
Registered: 2010-01-29
Posts: 13

Re: Taskmanager shows huge VM-Size?

Okay, here is the lowdown after filing the bug report, they said this:

The version actually says 0.4.0-rc2. So in reality it is version 0.3.4 with
some features, and this bug is already fixed in the latest release (0.4.0 final
and up).

What you can do is open a bug at CentOS and propose the attached patch, it
fixes your issue.

So it is/was a bug. I will post to Centos and see what they say.

Thanks

Offline

Board footer

Powered by FluxBB