Solaris 10 - VMSTAT free memory behavior puzzling

I am running a rather complex and large application on a Sun v215 (2 UltraSPARC IIIi 1.5 ghz with 16 GB RAM).
When I start the application up vmstat reports about 95% free memory but over time (7 days) the free memory reported by 'vmstat 60' decreases at a steady rate until it appears to level out around 80% free memory. I do not have any memory leaks in the application. The application is a combination of Java and C code. There is a fare amount of I/O but nothing overwhelming. Is there an explaination for the decrease and leveling out of the free memory over this time period?

Thanks! That is what I was thinking but I wanted someone to validate my theory. Do you have any technical reference(s) (i.e. article, book, webpage) that backups the statement "If a Solaris system have a lot of free memory, Solaris will start to cache filesystem pages to the memory until the memory is used about 80-90%."?
Any technical reference will help me make my case with our customer much easier. Thank you once again for your help.
As followup note: I re-ran some tests with vmstat -p and there is quite a bit of file system paging occuring. I do have many file-page-ins. However I would not expect the file-page-out and file-page-free to be as high as they are if free memory continues to decrease to 80%.

Similar Messages

  • Monitoring Free memory in solaris 8

    Hi,
    I will like to monitor the amount of free memory in my system. I understand that as Solaris 8 implements "cyclical page cache", the value read from the "free list" column of vmstat will be much more accurate than previous version.
    But when i run it on my sparc, the value is 50208KB.
    But when i run Memtool 3.8.2, these are the values
    Total memory:119Mb
    Kernel memory:10Mb
    Application:52Mb
    Exe and lib :15Mb
    File Cache: 33Mb
    Free, file cache : 3Mb
    Free, free :3 Mb
    (33 + 3 + 3) =>39Mb
    Can someone tell me how to reconcile the values from this 2 tools? Which is more accurate? (or is there a better method?)
    Thanks!

    Kalpesh
    if you're reading this it would be @&$%#&$( useful to folks in this list to actually BE ABLE TO REFER TO KNOWN SUN BUGS and to be able to report their own.
    I couldn't log in to the sunsolve site - do I need a special password to be able to view bug status? (I agree I can find patches there, but
    not being able to view/report bugs as a user under the free license program is ridiculous).
    How can we get resolution on this?

  • How to get the size of free memory in unix?

    I have one oracle database running in unix, and I want to tune the memory used.
    additional, I want to create another database in this server.
    I don't know how many memory left in it.
    Could you tell which unix commands can be used to find out the size of free memory?
    Thanks

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • Memory leak puzzle

    Hello guys,
    I'm having a very, very difficult time debugging this memory leak on my server. I'm pretty sure it's related to berkeley DB XML, bu I just couldn't prove this in numbers.
    My server: Debian GNU/Linux 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux, 512 MB of RAM, Pentium 4-class processor.
    Here's the behaviour. I start Tomcat 5.5.15, the application is loaded, current memory status:
    delegaciainterativa:~# free -m
    total used free shared buffers cached
    Mem: 440 346 94 0 14 282
    -/+ buffers/cache: 49 391
    Swap: 909 4 905
    So, I've got 94 MBs of free memory. Now, here's this JSP I'm running:
    <%@ page language="java" %>
    <%@ page session="true" %>
    <%@ page import="br.gov.al.delegaciainterativa.admin.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.controles.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.admin.areas.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.controles.BdbXmlAmbiente"%>
    <%@ page import="java.util.*"%>
    <%@ page import="javax.servlet.RequestDispatcher"%>
    <%@ page import="com.sleepycat.dbxml.XmlContainer"%>
    <%@ page import="com.sleepycat.dbxml.XmlDocument"%>
    <%@ page import="com.sleepycat.dbxml.XmlException"%>
    <%@ page import="com.sleepycat.dbxml.XmlIndexDeclaration"%>
    <%@ page import="com.sleepycat.dbxml.XmlIndexSpecification"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryExpression"%>
    <%@ page import="com.sleepycat.dbxml.XmlResults"%>
    <%@ page import="com.sleepycat.dbxml.XmlTransaction"%>
    <%@ page import="com.sleepycat.dbxml.XmlUpdateContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlValue"%>
    <%@ page import="com.sleepycat.dbxml.XmlUpdateContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryContext"%>
    <%@ include file="config.jsp"%>
    <%!
         final String _grupoPagina = "visualizaLogsUsuario";
    %>
    <font face="verdana" size="1">
    <%
              HttpSession sessao = request.getSession(true);
              BdbXmlAmbiente bdbxmlAmbiente = new BdbXmlAmbiente();
              XmlContainer container = bdbxmlAmbiente.abrirContainer(Config.getNomeContainerBO());
              String fullquery = "";
              fullquery = "for $i in collection('"+ Config.getNomeContainerBO() +"')/BO \n";     
              fullquery += "where $i/cadastro/fim/data/date >= '2006-00-00' \n";
              fullquery += "return $i";
    ArrayList docs = new ArrayList();
    XmlResults results = null;
         XmlValue value = null;
         XmlDocument document = null;
    try {
         XmlQueryContext context = bdbxmlAmbiente.getEnvironmentInit().getManager().createQueryContext();
         context.setEvaluationType(XmlQueryContext.Eager);
         XmlQueryExpression xqe = bdbxmlAmbiente.getEnvironmentInit().getManager().prepare(fullquery, context);
         results = xqe.execute(context);
                   out.println("<p>fez busca, deletando...</p>");
    while (results.hasNext()) {
         value = results.next();
    document = value.asDocument();
         document.fetchAllData();
         out.println(document.getName() + "<br>");
    //out.println("<p>total: " + results.size() + "</p>");
    } catch (Throwable e) {
         out.println(e);
    e.printStackTrace();
    } finally {
                   results.delete();
    %>
    This basically loads about 1600 small documents (~5KB) from the container, and guess how memory is now:
    delegaciainterativa:~# free -m
    total used free shared buffers cached
    Mem: 440 429 11 0 14 282
    -/+ buffers/cache: 132 308
    Swap: 909 4 905
    That's about 83Mbs consumed!! And if I perform other searches like this, this keeps eating up more and more memory, then swapping and getting slow... and sometimes crashing Tomcat.
    Here's the big mistery: the memory NEVER GETS RELEASED. Even calling delete(), as I did explicitily, it doesnt release the memory. It keeps increasing as searches are performed.
    Now, let's go to the profiler. I've installed JProfiler and run it on this server, and here're the results: http://freeunix.com.br/All_Objects.html
    Even more puzzling, I havent got any impressive amount of memory consumption.
    So, what can I do to figure this out? The only way to release memory is to restart the server once and a while, which far from ideal.
    I'd really would appreciate any help about this, since I'm on production with this server.
    cheers,
    -- Breno Jacinto

    Hello George,
        I tried this:
    <%
              HttpSession sessao = request.getSession(true);
              BdbXmlAmbiente bdbxmlAmbiente = new BdbXmlAmbiente();
              XmlContainer container = bdbxmlAmbiente.abrirContainer(Config.getNomeContainerBO());
              String fullquery = "";
              fullquery = "for $i in collection('"+ Config.getNomeContainerBO() +"')/BO \n";     
              fullquery += "where $i/cadastro/fim/data/date >= '2006-00-00' \n";
              fullquery += "return $i";
            ArrayList docs = new ArrayList();
            XmlResults results = null;
             XmlValue value = null;
             XmlDocument document = null;
            try {
                 XmlQueryContext context = bdbxmlAmbiente.getEnvironmentInit().getManager().createQueryContext();
                 context.setEvaluationType(XmlQueryContext.Eager);
                 XmlQueryExpression xqe = bdbxmlAmbiente.getEnvironmentInit().getManager().prepare(fullquery, context);
                 results = xqe.execute(context);
                   out.println("<p>fez busca, deletando...</p>");
                while (results.hasNext()) {
                     value = results.next();
                    document = value.asDocument();
                        document.fetchAllData();
                        out.println(document.getName() + "<br>");
                        value.delete();
                        document.delete();
                //out.println("<p>total: " + results.size() + "</p>");
                   context.delete();
                   xqe.delete();
                   results.delete();
            } catch (Throwable e) {
                 out.println(e);
                e.printStackTrace();
    %>
         Don't you think that it's too much to consume ~80 MBs of RAM, in a search that returns ~1600 5 KB  documents? And worse, this amount is never released.
         I'm wondering if there's any configuration issue here? Such as JVM's Heap size, or BDBXML Environment Initialization?
    thanks,
    -- Breno

  • Free Memory app - how to remove?

    Some time ago I bought the Free Memory app from the Mac App Store. Now I have a better memory cleaner and I want to delete Free Memory app but when I try to trash it, I get a message that the app is active and cannot be deleted. I checked at the Mac App store and I find that they have removed Free Memory app from the store. Is this because the app has been giving problems? And how to I getb rid of it?

    You must quit the application before you can remove it.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper 2.0.1
        2. AppDelete 3.2.6
        3. Automaton 1.50
        4. Hazel
        5. AppCleaner 2.1.0
        6. CleanApp
        7. iTrash 1.8.2
        8. Amnesia
        9. Uninstaller 1.15.1
      10. Spring Cleaning 11.0.1
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • Replication agent doesn´t free memory after expensive operation

    Our environment is made up of master node and 17 subscriber.
    We have issued a delete action implying 1000000 rows. During the deletion, normal CPU, memory and swap usage was observed. Later, CPU usage has recovered while memory and swap has not. The most memory consumming process was timestenrep with 9Gb.
    Deletion has been correctly replicated to all nodes. However, the replication agent needed to be restarted manually in order to recover memory/swap.
    Why the replication agent did not recover on its own and free memory?
    Definition in sys.odbc.ini
    Datastore=/data/db/xxxx
    PermSize=4000
    tempSize=250
    DurableCommits=0
    TypeMode=1
    LogFileSize=64
    LogBuffSize=65536
    MemoryLock=3
    LockWait=10
    PrivateCommands=1
    Authenticate=0
    DatabaseCharacterSet=WE8ISO8859P15
    ConnectionCharacterSet=WE8ISO8859P15
    CkptFrequency=300
    CkptLogVolume=128
    Connections=90
    TimesTen Version installed (ttVersion command)
    TimesTen Release 7.0.5.0.0 (64 bit Solaris) (ivpnges2tt70:17000) 2008-04-04T01:19:41Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/ivpnges2tt70
    Daemon home directory: /var/TimesTen/ivpnges2tt70
    Regards,
    Matú

    In a replicated environment, executing very large transactions (such as deleting 1M rows in a single transaction) is a very hazardous thing to do and is something you should avoid at all costs. It can cause a number of serious problems. Transactions should be limited to no more than a few thousand operations. If you need to empty a table, use TRUNCATE instead. This will execute far more quickly, generate less log and will not cause problems for replication. If you cannot use TRUNCATE then you should break the DELETE up into multiple smaller transactions. For example if you wish to delete all row where 'startdate' is less than some value and this is likely to result in a large number of deletions then you could repeatedly execute the following sequence:
    DELETE FIRST 1000 FROM sometable WHERE startdate < :someval;
    COMMIT;
    and just keep doing this until the 'rows affected' value is zero.
    The same applies to large inserts and updates.
    The memory usage behaviour of the replication daemon, while perhaps not ideal, is correct and as expected. When you delete 1M rows in a single transaction the replication daemon has to allocate memory (via malloc) for 17x copies (in your case) of the transaction data. That is probably a lot of memory. Once the transaction has been replicated to all 17 subscribers. This memory is moved to an internal 'free' list for re-use but is not returned to the O/S until the replication agent is terminated. Since it such a bad idea to execute these large transactions this behaviour is generally not a problem.
    Chris

  • Inactive memory is growing until there is no free memory

    Recently something happened and inactive memory commence growing from time to time. Even if I do nothing and have no application running. File cache eats all free memory (24Gb) in a couple of minutes and then OS is getting too slow.
    sudo purge helps, sometimes after purging cache stops growing and sometimes I have to purge a few times.
    Two month ago there was no such a behavior, I have no idea what's happened to the OS.
    ps. sorry, had to post again to this community, cannot to move from Safari community

    EtreCheck version: 2.1.8 (121)
    Report generated 4 апреля 2015 г., 20:04:04 GMT+5
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        iMac (27-inch, Late 2012) (Technical Specifications)
        iMac - model: iMac13,2
        1 2.9 GHz Intel Core i5 CPU: 4-core
        24 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 0/DIMM1
                8 GB DDR3 1600 MHz ok
            BANK 1/DIMM1
                8 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
        NVIDIA GeForce GTX 660M - VRAM: 512 MB
            iMac 2560 x 1440
    System Software: ℹ️
        OS X 10.9.5 (13F34) - Time since boot: 3:41:20
    Disk Information: ℹ️
        APPLE HDD WDC WD10EALX-408EA0 disk0 : (1 TB)
            EFI (disk0s1) <not mounted> : 210 MB
            Macintosh HD (disk0s2) / : 999.35 GB (306.69 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
    USB Information: ℹ️
        Genius 2.4G Wireless Mouse
        Apple Inc. iPad
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Inc. FaceTime HD Camera (Built-in)
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/Parallels Desktop.app
        [not loaded]    com.parallels.kext.hidhook (9.0 23046.917896) [Click for support]
        [not loaded]    com.parallels.kext.hypervisor (9.0 23046.917896) [Click for support]
        [not loaded]    com.parallels.kext.netbridge (9.0 23046.917896) [Click for support]
        [not loaded]    com.parallels.kext.usbconnect (9.0 23046.917896) [Click for support]
        [not loaded]    com.parallels.kext.vnic (9.0 23046.917896) [Click for support]
            /Library/Application Support/Kaspersky Lab/KAV/Bases/Cache
        [loaded]    com.kaspersky.kext.kimul.44 (44) [Click for support]
        [loaded]    com.kaspersky.kext.mark.1.0.5 (1.0.5) [Click for support]
            /Library/Extensions
        [loaded]    com.kaspersky.kext.klif (3.0.4a41) [Click for support]
        [loaded]    com.kaspersky.nke (1.6.4a15) [Click for support]
            /System/Library/Extensions
        [not loaded]    com.wacom.kext.pentablet (5.3.2 - SDK 10.8) [Click for support]
    Launch Agents: ℹ️
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [running]    com.kaspersky.kav.gui.plist [Click for support]
        [not loaded]    com.teamviewer.teamviewer.plist [Click for support]
        [not loaded]    com.teamviewer.teamviewer_desktop.plist [Click for support]
        [running]    com.wacom.pentablet.plist [Click for support]
        [loaded]    org.macosforge.xquartz.startx.plist [Click for support]
    Launch Daemons: ℹ️
        [loaded]    com.adobe.SwitchBoard.plist [Click for support]
        [running]    com.autodesk.backburner_manager.plist [Click for support]
        [running]    com.autodesk.backburner_server.plist [Click for support]
        [loaded]    com.autodesk.backburner_start.plist [Click for support]
        [running]    com.kaspersky.kav.plist [Click for support]
        [not loaded]    com.teamviewer.teamviewer_service.plist [Click for support]
        [loaded]    org.macosforge.xquartz.privileged_startx.plist [Click for support]
        [loaded]    YandexDiskHelper.plist [Click for support]
        [loaded]    YandexDiskInstaller.plist [Click for support]
    User Launch Agents: ℹ️
        [loaded]    com.google.keystone.agent.plist [Click for support]
        [running]    com.vladalexa.MagicPrefs.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    Программа  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Яндекс.Диск    Программа  (/Applications/Yandex.Disk.app)
    Internet Plug-ins: ℹ️
        WacomNetscape: Version: 2.1.0-1 - SDK 10.8 [Click for support]
        QuickTime Plugin: Version: 7.7.3
        Unity Web Player: Version: UnityPlayer version 4.6.2f1 - SDK 10.6 [Click for support]
        WacomTabletPlugin: Version: WacomTabletPlugin 2.1.0.2 [Click for support]
        Default Browser: Version: 537 - SDK 10.9
    Safari Extensions: ℹ️
        Searchme [Adware! - Remove]
        Open in Internet Explorer
        URL Advisor
    3rd Party Preference Panes: ℹ️
        MagicPrefs  [Click for support]
        Perian  [Click for support]
        PenTablet  [Click for support]
    Time Machine: ℹ️
        Skip System Files: NO
        Mobile backups: OFF
        Auto backup: YES
        Volumes being backed up:
            Macintosh HD: Disk size: 999.35 GB Disk used: 692.65 GB
        Destinations:
            iData [Network]
            Total size: 3.00 TB
            Total number of backups: 53
            Oldest backup: 2014-02-13 23:24:12 +0000
            Last backup: 2015-04-04 14:07:07 +0000
            Size of backup disk: Excellent
                Backup size 3.00 TB > (Disk size 999.35 GB X 3)
    Top Processes by CPU: ℹ️
             3%    WindowServer
             0%    Activity Monitor
             0%    sysmond
             0%    AppleSpell
             0%    kav
    Top Processes by Memory: ℹ️
        206 MB    kav
        180 MB    Yandex
        155 MB    WindowServer
        155 MB    com.apple.IconServicesAgent
        129 MB    softwareupdated
    Virtual Memory Information: ℹ️
        42 MB    Free RAM
        3.11 GB    Active RAM
        21.01 GB    Inactive RAM
        1.61 GB    Wired RAM
        3.71 GB    Page-ins
        3 MB    Page-outs
    Diagnostics Information: ℹ️
        Apr 4, 2015, 04:19:03 PM    Self test - passed

  • Neat Trick!  Free memory run Repair Permissions...

    Ok, this one baffles me, I'm wondering if its just my MBP setup or if this will work for anyone. I noticed that if I run Disk Utility and Repair Permissions after starting up I free up almost 300megs of memory. Yes 300 MEG! Even if there are no permission problems to fix...
    When I start up I have around 1112 Meg free memory and another 300-400 of used inactive memory. If I run DU and repair permissions my free memory shoots up to 1442 MEG Free.
    Could someone else give this a try and let me know if the same happens for you. If it does I'd sure like to know why.
    I realize this isn't an earth shattering thing here but it is a little puzzling, at least to me...
    Would love to hear others results with this...
    Cheers,
    Peter

    The only app that appears to display all running processes (if you can get them to display properly) is "top." Open the Terminal and run top at the prompt. If you have the Developer Tools installed you could try using the included utility called BigTop. It's likely that the processes with lowest PIDs are the ones run at startup. I don't know the specific processes but I do know the startup sequence of events:
    The first thing that runs at startup is the BootROM. It contains the POST or Power-On Self Test that checks basic hardware, sets the initial states for the CPU, RAM, and crucial hardware interfaces. It also verifies RAM. If the machine passes POST then you will hear the normal chime. If not you will hear one of five beep errors: one beep means no RAM installed; two beeps means the RAM is incompatible; three beeps means there are no good memory banks; four beeps means there is no good image in the BootROM; and five beeps means the processor is not operable.
    Next is the initialization of Open Firmware which also checks for startup modifier keys (like OPTION or SHIFT.)
    After initialization the Mac OS X system is located and control is transferred to BootX which initializes the kernel environment and drivers needed to boot the system. It also starts up the kernel initialization process. When loading the kernel environment BootX also attempts to load any previously cached set of device drivers. This is what's going on when you see the spinning gear on the startup screen.
    Next the kernel initializes the I/O kit and starts launchd. Launchd manages all the system daemons for both the system and individual users.
    If you open Activity Monitor then click on the PID column to sort the PIDs in ascending order, then from the drop down menu select All Processes, Hierarchically. You will see the order of processes handled by launchd which is the first process run after initialization. Process 0 is the kernel_task.
    After launchd executes it runs the /etc/rc script that performs basic system initialization which in turn launches SystemStarter that runs the contents of the startupitems folder. Configuration data are stored in the /etc/hostconfig file.
    Next comes the Login Window process which loads the user environment, then the Dock, Finder, and SystemUIServer followed by any Login Items. If this is an installation in progress it will also launch the Setup Assistant.
    This completes the startup process.

  • Linux free memory confusion.

    Hi,
    I am trying to know the amount of free memory in linux however get more confused.
    all hereunder commands run during one minute at the same box:
    1)
    $ free -m
    total used free shared buffers cached
    Mem: 24118 23992 126 0 0 14193
    -/+ buffers/cache: 9799 14319
    Swap: 16383 0 16383
    2)
    $top
    Mem: 24697152k total, 24573876k used, 123276k free, 0k buffers
    Swap: 16777208k total, 84k used, 16777124k free, 14539380k cached
    3)
    $cat /proc/meminfo
    MemTotal: 24697152 kB
    MemFree: 122956 kB
    Buffers: 0 kB
    Cached: 14556828 kB
    SwapCached: 0 kB
    Active: 9905800 kB
    Inactive: 14418416 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 24697152 kB
    LowFree: 122956 kB
    SwapTotal: 16777208 kB
    SwapFree: 16777124 kB
    Dirty: 36 kB
    Writeback: 0 kB
    AnonPages: 9767396 kB
    Mapped: 57128 kB
    Slab: 179524 kB
    PageTables: 32464 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    CommitLimit: 29125784 kB
    Committed_AS: 11207060 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 8516 kB
    VmallocChunk: 34359729783 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    Hugepagesize: 2048 kB
    3)
    Script:
    ---memScriptStart----
    TOT=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'`
    USED=`cat /proc/meminfo | grep Active: | awk '{print $2}'`
    FREE=$[$TOT - $USED ]
    LOG=/tmp/mem_monitor.log
    echo > $LOG
    SEND=0
    if [ "$USED" -gt "0" ]; then
    USEDPERC=$[$USED * 100 / $TOT]
    echo "Used Percentage : $USEDPERC %"
    TOTMB=$[$TOT / 1024 ]
    USEDMB=$[$USED / 1024 ]
    FREEMB=$[$TOTMB - $USEDMB ]
    # echo "Used Percentage : $USEDPERC"
    if [ "$USEDPERC" -gt "30" ]; then
    SEND=1
    STATUS="Warning"
    echo "------------------------------------------------------------------" >> $LOG
    echo `hostname` >> $LOG
    echo "------------------------------------------------------------------" >> $LOG
    echo "Total Memory (MB) : $TOTMB" >> $LOG
    echo "Used Memory (MB) : $USEDMB" >> $LOG
    echo "Free Memory (MB) : $FREEMB" >> $LOG
    echo "Used Percentage : $USEDPERC %" >> $LOG
    echo "------------------------------------------------------------------" >> $LOG
    if [ "$USEDPERC" -gt "95" ]; then
    STATUS="Critical"
    fi
    fi
    fi
    if [ "$FREEMB" -eq "0" ]; then
    SEND=1
    STATUS="Fatal"
    echo "------------------------------------------------------------------" >> $LOG
    echo " No free memory available in " `hostname` >>$LOG
    echo "------------------------------------------------------------------" >> $LOG
    fi
    cat $LOG
    ---memScriptEnd----
    Samle output:
    hostname
    Total Memory (MB) : 24118
    Used Memory (MB) : 10532
    Free Memory (MB) : 13586
    Used Percentage : 43 %
    Thank you,
    Edited by: user592759 on May 4, 2011 4:03 AM

    Each of the methods you listed will show you memory information, so does also vmstat, which can also be helpful. But memory management is somewhat more complex than total, used and free. What about shared memory /dev/shm, for instance? From what I understand, reporting the free memory will not help you to determine if the computer has enough memory available to perform additional tasks. Your script seems to take the total amount of memory minus the active memory and considers the rest to be free, which is of course different than what the system tools report as free.
    The following should describe some of the information available:
    http://www.redhat.com/advice/tips/meminfo.html
    As long as the server isn’t using swap space, there’s shouldn’t be a concern about physical memory. The memory that’s currency being registered as used can be replaced if another program needs it. To get a "true" reading of memory usage, look at is the -/+ buffers/cache. From an application perspective, the output above shows this server has about 14G of free memory.
    http://stackoverflow.com/questions/1407643/how-is-the-linux-calculating-memfree
    MemFree in /proc/meminfo is a count of how many pages are free in the buddy allocator. This buddy allocator is the fundamental unit of physical memory allocation in the kernel; however there are a lot of ways pages can be returned to the buddy allocator in time of need - for example, freeing empty SLABs, discarding cache/buffer RAM (even if this means invalidating PTEs in a running process), or as a last resort, swapping things out.
    In fact, MemFree is generally controlled to be only 5-10% of total physical RAM, with any extra free RAM being coopted into cache as time goes on. As such, MemFree alone is a very incomplete view of the overall memory situation.

  • My macbook pro model mid 2009 is running slow. free memory is 35 mbs and inactive memory is  1.36 gb with a total of 5 gb RAM memory

    Problem description:
    too much inactive memory 1.87 gb and free memory only 35 mb
    EtreCheck version: 2.1.1 (104)
    Report generated 10 December 2014 3:30:26 pm IST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2009) (Verified)
      MacBook Pro - model: MacBookPro5,5
      1 2.26 GHz Intel Core 2 Duo CPU: 2-core
      5 GB RAM Upgradeable
      BANK 0/DIMM0
      1 GB DDR3 1067 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 9400M - VRAM: 256 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 4:42:54
    Disk Information: ℹ️
      WDC WD5000LPVT-80G33T2 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      [redacted] (disk0s2) / : 499.25 GB (142.01 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
      Apple Inc. Built-in iSight
      Apple Internal Memory Card Reader
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.driver.KUSBModemCDC07 (4.0.2) [Support]
      [not loaded] com.driver.KUSBModemDataA07 (4.0.2) [Support]
    Startup Items: ℹ️
      JHHPortDetect: Path: /Library/StartupItems/JHHPortDetect
      Sudochmod: Path: /Library/StartupItems/Sudochmod
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [running] com.bjango.istatmenusagent.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [running] jp.co.canon.CUPSCAPT.BG.plist [Support]
      [loaded] org.macosforge.xquartz.startx.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [invalid?] com.adobe.SwitchBoard.plist [Support]
      [running] com.bjango.istatmenusdaemon.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
      [loaded] org.macosforge.xquartz.privileged_startx.plist [Support]
      [loaded] org.tcpdump.chmod_bpf.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Caffeine Application (/Applications/Caffeine.app)
      AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
      Dropbox Application (/Applications/Dropbox.app)
      HyperDock Helper UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      Default Browser: Version: 600 - SDK 10.10
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      QuickTime Plugin: Version: 7.7.3
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      SharePointBrowserPlugin: Version: 14.0.0 [Support]
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 [Support]
      zako: Version: zako 1.0.0.0 - SDK 10.8 [Support]
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      BlueStacks Install Detector: Version: Unknown
    Safari Extensions: ℹ️
      AdBlock
      ClickToFlash
      Awesome Screenshot
      Breaking News
      The New York Times
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: ON
      Auto backup: YES
      Volumes being backed up:
      Arupreet: Disk size: 499.25 GB Disk used: 357.24 GB
      Destinations:
      CHIKKI [Local]
      Total size: 331.41 GB
      Total number of backups: 2
      Oldest backup: 2014-06-10 13:36:00 +0000
      Last backup: 2014-09-08 13:57:40 +0000
      Size of backup disk: Too small
      Backup size 331.41 GB < (Disk used 357.24 GB X 3)
    Top Processes by CPU: ℹ️
          8% python
          3% WindowServer
          3% uTorrent
          2% SystemUIServer
          0% mtmfs
    Top Processes by Memory: ℹ️
      1.29 GB JavaAppLauncher
      123 MB SystemUIServer
      102 MB iStatMenusDaemon
      86 MB com.apple.WebKit.WebContent
      81 MB WindowServer
    Virtual Memory Information: ℹ️
      50 MB Free RAM
      1.97 GB Active RAM
      1.90 GB Inactive RAM
      673 MB Wired RAM
      6.70 GB Page-ins
      8 MB Page-outs
    Diagnostics Information: ℹ️
      Dec 10, 2014, 10:48:11 AM Self test - passed
      Dec 9, 2014, 02:54:15 AM VLC_2014-12-09-025415_Arus-MacBook-Pro.crash

    Not sure if using Terminal would help:
    Launch Activity Monitor
    Select Memory tab
    Launch Terminal
    type sudo purge
    password
    10-15 sec later Terminal should refresh and show freed memory & cache

  • Set get parameter but free memory id is not working

    Hi All,
    I am using set get parameter  to transfer data from one module to another .
    But when i am trying to clear the memory id using Free memory id .
    it is not doing that.
    Does it work with import export.
    What method i should use to clear this memory id ..
    Thanks in advance
    ANit gautam

    Clears the memory:
    SET PARAMETER ID pid FIELD space.

  • High cache usage of free memory

    I dont know if this is normal but my fresh archlinux x86_64 install with Xfce uses round 300Mb of 4Gb ram space after boot but then after i start and close some programs i get to 3 Gb used of 3.87 Gb free memory when all applycation are closed. Now i understand that kernel caches some data in memory but i cant clear it all with commands:
    sync
    echo 1 > /proc/sys/vm/drop_caches
    echo 2 > /proc/sys/vm/drop_caches
    echo 3 > /proc/sys/vm/drop_caches
    After i do that system reports 540 Mb used compared to 300Mb from boot. Is there a way to limit the ammount of cache usage so i dont end up having all free memory used by cache?
    Last edited by Anril (2009-12-29 13:19:52)

    Ram that is unused is wasted ram, the linux kernel manages it very well so no worries there.
    If you have swap usage it's because most probably you have things stored in the ram that are not being used often but cannot be discarded too so things being used more often take precedence.
    If you think you have enough ram for all your needs then why not disable swap? I've read that there might be a speed penalty for running without swap but I've been running my system without swap (arch64 4G ram) and I've never had any bad surprises.
    There are a few things that might prompt swap usage (don't quote me on that though, it just seems to me to be the case), if you copy many files from one place to the other the kernel will use all the ram available to try to cache them, if you copy many GB then all the ram will get filled (and maybe other things will get evicted to swap).
    It's not a bug, free ram is there to be used, things that have been used/needed recently get to stay in the ram, other things can go to the swap, if you can cache a file that has been recently used and need to use it again shortly after then it's much faster if it is in the ram instead of having to read it again from the hard disk. The logic behind it is good, it's just that some corner cases may make behave badly.

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    Thank you KiltedTim!
    YES, that is the free 5GB icloud memory for each apple ID. Can I not add the free 5Gb of my second Iphone to my original apple ID (5GB also) as I want to use one Apple ID name on both 2 Iphones? Is it necessary to have a different apple ID for the second Iphone to avail the free 5GB it carries with it?

  • I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am warned that I will not be able to use this video in existing projects   How do I point iMovie to events in my external  hard drive so I can pl

    I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am woarned that I will not be able to use this video in existing projects
    How do I point iMovie to events in my external  hard drive so I can play projects which use them?
    MacBook, iMovie 9.0.4

    Hi
    You can do this - by not doing it the way You describe as it will not work.
    a. the external hard disk - MUST BE - Mac OS extended (hfs) formatted -
    UNIX/DOS/FAT32/Mac OS Exchange - will work for most things - BUT NOT FOR VIDEO (iMovie, iDVD or FinalCut doesn't matter)
    b. Do not alter or move any folder named
    • iMovie Event's - or -
    • iMovie Project's
    on DeskTop/Finder - at all
    All moving's of Events and Projects must be done within the iMovie Application - then connections will not break.
    (move them back and see if iMovie remembers them - then do move as described above)
    Yours Bengt W

Maybe you are looking for

  • Iaik.security.ssl.SSLCertificateException - the mother of all errors

    Hi, We're experiencing this error: Error occurred while connecting to the FTP server "whatever:whichever": iaik.security.ssl.SSLCertificateException: Peer certificate rejected by ChainVerifier when connecting to the FTPS server. What was done by the

  • White box over my scene selection arrow!!!

    Does anyone know how to correct this problem? For some reason, this white box has shown up over my "direction right" arrow in the scene selection section of my dvd project. This also shows up after burning and I can't for the life of me figure out ho

  • Creation of Contract

    Contract Procedure.................... Creation, Release.....

  • Write/read from spreadsheet file

    How to write and read bach 2D array from spreadsheet file?

  • LMS 3.1 Multiserver management Snap ins

    I have two different LMS 3.1 servers at two different locations. 1st @ Site A & 2nd @ Site 2 Both have diffrent (site spacific TACACS+) ACS servers. Now I want to monitor Site A DFM alerts from Site B LMS Screen. What are the ways to do that & any ex