Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory utilization problem.

Status
Not open for further replies.
Jan 16, 2003
60
0
0
US
So i'm starting to do some performance monitoring of my linux system. I'm very confused.

At first, I ran a 'TOP' command to see my memory utilization. I was shocked that I was totally out of memory!

top - 12:50:01 up 5 days, 20:41, 1 user, load average: 0.00, 0.01, 0.00
Tasks: 114 total, 1 running, 113 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.4% us, 0.1% sy, 0.0% ni, 98.8% id, 0.6% wa, 0.0% hi, 0.0% si
Mem: 2335132k total, 2304920k used, 30212k free, 309096k buffers
Swap: 2048248k total, 160k used, 2048088k free, 1686664k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2822 root 15 0 5340 1968 1544 R 3.8 0.1 0:00.02 top
1 root 16 0 1876 552 472 S 0.0 0.0 0:00.97 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.10 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.08 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.15 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/1
6 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 events/0
7 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 events/1
8 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
27 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
28 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/1

I then read an article that says linux tried to use all memory so it does not waste performance, and I was really not out of memory after all. After running 'FREE -M' i was glad to know that I had around 2GB of memory free.

total used free shared buffers cached
Mem: 2280 2250 29 0 301 1647
-/+ buffers/cache: 301 1978
Swap: 2000 0 2000

Now here's the confusing part.... I wanted to know what processes were using the memory. After reading an arcile I ran this command.

ps -eo pid,vsize,args,wchan --sort=vsize

18630 26764 /usr/sbin/httpd -
1737 155676 /usr/sbin/slapd -
1956 302392 /usr/local/mysql -
1959 302392 /usr/local/mysql -
1960 302392 /usr/local/mysql -
1961 302392 /usr/local/mysql -
1962 302392 /usr/local/mysql -
1963 302392 /usr/local/mysql -
1964 302392 /usr/local/mysql -
1965 302392 /usr/local/mysql -
1966 302392 /usr/local/mysql -
1967 302392 /usr/local/mysql -
768 302392 /usr/local/mysql -
769 302392 /usr/local/mysql -
770 302392 /usr/local/mysql -
771 302392 /usr/local/mysql -
772 302392 /usr/local/mysql -
2821 302392 /usr/local/mysql -
2824 302392 /usr/local/mysql -
2826 302392 /usr/local/mysql -
2062 797268 /usr/java/jre1.5 -

How can my system have almost 2Gb free, yet have more than 5GB of processes listed here as using VSize? Somebody please help me.
 
I have read that document. Thanks for the link though. ;)

Normally this would not confuse me, but if you look at my free -m command, I am using Zero swap file.

So where is this mysterious virtual memory coming from?
 
Now that confuses the hell out of me. ;)

How would I determine how much memory MySql is really using then? Out of the 5GB it is reporting. ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top