API to compute total RAM memory wired-down by all processes?

Hi. We have a time-critical application that wires-down large memory blocks with mlock() and munlock(). We are concerned that, if other applications are running that are also wiring-down memory, we may inadvertently wire-down all the RAM in the computer, and the computer will hang (this has happened a couple of times).
The solution we would like to adopt is: we compute the total memory wired-down on the computer, by all processes, so we can know whether or not we can wire-down. In other words, we want to, in software, compute the same figure that the Activity Monitor shows in its memory-usage pie chart.
Question: Can anyone point us at an API to compute the total of all wired down memory, from all processes? Thanks in advance.

Thanks for the ideas. What I learned after pursuing the above suggestions, is:
1) sysctl() does not return the amount of Wired-down memory, or if it does, it is just one process
2) "top" shell command does output the Wired-down memory count of all processes. The "top" value is identical to the Activity Monitor value. Unfortunately, there is no API for "top".
3) There is a lower-level mach function host_statistics() (analagous to sysctl?) which will return VM stats: use HOSTVMINFO type (outputs structure vmstatistics_datat) which does include wired-down memory. However, the output value for wired-down memory is not the total of all processes (it is significantly smaller than the wired-down figure from "top" or Activity Monitor). Strangely, the "total active" and "total inactive" values from host_statistics() do reflect all processes. The mystery is: why does host_statistics() under-report the wired value (e.g. it says 400 MB when "top" shows 700 MB).
In summary: host_statistics() is tantalizingly close to what I need, but does not output the correct value. "top" is more accurate, but slow and there is no API.

