[Help] Memory, Vm, Swap Files And Other Unix Junk

Before I start, I want to present the following snapshots I took of a system monitor at different intervals after a reboot:

ram.jpg

ram2.jpg

ram3.jpg

ram4.jpg

As you can see, the amount of free RAM dramatically decreases, and after a while the Virtual Memory pageins increase. :(

My understanding is that in UNIX systems, its ok if the RAM constantly goes down - it will mean faster app launch/response time. However, from what I've read, VM pageouts are baaad. >.<

I wasa wondering, is there any way I can disable Virtual Memory via a UNIX command? What the fudge is the use of Virtual Memory anyway? Also, how can I reduce the number of pageouts?

#39685

Well, OSX is not not a normal unix. Its got a lot of visual stuff that I don't know about.

Yes, you RAM constantly going down is normal, because Unix caches memory (unlike windows). So when you close a program, part of it will stay in memory unless that memory is really needed.

But your pagefile increasing isn't really the same. See, your memory isn't full (not even close), so what im thinking is that you've got a program that has a lot of "unimportant" data. In unix, the pagefile is used to store really unimportant stuff, that still has to be in memory. So maybe some service or program has a lot of useless data its storing. Web browsers often do that, because obviously a website isn't that important.

But, this is just a guess. It doesn't seem like a great sign. Type "top" in a terminal, and post it. Maybe we can find out what the problem is.

#39686

Originally posted by contrasutra@Jul 11 2003, 10:03 PM

But your pagefile increasing isn't really the same. See, your memory isn't full (not even close), so what im thinking is that you've got a program that has a lot of "unimportant" data. In unix, the pagefile is used to store really unimportant stuff, that still has to be in memory. So maybe some service or program has a lot of useless data its storing. Web browsers often do that, because obviously a website isn't that important.

Possibly a P2P app? I'm running a few via telnet (yeah, I know - telnet sucks). Maybe that is the culprit?

#39697

Could be.

post your output of "top". That will tell you where all the VM and RAM is going.

#39700

oh shoot. I already restarted.

Anyway, here's the output:

Processes:  43 total, 2 running, 41 sleeping... 105 threads            23:30:22
Load Avg:  0.49, 0.54, 0.53     CPU usage:  10.3% user, 5.6% sys, 84.1% idle
SharedLibs: num =   95, resident = 19.8M code, 2.43M data, 8.49M LinkEdit
MemRegions: num = 2520, resident = 26.7M + 7.25M private, 43.0M shared
PhysMem:  54.0M wired, 65.4M active, 92.9M inactive,  212M used,  428M free
VM: 1.52G + 61.1M   6258(0) pageins, 0(0) pageouts  

 PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
 454 top          6.5%  0:00.56   1    14    17   200K   336K   496K  13.6M
 427 tcsh         0.0%  0:00.12   1    10    15   340K   600K   788K  5.73M
 426 login        0.0%  0:00.40   1    12    33   244K   388K   576K  13.7M
 425 Terminal     4.6%  0:01.03   4    66   124  1.27M  5.82M  12.5M  72.0M
 417 Safari       0.0%  0:18.56   6   114   233  11.1M  12.3M  32.0M  95.7M
 416 Finder       0.0%  0:01.04   2    78   103  1.67M  8.90M  12.9M  74.7M
 414 AquaMonSer   1.8%  0:01.11   3    40    28   324K   692K  1.02M  14.2M
 413 SecurityAg   0.0%  0:01.01   3    81   105  1.42M  4.94M  13.2M  70.3M
 403 AquaMon      1.8%  0:04.60   4    87   138  2.34M  6.13M  15.8M  73.3M
 399 SystemUISe   0.0%  0:00.66   2    87   103  1.19M  4.72M  12.1M  69.5M
 398 aped         0.0%  0:00.26   1    23    22   244K   704K   844K  14.0M
 397 Dock         0.0%  0:02.39   3    89   170  1.25M  8.82M  10.4M  71.4M
 391 pbs          0.0%  0:02.04   2    27    29   636K   832K  1.45M  14.6M
 385 DirectoryS   0.0%  0:00.63   3    54   142   748K  3.38M  3.24M  21.4M
 367 cron         0.0%  0:00.01   1     8    16    72K   348K   124K  13.5M
 363 nmbd         0.0%  0:00.04   1     8    21   428K   928K   544K  14.6M
 361 smbd         0.0%  0:00.01   1     8    21   428K  1.03M   356K  15.5M
 360 cupsd        0.0%  0:00.14   1     8    19   156K   512K   416K  14.9M
 355 inetd        0.0%  0:00.01   1     8    14    48K   324K   112K  1.28M
 349 ntpd         0.0%  0:00.08   1     8    16   108K   492K   304K  1.52M
 345 loginwindo   0.0%  0:02.08   5   158   156  2.54M  8.46M  9.17M  63.7M

#39703

No, this is funny.

Those monitors you used are sucking up your VM. They probobly store the logs there. LOL

Along with that, Safari is using a lot of VM, like I had mentioned. Browsers cache websites in the Pagefile.

And apart from that, its the dock/finder. Thats just what OSX does for some reason.

That, and "SecurityAg" is taking up a lot. I don't know what that is, maybe you do. And the Terminal is taking a lot of VM.

I guess all those graphics use a lot of Pagefile. Windows has that problem, 100-200MB of Pagefile always seem to be taken up in it. Linux/BSD really aren't as graphically strong, so they dont need to use it as much (at all).

Your Memory usage is fine though.

If things are feeling sluggish, try disabling CUPS and SAMBA, because you have them running. Because I dont think you can really disable the dock, finder, etc.

I didn't know OSX used CUPS. That explains a lot.

EDIT:\\ You should put your VM on a seperate partition (and drive if you have one). This speeds things up GREATLY,like 10-20% (on any OS, but especially OSX). I was also reading, and there's aparantly a program for OSX called "Swap Cop" thats suppose to help w/ this stuff.

#39704

wow cool.. thanks for the tips.

About the speed, no, its not sluggish at all. I was just concerned is all.

And I'm gonna check out swap cop.

#39708

is there a way to disable CUPS via Terminal?

#39793

"killall cupsd", you may have to be root.

Be warned, you wont be able to print.

#39804

and why would you want to disable samba?

i suppose if you never connect to your windows computers you could... it doesn't seem worth the bother to me.

Is your system slow or were you just wandering what was going on, i'd love to be able to play unrealTournament2k3 on my laptop like you can :cry:

[i'm sure you already know.. but if you do want to disable samba then its the smbd and nmbd listed in your top readout]

fissy

#39812

no no its not slow or anything. I just wanted some clarification on the geeky UNIX terms, and what the numbers mean in relevance to my my system. So I thought, who better than Contra to help me out? ;)

:nerd: :joystick:

#39815

I hope that nerd emoticon wasnt suppose to represent me. <_<

What else am I suppose to do in my free time? Interact with humans?! Please.

#39816

Originally posted by contrasutra@Jul 12 2003, 02:15 PM

I hope that nerd emoticon wasnt suppose to represent me. <_<

What else am I suppose to do in my free time? Interact with humans?! Please.

dude, you're supposed to be proud of your knowledge. :huh:

umm.. I think I made the mistake of using the emoticon in my post in the Desktops thead. :shy:

#39817

Im joking, its surprising a very good resemblence.

#39819

lol we should cal this the "taha,contra thread" now...

lol good times you got some good knowledge there contra (Y)

-bolero

#39833