2 GB RAM and paging???

Posted:
in macOS edited January 2014
Hi,



i have an iMac G5 20" and 2 GB RAM. I can see that my system is paging a lot. Using iTunes and Safari i get 23000 pageouts and 2800 pageins. My virtual memory-size is 4,5 GB. Why that? I thought 2 GB RAM should be enough but if i see the paging i must be wrong!?



Regards,



Peter

Comments

  • Reply 1 of 16
    hirohiro Posts: 2,663member
    I think you have your numbers backwards. It's physically impossible to have more page-outs than ins. EVERYTHING ever read into memory counts as a page in for each individual 4k block.



    As for the page-outs, what else is loaded on your machine? Because something else is eating/leaking memory (or those stats are for a VERY LONG time between reboots).
  • Reply 2 of 16
    you are right... i switched pageins and pageouts..

    but i rebooted and right after booting i got 10000 pageouts and 0 pageins...is this normal? just opening safari gets 500 new pageins...every app i open increases the amount of pageins... the virtual memory increases very fast from 3 gb to 5 gb just by opening safari, itunes, idvd, garageband...

    i get the information from the activity monitor in the utilities-folder...can someone test this and confirm such a behaviour?
  • Reply 3 of 16
    Is activity monitor showing that you have any inactive and/or free memory left? Also, are you feeling a speed downgrade?
  • Reply 4 of 16
    no, i am not feeling a speed downgrade.



    activity-monitor says:



    inactive memory: 158 MB

    free memory left: 1,58 GB



    this seems to be ok for me!?
  • Reply 5 of 16
    I am not the greatest with terminology but is paging the same as swap-file? it may just be RAM use. I have 768 of RAM in my PB 12" (G4) and although i sometimes use all my free ram, i almost always have some inactive left. with 2 gigs, i couldn't imaging the amount of free and other i would have
  • Reply 6 of 16
    mcqmcq Posts: 1,543member
    Quote:

    Originally posted by equinox

    no, i am not feeling a speed downgrade.



    activity-monitor says:



    inactive memory: 158 MB

    free memory left: 1,58 GB



    this seems to be ok for me!?




    That's fine. I think you'll get pageouts to start with, since nothing or very little will be in memory on a cold boot. Pageins should occur normally as apps open up the first time, since you're loading in stuff from HD as it's the first time the app is opened.



    You have gobs of free memory, so there shouldn't be much swapping at all.
  • Reply 7 of 16
    kickahakickaha Posts: 8,760member
    equinox, you're fine.



    1) The swap space used on disk is the highest peak space used at any given time - the disk space isn't recovered until a reboot. Launch a few dozen apps, watch the disk space go up, then quit them all. Same swap space used.



    2) You will have a lot of free space in RAM if you quit apps and don't switch to a previously swapped out app... it doesn't pull things back into RAM unless it needs to.
  • Reply 8 of 16
    mmmpiemmmpie Posts: 628member
    Quote:

    Originally posted by equinox

    you are right... i switched pageins and pageouts..

    but i rebooted and right after booting i got 10000 pageouts and 0 pageins...is this normal? i get the information from the activity monitor in the utilities-folder...can someone test this and confirm such a behaviour? just opening safari gets 500 new pageins...every app i open increases the amount of pageins... the virtula memory increases very fast drom 3 gb to 5 gb just by opening safari, itunes, idvd, garageband...




    That is just how the memory system in modern OSes works. When an application is loaded none of its pages are present, so they get paged in ( its really just a conceptual difference to 'loading' the application from disk ).



    The amount of VM will go up as you open more applications, it is the total amount of memory that apps have requested. Even though lots of it is shared, or not actually allocated.



    There are a few things you can do to get a better idea of paging activity:



    a) install menu meters ( macupdate.com ). It has disk activity and paging activity menu items. I just the disk activity item. When you switch an app and the disk read goes solid you are paging. It is a really fun little app.



    b) your page numbers arent actually that bad. Depending on the time frame, you are looking for millions of pageins as an indicator of heavy page activity.



    c) have a look at the size of the page files. Open up terminal and 'cd /private/var/vm' then 'ls -al'

    You will see a number of files called swapfile[x]. The number of swapfiles you have tells you how much virtual memory is actually being used. My lightly used G3 has one 67mb file, my heavily used emac normally has 3 80mb files ( for a total of 240mb ). Compare that with my windows machine at work, regularly tops 2gb of swapfile.
  • Reply 9 of 16
    here is a screenshot... it is in german, but i think you can guess what it means:



  • Reply 10 of 16
    Hi Guys,



    thank you very much for your help! Your descriptions of how the os works helped me alot! Thanks! I can sleep quiet now



    btw: the pagefile-size is 67108864 bytes... this seems to be ok!
  • Reply 11 of 16
    randycat99randycat99 Posts: 1,919member
    Can we have a page in/page out contest now? Mines is 265 526/ 291 295



    Yes, I tend to let OSX keep running until it dies, major things become inoperable (Finder goes berserk or modem refuses to dialup), or to clear out the "you must now restart your machine" messages after installing various softwares or updates.
  • Reply 12 of 16
    Quote:

    Originally posted by equinox

    here is a screenshot... it is in german, but i think you can guess what it means:







    equinox, in activity monitor switch "my proccess" to "all processes" and see if anything else is running eating up resources.
  • Reply 13 of 16
    Wow, good catch. I didn';t even notice that at first. I am curious as to what it may be if anything,
  • Reply 14 of 16
    well, as i understood these paging activities are quiet normal and nothing unusual. under "all processes" i cann see a process called "kernel task" which uses 65mb memory and 1,17GB (!!!) of virtual memory, and this is right after booting! Is this normal? whats does your activity monitor show you?
  • Reply 15 of 16
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Hiro

    I think you have your numbers backwards. It's physically impossible to have more page-outs than ins. EVERYTHING ever read into memory counts as a page in for each individual 4k block.





    I don't think so. I've got 300K pageouts now, and less than 100K pageins. If you run a big app, then another big app, then quit the first one, there will be pageouts associated with the swapout of app A to make room for B.



    OS X memory-maps a lot of stuff to VM for faster load. Those portions of the apps count as pageins, but normal loading from disk does not.



    So it's normal to see pageins as part of the efficient program load process. Pageouts mean there was a point in time at which all of the RAM was used up (as is the proper procedure). It could have been a month ago or a minute ago.
  • Reply 16 of 16
    Quote:

    Originally posted by equinox

    well, as i understood these paging activities are quiet normal and nothing unusual. under "all processes" i cann see a process called "kernel task" which uses 65mb memory and 1,17GB (!!!) of virtual memory, and this is right after booting! Is this normal? whats does your activity monitor show you?



    This is just taking an educated guess but...i think it is fine. Remember, OS X needs a certain amount of memory to run. It takes the memeory it needs as different tasks. Kernal Task is probably just one of them. Now if it was eating you CPU %, then i would worry
Sign In or Register to comment.