Similar Messages

  • Free RAM memory

    Hi,
    Is there any C function that returns the total RAM memory
    and the free RAM memory in my CPU ?
    How to use the function ?
    Thanks,

    The kstat(3KSTAT) interface has the information you are
    looking for. Try running kstat at the command line and
    in there you will find physmem and freemem under module:unix, class:pages.
    Note that free memory pages on Solaris is not the most
    useful statistic due to caching on the system.
    There is some sample kstat code on access1.sun.com.

  • Why is my Macbook pro getting out of RAM memory?

    I am getting a message that tells me i am out of memory and it gives me an option to quit apps i have opened, most of times it's just Safari and i have no idea why is this happening suddenly, i have Mavericks 10.9.4 everything updated, and a 15 inches Macbook pro 2.3 GHz Quad-core 4 Gb-Ram.
    Sometimes it gets out of memory just surfing on Safari, checking mails, or chatting on Skype, what could be wrong?
    I had upgraded to the public beta of Yosemite but i couldn't stand it and formatted my computer again and downgraded to Mavericks, but i don't know why i feel it slower now compared with the last time i used it with the same Mavericks version. i hope this doesn't delete my question since i am not revealing anything about the beta.
    Please any Help!
    Results from EtreCheck:
    EtreCheck version: 1.9.15 (52)
    Report generated August 29, 2014 at 10:13:42 PM GMT-5
    Hardware Information: ?
      MacBook Pro (15-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,1
      1 2.3 GHz Intel Core i7 CPU: 4 cores
      4 GB RAM
    Video Information: ?
      Intel HD Graphics 4000 - VRAM: (null)
      Color LCD 1440 x 900
      NVIDIA GeForce GT 650M - VRAM: 512 MB
    System Software: ?
      OS X 10.9.4 (13E28) - Uptime: 0 days 10:38:3
    Disk Information: ?
      APPLE HDD HTS547550A9E384 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Talal (disk0s2) / [Startup]: 428.21 GB (284.8 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
      disk0s4 (disk0s4) <not mounted>: 70.38 GB
      Recovery HD (disk0s5) <not mounted>: 650 MB
      MATSHITADVD-R   UJ-8A8
    USB Information: ?
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ?
      Apple Inc. thunderbolt_bus
    Gatekeeper: ?
      Anywhere
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.adobe.SwitchBoard.plist Support
      [running] com.edb.launchd.postgresql-9.3.plist Support
      [loaded] com.google.keystone.daemon.plist Support
      [running] com.magican.castle.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
      [loaded] com.oracle.java.Helper-Tool.plist Support
      [loaded] org.macosforge.xquartz.privileged_startx.plist Support
      [loaded] org.wireshark.ChmodBPF.plist Support
    Launch Agents: ?
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [loaded] com.oracle.java.Java-Updater.plist Support
      [loaded] org.macosforge.xquartz.startx.plist Support
    User Launch Agents: ?
      [loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.BlueStacks.AppPlayer.LogRotator.plist Support
      [failed] com.BlueStacks.AppPlayer.Service.plist Support
      [loaded] com.BlueStacks.AppPlayer.UninstallAgent.plist Support
      [loaded] com.BlueStacks.AppPlayer.UpdaterAgent.plist Support
      [loaded] com.facebook.videochat.[redacted].plist Support
      [loaded] com.macupdate.desktop5.scanner.plist Support
    User Login Items: ?
      iTunesHelper
      Flux
    Internet Plug-ins: ?
      AdobeExManDetect: Version: AdobeExManDetect 1.1.0.0 - SDK 10.7 Support
      FlashPlayer-10.6: Version: 14.0.0.176 - SDK 10.6 Support
      Default Browser: Version: 537 - SDK 10.9
      Flash Player: Version: 14.0.0.176 - SDK 10.6 Support
      QuickTime Plugin: Version: 7.7.3
      o1dbrowserplugin: Version: 5.4.2.18903 Support
      SharePointBrowserPlugin: Version: 14.4.4 - SDK 10.6 Support
      googletalkbrowserplugin: Version: 5.4.2.18903 Support
      JavaAppletPlugin: Version: Java 8 Update 20 Check version
    Safari Extensions: ?
      AdBlock-2
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins ?
      BlueStacks Install Detector: Version: 0.3.6 - SDK 10.7 Support
    3rd Party Preference Panes: ?
      Flash Player  Support
      Java  Support
    Time Machine: ?
      Time Machine not configured!
    Top Processes by CPU: ?
          13% WindowServer
          8% com.apple.WebKit.Networking
          7% Safari
          4% coreaudiod
          1% hidd
    Top Processes by Memory: ?
      106 MB Safari
      106 MB Skype
      96 MB com.apple.WebKit.WebContent
      61 MB WindowServer
      45 MB com.apple.WebKit.Networking
    Virtual Memory Information: ?
      48 MB Free RAM
      1.04 GB Active RAM
      1.05 GB Inactive RAM
      721 MB Wired RAM
      1.77 GB Page-ins
      232 MB Page-outs

    Get rid of "Memory Clean." It's worse than useless.
    There is excessive swapping of data between physical memory (that is, the memory chips on the logic board) and virtual memory (one or more files on the startup volume.) That activity is relatively slow and causes the whole system to be less responsive. It can happen for two reasons:
              A long-running process with a memory leak (a kind of bug)
              Not enough memory for your usage pattern
    Tracking down a memory leak can be difficult, and it may come down to a process of elimination.
    These instructions are for OS X 10.9 ("Mavericks.") The procedure may be slightly different for earlier versions of OS X.
    When you notice the swap activity, open the Activity Monitor application and select All Processes from the View menu, if it's not already selected. Select the Memory tab. Click the heading of the Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select
              View ▹ Columns ▹ Real Memory
    from the menu bar.
    If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more real memory over time without ever releasing it. Here is an example of how it's done.
    The processes named "Safari Web Content" render web pages for Safari. They use a lot of memory and may leak if certain Safari extensions or third-party web plugins are installed. Consider them prime suspects.
    Another process often implicated in memory leaks is "inkjet4" or "inkjet8," which is a component of the HP printing software. If it's present, force-quit the process in Activity Monitor to solve the problem temporarily. Empty the print queues in the Printers & Scanners preference pane (which has a slightly different name in each recent version of OS X.) If you don't use an HP printer, remove the software. Otherwise, if the problem is recurrent, update the software (which may not help) or contact HP support.
    "Wired" memory should be a small part of the total. That memory is not swapped, but it makes less physical memory available which may then result in swapping. If you have a lot of wired memory, that's usually an indication of a memory leak in a third-party program that modifies the operating system at a low level. Ask for guidance in that case.
    If you don't have an obvious memory leak, your options are to install more memory (if possible) or to run fewer programs simultaneously.
    The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command:
    sudo leaks -nocontext -nostacks process | grep total
    where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the  leaks(1) man page and the Apple developer documentation for details.

  • Installing additional ram memory

    I am trying to install memory in my Mac Pro, but some of the risers come upon the hardware configuration panel as empty.  I have moved around the memory modules and they all work, but just not when they are all installed at once.  I have two sets of 2 gb modules and four 1 gb modules.  Two of the 2 gig modules are are Centon and two are another brand.  All of the 1 gig modules are exactly the same.  Currently, I have 4x1GB modules installed and 2x2gb modules installed.  My computer is reading the 2 GB modules, but only reading two of the 1GB modules.  Here's my Mac configuration:
    Model Identifier:    MacPro2,1
    Processor Name:    Dual-Core Intel Xeon
    Processor Speed:    2.66 GHz
    Number Of Processors:    2
    Total Number Of Cores:    4
    Memory:    6 GB
    Bus Speed:    1.33 GHz
    When I putt all four of the 2GB modules in the first two slots and the four 1GB modules in the last two, the computer read the 1 GB modules but one of the 2GB modules?????  When I removed all of the 1 GB moduels, the computer then read two of the 2GB modules.  I am totally confused.  I have tested all of the modules and they all work in one configuration or another, and I've checked all of the slots and they work too.  Any suggestions on what I should try next?
    thanks

    Hi, this may or may not resolve the issue:
    MacBook Pro: How to remove or install memory:
    Additional notes     For best performance, fill both memory slots, installing an equal memory module in each slot.
         In Mac computers there is a hardware component known as the "RAM Equalizer". The function of this is impeded when the memory slots are filled with unequal memory quantities.

  • Does it matter if RAM is upside down?

    I bought memory from crucial to upgrade my new 20" 2.66ghz iMac from the stock 2gig to 4gig. Oddly enough, the iMac manual says "make sure the notch in the RAM module is on the left side when you insert it," but it actually needs to be on the right side. The stock RAM has notches on the right, and the little stickers on the modules are on top when you insert the RAM.
    No big deal, I just turned the crucial RAM around (so the stickers were on the bottom), except that the crucial RAM didn't work. I got the "no RAM" beeps from the iMac.
    Should the RAM work "upside down" like that?

    Hey Jim, first you should simply google to find an image of what the ram should look like on you mac. Secondly, I purchased some ram from OWC and they actually shipped me a picture instruction manual. My sticker side of the ram is facing away from the mother board and other components and I am using a G4 flat screen imac, where the ram has to inputted in the base of the computer. I would think that the sticker would be away from the other components being that it would be a foreign matter so to speak.
    Doobs

  • Not enough RAM Memory

    I've been using my Photoshop Elements 9 for a long time with no problems.  I use it to edit only and do not save or store photos in Elements nor do I use the organizer.  Today, while trying to open photos on my iMac with Elements for editing, I'm getting a message while on the Elements screen saying I don't have enough RAM Memory to complete the action.  I'm having no problem adding photos to the iMac, but can't open them in Elements.  Is this an Elements issue or an iMac issue?  Suggestions for a fix?

    First try resetting the prefs: quit the editor, then relaunch it while holding down command+option+shift. Keep the keys down till you see a window asking if you want to delete the settings file. You do.
    If that doesn't do it, what is the situation with your computer? How much ram do you have? Does About this mac>more info indicate all the ram you thought you had?

  • I want to increase my ram memory how do I know which one to buy

    This are all the details on my computer. I need to buy more memory, im not sure whats the maximum on RAM memory neither where or which to buy.
    Hardware Overview:
      Model Name:          MacBook Pro
      Model Identifier:          MacBookPro8,1
      Processor Name:          Intel Core i5
      Processor Speed:          2.4 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache (per Core):          256 KB
      L3 Cache:          3 MB
      Memory:          4 GB
      Boot ROM Version:          MBP81.0047.B27
      SMC Version (system):          1.68f99
      Serial Number (system):          C1*******V13
      Hardware UUID:         
      Sudden Motion Sensor:
      State:          Enabled
    <Edited by Host>

    You have a Late 2011 MacBook Pro 13".  Make sure the RAM you buy says it is compatible with that age of MacBook Pro and screen size, and has a lifetime warranty.   http://www.crucial.com/ and http://www.macsales.com/ both offer worldwide high quality RAM.  Do not buy ValueRAM.  Do not post your serial number again.  The Model Identifier is sufficient to tell us which model you have.

  • When I empty my trash, my memory goes down?

    So,
    I've just noticed this today,
    and I probably should have noticed this earlier but anyways...
    Whenever I empty my trash,
    my memory goes down?
    Is that normal?
    Because it doesn't seem right to me,
    shouldn't it increase being that I've emptied something from my computer?
    How do I go about fixing this?
    Or is it something I shouldn't be worrying about?
    Sorry for all the questions...I'm just confused...
    iBook G4   Mac OS X (10.3.9)  

    CrownJules:
    Whenever I empty my trash, my memory goes down?
    You mean your Hard Disk Drive capacity, right? Or do you mean memory as in RAM?
    Do you have FileVault turned on?
    What is the capacity of your HDD, and how much free space do you have?
    Download and runWhat Size. It will scan your HDD and list the contents by size. Look through the list for anything that looks suspicious, especially that larger files that are eating up your space.
    Take a look at this article: Where Did My Disk Space Go?.
    Do post back with further questions, comments or an update.
    Good luck.
    cornelius

  • Activity monitor says I have 1 -3% of System Memory free, yet CPU usage shows less than 10% total of all processes

    Activity monitor says I have 1 -3% of System Memory free, yet CPU usage shows less than 10% total of all processes

    I think you should review what you wrote. There is no question, hence, my reply. I can't tell by the AM listing what applications are using memory. You need to click on the Real Mem column once or twice to display in descending order.
    Aside from what you see in AM, what exactly is your problem or perceived problem. You are very low on Free Mem at the moment the screen shot was taken. Those displays are not depicting your computer's instantaneous memory usage.
    About OS X Memory Management and Usage
    Using Activity Monitor to read System Memory & determine how much RAM is used
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    Memory Usage Performance Guidelines- About the Virtual Memory System
    Understanding top output in the Terminal
    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.
    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

  • My memory goes down for no reason?

    When my memory gets to under 4 GB something acts on my computer where it wants to eat up all my memory then within seconds I see it go down little by little then eventually goes to 0 kB and sometimes it stops randomly, but if I happen to restart my computer, the memory goes back up.
    why does it decide to do this and how can I fix it?

    You most likely have an application that has a memory leak and starts consuming more and more RAM. Open Activity Monitor, select All Processes from the Processes drop down menu, click on the Real Memory column twice to display in descending order. Watch for the topmost entry to see if the amount of RAM it uses is increasing as you are using your computer. This may help identify the culprit.
    Another possible cause could be a bad cache file. You might give the following a try:
    Boot into single-user mode. After startup is completed you will be in command line mode and should see a prompt with a cursor positioned after it. At the prompt enter the following then press RETURN after each commandline:
    /sbin/fsck -fy
    If you receive a message that says "*** FILE SYSTEM WAS MODIFIED ***" then re-run the command until you receive a message that says "** The volume (nameofvolume) appears to be OK." If you re-run the command more than seven times and do not get the OK message, then the drive cannot be repaired this way.
    If you were successful then enter:
    /sbin/mount -uw /
    rm -rf /System/Library/Caches/*
    rm -rf /System/Library/Extensions.kextcache
    rm -rf /System/Library/Extensions.mkext
    rm -rf /Library/Caches/*
    reboot
    I suggest you print out the above to be sure you do not make any errors when entering the commands. When in single-uwer mode you have 'root' access, so it's important that you not make any mistakes.

  • AE incorrectly states ram memory.

    When I first installed CS5 I was running 8 GB of ram memory.  In the settings of AE, it registered that correctly.  Then I added 16 more GB and presently the settings reads: "16 GB of ram available."  I reinstalled AE CS5 and still get the 16 GB statement.  AE runs fine, but I wonder if I'm missing out on getting 24 GB of rendering power here?  Suggestions? 
    My system is:  HP 480t HPE desktop, I7, 24GB, Win 7.  My computer diagnostics recognizes the ram running at 24 GB. 

    Mahalo Todd and Dave,
    Here is a screenshot of my computer system performance
    and status info and the  AE 'Preference' page where this discrepancy appears.
    The computer status shows I have 24GB of ram memory.
    Under the Preference, Memory & Multiprocessing: "Installed Ram: 16GB.
    Ram reserved for other aps, 3GB.  Ram available for AE:  13GB."
    I yanked the 8GB memory that originally came with the computer and installed
    fresh new 6x4GB memory sticks for a total of 24 GB.  I wonder if there is a problem
    with memory sharing or pooling with Photoshop.  But I don't run any other CS5 program
    when AE is running and I still get this same 16BG reading.  Maybe by looking at the
    screenshots you two may see a conflict. Your help is appreciated!

  • Computer Totally Cannot be Power On

    Hi hi to everyone,
    Recently, i have replace some part of my PC. The parts replaced are 1GB(2 X 512MB)ram, new DVD-Rom and a new harddisk.
    After connecting all the new parts, i power on the computer and everything run smoothly on the first run. Then, i switch off the computer to screw back the casing. When i tried to on it back, the whole computer totally cannot be power on as in totally no power even the power supply fan is not moving. Then, i tried troubleshooting the power supply and found that the power supply fan is running in stand-alone mode. Please advise on what to do...
    My Computer Specification as follow:
    1) Power Supply: Antec SmartPower 350W
        +5V   : Max - 35A    Min - 1.5A
        +12V : Max - 16A    Min - 0.8A
        +3.3V: Max - 28A    Min - 0.5A
        -5V   : Max - 0.5A   Min - 0A
        -12V  : Max - 0.8A   Min - 0A
        +5V SB : Max - 2A    Min - 0A
    2) Motherboard: MSI 865PE NEO2-S
    3) CPU: Intel Pentium 4 2.6GHz
    4) RAM: GEIL DDR400 1GB(2 X 512MB) CL2.5
    5) VGA: MSI FX-5200 128MB 8X-AGP
    6) Hard-Disk:
        a) Seagate 7200rpm 160GB Hard-Disk
        b) Hitachi 7200rpm 60GB Hard-Disk
    7) Drive
        a) LG 16X/52X DVD-Rom
        b) Creative 24X/10X/40X CD-RW
    8) 4 External Casing Fan
    Thanks a million for any advice....

    Quote from: Carpe_Diem on 06-May-07, 00:06:38
    Hi hi,
    Firstly, thanks for the advice.... and sorry for my stupid question.
    You suggest a new psu but it is basically working fine until the recent upgarde....
    Thanks
    "You suggest a new psu but it is basically working fine until the recent upgarde...."
    stats of that PSU are too weak. it can't be not enough to handle the changes, or it can be just damaged.
    try with better one with high amperes on +12V.
    other possibilities due memory failure or underpowered sticks. try but back your old memory.

  • Laptop G470 has 0 Available (free) RAM memory

    Greetings everyone,
    I open another thread just for this subject...
    I have a Lenovo laptop G470 with i3, win7 64 bits and 4GB ram
    when i look on the task manager, this is what i see:
    Total RAM: 4039 mb
    Cache: 2732
    Stand by: 2631
    Available: 0
    Appart from the fact that the total RAM is not equal to cache + stand by...
    MY PROBLEM IS that the avilable memory is ZERO (0) 
    When it starts it has like 2000 MB on available ram, but as time goes by, it goes down to 0... system goes fast, but don't know if this is normal
    THANK YOU VERY MUCH!!!
    Neonet04

    Greetings everyone,
    I open another thread just for this subject...
    I have a Lenovo laptop G470 with i3, win7 64 bits and 4GB ram
    when i look on the task manager, this is what i see:
    Total RAM: 4039 mb
    Cache: 2732
    Stand by: 2631
    Available: 0
    Appart from the fact that the total RAM is not equal to cache + stand by...
    MY PROBLEM IS that the avilable memory is ZERO (0) 
    When it starts it has like 2000 MB on available ram, but as time goes by, it goes down to 0... system goes fast, but don't know if this is normal
    THANK YOU VERY MUCH!!!
    Neonet04

  • How can I upgrade RAM memory for Pavilion dv6-3267cl notebook PC?

    My laptop is HP Pavilion dv6-3267cl Entertainment Notebook PC 
    and OS is Windows 7 Home Premium 64-bit Service Pack 1. 
    It has intel core i5 cpu m480 2.67ghz 2667mhz 2 core 4 logical processor and two of 2GB SODIMM Samsung 1067MHz are used right now. (total 4GB memory) I'd like to upgrade the memory and
    What is the maximum GB of RAM this laptop can have? 
    Which type of RAM cards should I install? (brand/MHz/GB...)
    I tried a 8GB PC3 10600 1333MHz CL9 SoDimm and it caused an error and won't start Windows so I went back to original 2GB.

    Hi:
    The maximum memory you can run in a pc with the i5 first generation core processor is 2 x 4 GB.

  • SQL query returns few rows, but holds on with several Gbs of RAM memory used

    If I perform the following query:
    SELECT d.DocumentGUID, d.DocumentID
    FROM ImportDataBase.dbo.Document d
    LEFT OUTER JOIN ContentDataBase.dbo.Document d2 ON (d.DocumentGUID = d2.DocumentGUID)
    WHERE ( d2.DocumentGUID IS NULL ) -- new document in the ImportDB
    OR ( d2.DocumentGUID IS NOT NULL AND d.QueryContent <> d2.QueryContent ) -- modified document in the ImportDB
    It returns around 1000 rows and takes about 3 minutes to complete
    It also raises up the RAM memory used from 2GB to 9GBs. 
    This memory used will remain used untill I restart the server. I have no need to make use of that memory, I already copied the returned rows of that query into a note pad for example. And any other reason of SQL has to  to keep that memory stored by
    that query, I  dont want it.
    Is there a way to release that memory I really dont need my SQL server to keep, without having to restart the SQL server?
    and without topping the max memory the sql server uses, since I need my SQL server to use as much as it needs in other tasks(I dont think it needs to hold on to the above query memory used)
    Thank You very much.

    Is there a way to release that memory I really dont need my SQL server to keep, without having to restart the SQL server?
    and without topping the max memory the sql server uses, since I need my SQL server to use as much
    A query can be resource intensive even if it returns a single row. Generally it is a good idea to set SQL Server MAX memory.
    BOL: "Optimizing Server Performance Using Memory Configuration Options
    The memory manager component of Microsoft SQL Server eliminates the need for manual management of the memory available to SQL Server. When SQL Server starts, it dynamically determines how much memory to allocate based on how much memory the operating system
    and other applications are currently using. As the load on the computer and SQL Server changes, so does the memory allocated. For more information, see Memory Architecture.
    The following server configuration options can be used to configure memory usage and affect server performance:
    •min server memory
    •max server memory
    •max worker threads
    •index create memory
    •min memory per query
    The min server memory server configuration option can be used to ensure that SQL Server does not release memory below the configured minimum server memory once that threshold is reached. This configuration option can be set to a specific value based on the
    size and activity of your SQL Server. If you choose to set this value, set it to some reasonable value to ensure that the operating system does not request too much memory from SQL Server, which can affect SQL Server performance.
    The max server memory server configuration option can be used to specify the maximum amount of memory SQL Server can allocate when it starts and while it runs. This configuration option can be set to a specific value if you know there are multiple applications
    running at the same time as SQL Server and you want to guarantee that these applications have sufficient memory to run. If these other applications, such as Web or e-mail servers, request memory only as needed, then do not set the max server memory server
    configuration option, because SQL Server releases memory to them as needed. However, applications often use whatever memory is available when they start and do not request more if needed. If an application that behaves in this manner runs on the same computer
    at the same time as SQL Server, set the max server memory server configuration option to a value that guarantees that the memory required by the application is not allocated by SQL Server."
    LINK: 
    http://technet.microsoft.com/en-us/library/ms177455(v=sql.105).aspx
    Memory configuration:
    http://www.sqlusa.com/bestpractices/memory-configuration/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Maybe you are looking for

  • Categoria de nota errada

    Olá pessoal, Está configurado para o movimento 833 a categoria de nota fiscal YC ( spro -> administração de materiais -> administração de estoques e inventário -> nota fiscal -> atualizar derivação tipo de nota fiscal ) Porém as notas fiscais decorre

  • Disabling Internal Network Adaptor

    My lads 2006 Mac Mini is having problems staying connected to our Wireless Network. I bought him a USB Dongle adaptor in the hopes of solving the problem as these Mac Minis are know for having problem network adaptors. The problem I have is how to ma

  • Color bug in Safari 7.1?

    Hello everybody, I've just downloaded new Safari 7.1 a few days ago and I discovered that the hsl colors programmed in a website CSS are wrong. Not the same with Firefox, Chrome, Opera (I didn't try IE). You can see what I say by having a look at the

  • Window Function Issues

    I'm uncertain if this is a OS issue, but I'm having difficult with the controls on any window that is open on my computer. By controls I'm referring to the Close, Mini, Enlarge buttons, as well as with other feature buttons like the add window/tab bu

  • Trying to set up new iPhone5s but cannot backup to iCloud.

    After entering my username password just comes up with Could not Sign In There was a problem connecting to the server I have tried shutting down then re trying the process, I am connected to a WiFi network but no joy! all advice welcome