RES column in top command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers RES column in top command
# 1  
Old 05-27-2002
Question RES column in top command

With 'top' I see on a particular line in the SIZE and RES column:

SIZE RES COMMAND
131M 117M ns-slapd


The hp server has 512 physical memory.


Does this mean that ns-slapd takes 117M from real memory?


guus
# 2  
Old 05-27-2002
On our HP systems I see lines like:
19644K 16096K run 27001:36 97.61 97.44 dataserve

I have never seen the numbers switch from K to M as you show. And there are several other fields between the RES field and the command. Still if our process grew by a factor of 10, I suppose it might switch from K to M. And maybe you just left those other fields out.

Anyway, on our top display, at least, the RES (which stands for resident) is an approximation of the memory currently in use by the process. That's a little different than saying the process "takes it from real memory". The process has a text segment that could be shared. It may be using shared libraries. It may be using shared data memory. Yes, the process need these items, but they are not dedicated exclusively to this process.
# 3  
Old 05-28-2002
Yes, it was a snapshot of the screen.
Some more full lines are:

Memory: 271032K (120492K) real, 270440K (88600K) virtual, 5040K free

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 2306 interbas 240 20 63040K 101M run 417:02 56.04 55.95 ibserver
1 ? 3071 netscape 152 20 131M 113M run 1229:41 17.88 17.85 ns-slapd


What does the "memory:" lines tells me about the real memory?
What do you say about the "free" memory on the "memory" line?
Isn't it very little memory left?

"ibserver" is the Borland Interbase RDBMS and the whole system
is very slow when 10-20 users are connected and querying the database.

The unix admin tells me the physical memory is 512.
I dont see the relationship between this number and the "memory" line above.


Thanks for your time,
Guus
# 4  
Old 05-28-2002
Top is telling you about user memory. For the most part, this is processes only. It is possible to create a System V shared memory segment and then orphan it with no processes attached to it. Other than this, it is all processes.

Memory: 271032K (120492K) real,

Those orphaned shared memory segments (if any) and processes together are using about 271 MB on your system. But only about 120 MB has actually been used in past 30 seconds. If the other 160 MB has not been locked into core, it could be paged out if the system needed more space.

270440K (88600K) virtual,

Your virtual memory is about the same size as your physical memory. They won't be exact because the numbers are changing as they are collected. Since they are close, everything, active or not, is in core. This is a good indication that your system probably has plenty of memory for it's workload.

5040K free

You have only 5 MB free. No, that's not a lot. But having many MB just sitting in your computer with nothing to do won't make it any faster. Modern OS theory says that you keep stuff loaded into memory on the chance that it might be used again. If you were low on memory, the active real would be a much higher percentage of the total real and your virtual would probably be greater than your real. But the real test of memory shortfalls really comes from looking at page-outs on the vmstat output. I'm guessing that they would be zero in your case.

And no, 271 + 5 does not equal 512. You can't use everything for processes. You also have a kernel and a buffer cache in core.
# 5  
Old 05-28-2002
Thanks for the detailed info.
vmstats shows this page:

$ vmstat -s
390489 swap ins
390489 swap outs
1137 pages swapped in
4538 pages swapped out
18446744072880609796 total address trans. faults taken
748405391 page ins
3127188 page outs
49148982 pages paged in
4407750 pages paged out
658997142 reclaims from free list
701182458 total page reclaims
195431 intransit blocking page faults
18446744072486879206 zero fill pages created
1903650513 zero fill page faults
198667981 executable fill pages created
1194367 executable fill page faults
0 swap text pages found in free list
115755060 inode text pages found in free list
2014 revolutions of the clock hand
9605277 pages scanned for page out
119750816 pages freed by the clock daemon
1451759978 cpu context switches
1448504563 device interrupts
763125699 traps
498241872 system calls
18446744073004544600 Page Allocate Successes for Page size 4K
2081861 Page Allocate Failures for Page size 4K

guus
# 6  
Old 05-28-2002
vmstat -s is pretty useless even if you reboot your system regularly. How long has your system been up????

At some point, you were in a severe memory crunch, but there is no way to tell when that happened. In your case, it coulda been months ago.

To see if you have a memory problem now, do something like "vmstat 1 5" and then ignore the first line.
# 7  
Old 05-29-2002
Last system boot was March 8.
Here is the output of vmstat:


vmstats info

procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
1 0 0 11962 9939 52 5 1 0 10 0 0 557 2969 246 57 4 38
5 0 0 45815 8705 100 8 6 0 10 0 0 585 4717 609 79 20 1
5 0 0 48462 7403 51 4 3 0 3 0 0 537 2788 414 85 13 1
4 0 0 47254 8550 100 17 3 4 29 0 0 572 6391 369 55 25 20
1 0 0 13569 9400 81 14 2 0 12 0 0 549 4125 256 62 10 28
8 0 0 14105 9105 80 12 2 0 17 0 0 615 3838 313 54 14 32
1 0 0 12090 8401 45 8 1 0 7 0 0 615 2610 283 58 10 32
3 0 0 11453 7262 100 19 0 0 18 0 0 645 5189 310 45 19 36
4 0 0 46413 6437 34 6 0 0 6 0 0 657 4011 276 49 12 40
1 0 0 13011 6489 73 9 1 0 9 0 0 620 5033 268 48 16 35
3 0 0 45928 6739 61 6 1 0 6 0 0 602 3611 250 52 10 38
6 0 0 46205 6705 69 8 0 0 8 0 0 620 3747 381 69 15 17
2 0 0 45035 6820 36 2 0 0 2 0 0 608 2407 346 66 11 23
4 0 0 45461 6215 77 6 3 0 6 0 0 588 3378 295 63 13 24
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Top command

Hi All, i am using the below command and once get the output and i need to keep the first batch only.in this case how to do this one. please help me on thistop -b -n 5 >top.txt Thanks, (3 Replies)
Discussion started by: bmk
3 Replies

2. Shell Programming and Scripting

Remove top and bottom for each column

Dear All I was wondering if someone could help me in resolving an issue. I have a file like this: column1 column2 2 4 3 5 8 9 0 12 0 0 0 0 9 0 87 0 1 0 1 0 1 0 4 0 (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies

3. Shell Programming and Scripting

top 10 highest and lowest percentile from a column

Hi, I want to extract the the top 10 and lowest 10 percentile for a column of values. For example in column 2 for this file: JOE 1 JAY 5 JAM 6 JIL 8 JIB 4 JIH 3 JIG 2 JIT 7 JAM 9 MAR 10 The top 10 lowest will be: JOE 1 and the top 10 highest will be: (2 Replies)
Discussion started by: kylle345
2 Replies

4. Shell Programming and Scripting

Command to find the Memory and CPU utilization using 'top' command

Hi all, I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command. Thanks in advance. Thanks, Ananthi.U (2 Replies)
Discussion started by: ananthi_ku
2 Replies

5. UNIX for Dummies Questions & Answers

top's USER column width variation

hello, does anyone know how to expand the column width so it could contain full USER cell and not cut it in top ? Now it has eleven symbols but I can see only eight actualy I found only PID, PPID and %CPU columns variation possibilities in changelog (procps v.3.2.5). thanks in advance. (1 Reply)
Discussion started by: bugs_moran
1 Replies

6. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

7. Shell Programming and Scripting

Top command

Hey, Using one single line of command i am trying to show the CPU usage for 4 processors and then filter it out and write it to a text file. Everything seams ok except that i am not able to switch from having the top command show me all CPU processes seperate opposed to showing me the average of... (8 Replies)
Discussion started by: Georgesaa
8 Replies

8. SCO

HP-UX top command

Is there a command in SCO Unix that does the same as the top command in HPUX. The command displays the jobs using the most system resources. Thanks You (0 Replies)
Discussion started by: joestrosser
0 Replies

9. UNIX for Dummies Questions & Answers

top command

hi guys, i am having a dual cpu xeon machine. i came to know that i can view the performance by giving top command. but top command shows only the usage of one cpu in percentage while the process are using more than 100% usage in the list . can i know separately the usage of cpus. can you... (5 Replies)
Discussion started by: bijuhpd
5 Replies
Login or Register to Ask a Question