Memory management improvements needed?

i just started understanding memory management and i think mac os x needs improvment?
My inactive memory is at 2GBs right now with 1GB in wired and 800MB active and about 200Mb free.
Should mac os x clear the inactive memory first before starting to swap? My swap is at 426Mb right now.

In the following apple doc,
Reading system memory usage in Activity Monitor
Read what it says about "inactive memory".

Similar Messages

  • 4.2 seems to have vastly improved memory management

    This may not be something most uses will notice, but by using the 'MemoryFree' app I have noticed that the upgrade to 4.2 leaves much more software free memory on my iPhone4 than 4.1. I would guess that this would tend to boost performance as well, but I haven't noticed any perceptible change there.

    sn4p2k wrote:
    im not updating to 4.2 and i have no problems with performance on 4.1
    I don't really think you read what I posted!
    I didn't say I had issues with 4.1 and they went away after I upgraded to 4.2. I just pointed out that there were obviously major improvements made between 4.1 and 4.2 'under the hood', and that this was demonstrated in part by the clear improvement in the memory management. I stressed that i had not noticed any perceptible difference, but that the improvements were obviously there.

  • Anyone use nio-memory-manager ?? what's it good for?

    Can someone give me an example of when the nio-memory-manager should be used?
    Thanks,
    Andrew

    If I remember the outcome of my experiments with NIO right the situation is as follows:
    1. Allocating/releasing huge shared memory blocks over and over can lead to OS/JVM issues. To avoid this I allocated the max size I wanted from the start (this is an option when configuring "off-heap" storage I believe). When doing it this way I had no reliability issues with the NIO memory manager in my tests.
    2. Tangosol/Oracle used to claim that the off-heap (NIO memory manager) result in worse performance than on-heap - I could not see any clear indication of this but this may be application dependent. For our app the reduced number of JVM:s per server (reducing network communication, number of threads, risk of any JVM performing GC at a given time etc etc) seemed to more than offset the allegedly slower memory manager resulting in MUCH BETTER performance! A lot of queries etc anyhow (at least for us) mainly work against indexes that always are stored "on-heap"...
    3. There is a limitation to 2Gb per NIO block (at least in 32-bit JVM:s not sure about 64:bit - never seen any point in using them since larger heaps than 2Gb seldom work well anyhow and each pointer consumes double the space in heap and CPU-caches) but this is for each CACHE and separate for PRIMARY and BACKUP I believe! So my understanding is that if you (using 64-bit OS) for instance have two (equally big) caches you could allocate max 2 * 2 * 2 = 8Gb of off-heap memory for folding data per JVM (without ANY impact on GC-pauses!) and in addition to that use as much heap as you can get away with (given GC-pause times) for holding the indexes to that data. This would makes a huge difference in JVM count!- for example we today have to run like 10+ JVM:s per server using "on-heap" while we using "off-heap" storage probably could get that down to one or two JVM:s per server!
    4. There may be both OS and JVM parameter that you need to set (depending on OS and JVM used!) in order to allocate large amounts of shared memory using NIO (the default is rather small).
    As for the question about de-allocation I never saw any sign of memory leaks with the NIO memory manager (i.e. space previously occupied by deleted objects were reused for new objects) but as I mentioned above you better allocating the max size NIO memory block you intend to use up-front and that memory will then remain allocated for this use so if your amount of cache data vary and you would like to use memory for other purposes (like heap!) at some point you may be better of sticking with "on-heap" that is more flexible in that respect.
    As I previously mentioned off-heap is today (until Oracle fixes the improvement request!) really only an option if you do not plan to use "overflow protection" or your objects are fixed size :-(
    And if you are interested in using servers with a lot of memory and would like to use "off-heap" please talk to your Oracle sales rep about it! If enough people do that it may allow the Coherence developers to assign more time for making "off-heap" storage better! With this feature in place Coherence will be even more of a "killer application" than it already is!
    Best Regards
    Magnus

  • Memory management strategy

    I have a process that can benefit from lots of physical memory. I'm having trouble figuring out how to manage it.
    Essentially, the process needs pages of memory to store data temporarily. When the systems hits some kind of memory limit, then it can flush all data to disk and start over. More memory significantly improves performance because flushes are less frequent.
    The problem arises because I can't distinguish between physical and virtual memory, and I can't tell how much memory is available to me. When I grab too much memory, the whole process grinds to a halt because of swapping, or generates Out of Memory errors. Too little and performance is sub-optimal. Further complicating the situation is the fact that other threads are running in the same JVM consuming memory, and that we distribute this app into unknown environments with unknown amounts of memory.
    So here are my thoughts so far:
    Strategy 1:
    Just allocate pages as needed until an OutOfMemoryError occurs. Trap it, flush, and continue. This works, but the app grinds to a halt once the system starts allocating virtual memory.
    Strategy 2:
    Allocate pages as needed until java.lang.getRuntime().freeMemory() drops below a threshhold value. This doesn't work because freeMemory() doesn't report the amount of free system memory, only the amount of free memory in the pool currently allocated from the operating system. On startup it could show as little as 2mb free on a 512mb machine.
    Strategy 3:
    Allocate pages up to a fixed amount, like 64mb. This fails when less than 64mb is free, and fails to take advantage of other memory that may be available. We could make this amount user-configurable, but most of our users aren't going to be capable of handling that.
    Strategy 4:
    Do something with soft or weak references. This has potential, but I can't figure out how to get notified when a reference is about to be garbage collected.
    Anyone have better ideas?

    To summarize: you would like to manage memory; real memory is faster than virtual memory; you can't tell how much real memory is available to you.
    Let's take the middle statement: when you start using virtual memory, your application slows down? If that's the case, maybe you could have it time itself and when it starts slowing down, assume that's the cause. You'd have to have a standard bit of code that you could monitor for slowdowns. Of course that could be fooled if another task started eating the CPU, by for example doing a search-and-replace in a 100-MB document in memory. But likely you would be running this task on a dedicated system, or at least one without large competing tasks.
    I think you're in uncharted territory here. I haven't seen any articles on this kind of memory management in Java. My suggestion would be to provide tuning parameters (such as maximum memory to use) and allow your users to adjust them based on actual conditions, instead of trying to have your application try to optimize itself. As you observe, your app doesn't have nearly enough information to do that.

  • Problems with memory management

    Since my adoption of 10.7, I have noticed a problem that is really reminiscent of 10.2 and 10.3 of poor memory management. This is quite distressing as it has taken away from the performance of the operating system and has created many pages of VM files that are just below the engineering standards of Apple. Any suggestions along this line to clear this up would be greatly helpful. I have 3 GB of memory that is over utilized and over taxed.

    I have read a bit about the "better" memory management, but that is all in theory. In the real world, Lion eats RAM and i upgraded from 4 to 8 Gb last week, that makes all the difference. If i close all apps now, 5.5 Gb RAM is still used, and i know that has something to do with Lions special workmemory management that is supposed to work to our favour, but it doesnt! Now after upgrading, fairly cheap but nothing for mainstream people, things work the way i suppose they are meant to work, but when Windows 7 and soon 8 are working towards less RAM needed, Apple seems to say one thing and do another. That is, they claim to have a improved (superior, fantastic?) system for RAM, but in reality it eats RAM for breakfast. Now i dont haveto close one app before opening another just to avoid the little spinning ball of colours.
    Also Safari can use gigabytes of RAM on its own....not good.

  • Questions about db_keep_cache_size and Automatic Shared Memory Management

    Hello all,
    I'm coming upon a server that I'm needing to pin a table and some objects in, per the recommendations of an application support call.
    Looking at the database, which is a 5 node RAC cluster (11gr2), I'm looking to see how things are laid out:
    SQL> select name, value, value/1024/1024 value_MB from v$parameter
    2 where name in ('db_cache_size','db_keep_cache_size','db_recycle_cache_size','shared_pool_size','sga_max_size');
    NAME VALUE VALUE_MB
    sga_max_size 1694498816 1616
    shared_pool_size 0 0
    db_cache_size 0 0
    db_keep_cache_size 0 0
    db_recycle_cache_siz 0 0
    e
    Looking at granularity level:
    SQL> select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';
    GRANULE_SIZE/VALUE
    2048
    Then....I looked, and I thought this instance was set up with Auto Shared Mem Mgmt....but I see that sga_target size is not set:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 1616M
    sga_target big integer 0
    So, I'm wondering first of all...would it be a good idea to switch to Automatic Shared Memory Management? If so, is this as simple as altering system set sga_target =...? Again, this is on a RAC system, is there a different way to do this than on a single instance?
    If that isn't the way to go...let me continue with the table size, etc....
    The table I need to pin is:
    SQL> select sum (blocks) from all_tables where table_name = 'MYTABLE' and owner = 'MYOWNER';
    SUM(BLOCKS)
    4858
    And block size is:
    SQL> show parameter block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    So, the space I'll need in memory for pinning this is:
    4858 * 8192 /1024/1024 = 37.95.......which is well below my granularity mark of 2048
    So, would this be as easy as setting db_keep_cache_size = 2048 with an alter system call? Do I need to set db_cache_size first? What do I set that to?
    Thanks in advance for any suggestions and links to info on this.
    cayenne
    Edited by: cayenne on Mar 27, 2013 10:14 AM
    Edited by: cayenne on Mar 27, 2013 10:15 AM

    JohnWatson wrote:
    This is what you need,alter system set db_keep_cache_size=40M;I do not understand the arithmetic you do here,select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';it shows you the number of buffers per granule, which I would not think has any meaning.I'd been looking at some different sites studying this, and what I got from that, was that this granularity gave you the minimum you could set the db_keep_cache_size, that if you tried setting it below this value, it would be bumped up to it, and also, that each bump you gave the keep_cache, would be in increments of the granularity number....?
    Thanks,
    cayenne

  • Blue Screen of Death - Memory Management

    I have gotten the blue screen of death twice now. The screen went by really fast but I think it said something about memory, like memory management. I copied the problem details:
    Problem signature:
    Problem Event Name: BlueScreen
    OS Version: 6.1.7601.2.1.0.768.3
    Locale ID: 4105
    Additional information about the problem:
    BCCode: 1a
    BCP1: 0000000000041790
    BCP2: FFFFFA80022B8DF0
    BCP3: 000000000000FFFF
    BCP4: 0000000000000000
    OS Version: 6_1_7601
    Service Pack: 1_0
    Product: 768_1
    Files that help describe the problem:
    C:\Windows\Minidump\071314-34335-01.dmp
    C:\Users\Tiffany Jiang\AppData\Local\Temp\WER-53804-0.sysdata.xml
    Both times happened randomly and about 2 weeks apart, and the laptop (Toshiba Satellite; it was bought brand new about only 3 weeks ago) still works fine after it restarts, but I don't want it to keep happening. I also don't know what the problem is. I used my previous Windows 7 laptop (HP pavillion g6) the same way for 3 years and it never blue screened even once. I tried going to the Toshiba support website to see if I need to download any new drivers but the website does not seem to be working on my laptop, everytime I go on it it's just lines of letter and numbers.
    Help would be much appreciated, thank you!

    Satellite C55-A5195
    Downloads here.
    Bug Check 0x19: BAD_POOL_HEADER
    Caused By Driver  : vsdatant.sys              <- True Vector device driver
    You have ZoneAlarm on board? If so, uninstall it and see what happens. 
    ==================================================
    Dump File         : 071314-34335-01.dmp
    Crash Time        : 7/15/2014 9:58:18 AM
    Bug Check String  : MEMORY_MANAGEMENT
    Bug Check Code    : 0x0000001a
    Parameter 1       : 00000000`00041790
    Parameter 2       : fffffa80`022b8df0
    Parameter 3       : 00000000`0000ffff
    Parameter 4       : 00000000`00000000
    Caused By Driver  : ntoskrnl.exe
    Caused By Address : ntoskrnl.exe+75bc0
    File Description  :
    Product Name      :
    Company           :
    File Version      :
    Processor         : x64
    Computer Name     :
    Full Path         : C:\Test\071314-34335-01.dmp
    Processors Count  : 4
    Major Version     : 15
    Minor Version     : 7601
    ==================================================
    ==================================================
    Dump File         : 070514-42837-01.dmp
    Crash Time        : 7/15/2014 9:58:18 AM
    Bug Check String  : BAD_POOL_HEADER
    Bug Check Code    : 0x00000019
    Parameter 1       : 00000000`00000020
    Parameter 2       : fffffa80`0b390140
    Parameter 3       : fffffa80`0b390160
    Parameter 4       : 00000000`04020008
    Caused By Driver  : vsdatant.sys
    Caused By Address : vsdatant.sys+47054
    File Description  :
    Product Name      :
    Company           :
    File Version      :
    Processor         : x64
    Computer Name     :
    Full Path         : C:\Test\070514-42837-01.dmp
    Processors Count  : 4
    Major Version     : 15
    Minor Version     : 7601
    ==================================================
    -Jerry

  • OSX inactive memory management problems

    On my 2010 Macbook Air 11" running OSX 10.8 Mountain Lion, I have run into some major issues with memory management. This problem persists across both my Mac machines and multiple generations of OSX. I have a 2007 2.2 Ghz Core 2 Duo Macbook Pro Running Lion (upgraded from Tiger) with 3 gb 667Mhz DDR2 RAM and my 2010 Air 1.4Ghz Core 2 Duo (Upgraded from Snow Leopard to Mountain Lion) with 2gb 1067mhz DDR3 RAM. On both machines, for some time now, during normal usage; especially web browsing using Chrome and Safari (respectively); the inactive RAM on both machines will grow to consume around 30% of all RAM and force time consuming page outs to the mass storage drives on both machines. The Pro has a slower hard drive and the problem is the worst here, the air has a much faster SSD. I have found myself constantly having a window of Activity Monitor up on at least one of my desktops watching my RAM usage, using terminal to purge ram upwards of 10 times an hour to prevent costly page outs, especially on the Pro. I know Apple claims that inactive RAM is essentially free RAM that is temporarily storing recently used information for ease of access later and that it's supposed to be released as free memory when needed, but this obviously is not happening. Right now on my air my swap file is over 650Mb and I've seen it top 2Gb before. The air is exponentially better than the Pro due to the faster SSD, but I do notice substantial UI lag and a massive drop in fluidity as soon as my meager 2Gb is full and I start paging. The Pro is another story entirely, the entire system will essentially become unusable, having to wait several seconds for mouse clicks to even register. That's why I upgraded the stock 2Gb of RAM it comes with to 3Gb hoping that a 150% increase in RAM would help, but it just prolonged the inevitable. I still end up paging out just as bad across both systems if un checked. Even when I keep a close eye on memory usage and purge often, I still end up paging out because I'm not vigilant enough.
    I have to limit my browsing to less than 5 tabs and keep my number of open programs less than 2 on both machines. My active and wired memory rarely seem to top 70%, meaning the rest gets taken by inactive, which isn't functioning as Apple claims. Even if my conclusions aobut what is happening under the hood are incorrect, something is going terribly wrong. I can't upgrade the RAM on my Air at all, and the RAM on my Pro is capped at 4Gb. I'm holding on upgrading because I don't think the excess hardware will solve this software memory problem. Whatever is happening is causing a serious drop in performance for me (yes I do know I have underpowered machines), but there has to be something I can do to speed performance. I've read about disabling the dynamic page file entirely, which just seems to crash the system when free memory is gone, and I've read about programs that claim to free memory. Those programs seem to work by taking a high priority in the process heigharchy of the OS and then proceeding to eat up large portions of RAM and releasing them as needed in an attempt to replicate the true intentions of inactive RAM, but I've heard of problems with this method as well. Does anyone have a viable solution? Monitoring my RAM usage myself and ensuring I don't end up paging out is costly, time consuming, annoying, and inefficient since I fail to catch the problem before I page if I get particularly busy. There is no other OS I've ever been acquainted with that has this problem, not any flavor of Linux, not even the dreaded windows. I seriously hope Apple can do something to manage this runaway memory problem. I'd like to be able to open more than 3 windows in Safari. I've had to purge 3 seperate times while writing this on my Air, and I now have 678 inactive memory, 741 inactive, 582 wired, and less than 14Mb free out of 2Gb with a growing swap at 680Mb. Each purge becomes less and less effective and the last one I did freed up only about 100Mb and it got eaten up again by inactive in less than 10 seconds. On my Air, the memory hog is Safari right now at 700Mb between the web content and flash player with only Facebook, youtube, and this Apple Supprt tab open. I have NO other applications running in the fore or background other than Activity Monitor and Terminal. On my Pro the memory hog is always kernel task, I use Chrome and Safari both. While the memory used by the browser does not usually take up the most substantial portion of the total used RAM out of any process, the more tabs I open, the more RAM I use. The browser is usually the second heaviest RAM hog to Kernel Task. So it seems that across the two machines there are two lsightly different manifestations of the same problem with the same results: massive performance drops and extremely annoying and costly page outs no matter the reason. I just want this problem to go away. I've used underpowered windows laptops that can open a dozen tabs in a heavier browser like IE or Firefox while using other programs like Word or Excel and more with no memory lag issues. There's no way in **** I could manage to open that many pages in a browser while using Pages and/or Numbers on either of my machines and expect reliable (swap free performance). This is just kind of sad in my opinion. Does anyone have a way to get my OSX machine running smooth so that I can remove the one thing that windows and Linux fan boys get the right to laugh at my Macs for?

    Hi Zephryl,
    I was actually able to get an initial response from Sun on this a few months ago. However, the Sun Swing team has not followed up on a resolution for this pervasive problem, even though they noticed the same problem when running a test applet I had created for them. Apparently, I.E. is not releasing memory from the heap.
    Below is a quote from a Sun rep. on this in an e-mail sent to me on Dec 4, 2002:
    "I suspected the leak is in the native code because the # of handles and GDI objects keep increasing but no obvious Java objects are left behind in the Java heap during page switch."
    So, until Sun and/or Microsoft work out a solution to this, anyone who uses I.E. 6 and applets for their UI seems to be in a lot of trouble.
    As a note, trying to invoke the Garbage Collector does not do anything, but generally a very small amount of memory will be released (like maybe 5-10% of the memory allocated for the applet).
    Cheers!
    Avi Gray
    Global Computer Enterprises

  • Java Memory Management/Out of Memory

    Hi Guys,
    I have a few questions about java memory management
    Because i keep encounter a lot of out of memory error which i think java does not handle Vector/ArrayList re initialisation automatically
    Asumme i have 2 million record in database and , i will process every 80000 and store it in Vector
    while(true)
    list = new Vector();
    list = GetResultFromDatabase() // Process Every 80000
    if list.size() > 0 =======> My VEctor list contain 80000
    //loop the 800000
    //Process Some logic and data
    list.clear();
    list = null;
    If u See , i need to call list.clear and list = Null every process so it wont cause me out of memory
    Before i put that 2 lines , i always hit out of memory Exception.
    Seems like garbage collector cannot claim memory if i dont declare
    Is Memory Occupied by VEctor cannot be recoverable if we dont explitcitynya clear it and set it to NULL??
    Because in term of logic wise it wont cause a problem if i just
    do in this statement after it process like below
    list = new Vector() which will reinstatiate the object.
    Thanks.

    Damm i should hacve read your post again
    Look here:
    while(true)
    list = new Vector();What uer doing is craeting a new vector object everytime the while does an ityteration so when your while loop does 40000 loops there will be 40000 new objects in jou memory
    i sugest moving the decleration outside the while loop:
      list = new Vector();
    while(true)
    ///rest of loop
    } This could also be a problem
    hope it help :-)
    werns

  • How does object memory management works?

    Hi all,
    I'm having a lot of problems with memory which seems not to be released when using objects (on Oracle 9i 9.0.1.1.1). I've prepared the following test:
    create type t_test as object (
    id number,
    member function FunctTest(TBL IN CHAR, expand IN CHAR) return varchar2
    ) not final;
    create or replace type body t_test as
    MEMBER FUNCTION FunctTest(TBL IN CHAR, expand IN CHAR) RETURN varchar2 IS
    BEGIN
    return NULL;
    END FunctTest;
    end;
    create or replace function FunctTest2(TBL IN CHAR, expand IN CHAR) RETURN varchar2 IS
    BEGIN
    return NULL;
    END FunctTest2;
    create table tab_test of t_test;
    insert into tab_test values(1);
    commit;
    As you can see, I create a simple type with a member function, and a schema function who does the same (nothing, in this case). Then I call the two functions with the following PL/SQL blocks:
    declare i integer;
    t varchar2(4000);
    ob t_test;
    begin
    select value(a) into ob from tab_test a where a.id=1;
    for i in 1..5000 loop
    select ob.FunctTest('A','S') into t from dual;
    end loop;
    end;
    declare i integer;
    t varchar2(4000);
    begin
    for i in 1..5000 loop
    select FunctTest2('A','S') into t from dual;
    end loop;
    end;
    If you run these blocks with Task Manager opened (I use W2000) on server console, you can see how memory usage grows very fast with the first block, and how it doesn't change with the second one.
    The memory isn't released till the session is alive.
    I'm trying to develop an object application, but these memory leaks are making me crazy.
    Geoff, does release 2 solve some of these problems?
    In particular, please, do I need to free by myself temporary objects (these ones referenced in PL/SQL blocks)? In which way? I haven't found anything about object memory management in documentation...
    As always,
    Thanks for any support to everybody.
    Andrea Arilotta
    [email protected]

    Andrea,
    Do you have an Oracle Support customer ID? If you can log a TAR on http://metalink.oracle.com with your customer id, someone can take a closer look at this problem.
    Regards,
    Geoff
    Hi all,
    I'm having a lot of problems with memory which seems not to be released when using objects (on Oracle 9i 9.0.1.1.1). I've prepared the following test:
    create type t_test as object (
    id number,
    member function FunctTest(TBL IN CHAR, expand IN CHAR) return varchar2
    ) not final;
    create or replace type body t_test as
    MEMBER FUNCTION FunctTest(TBL IN CHAR, expand IN CHAR) RETURN varchar2 IS
    BEGIN
    return NULL;
    END FunctTest;
    end;
    create or replace function FunctTest2(TBL IN CHAR, expand IN CHAR) RETURN varchar2 IS
    BEGIN
    return NULL;
    END FunctTest2;
    create table tab_test of t_test;
    insert into tab_test values(1);
    commit;
    As you can see, I create a simple type with a member function, and a schema function who does the same (nothing, in this case). Then I call the two functions with the following PL/SQL blocks:
    declare i integer;
    t varchar2(4000);
    ob t_test;
    begin
    select value(a) into ob from tab_test a where a.id=1;
    for i in 1..5000 loop
    select ob.FunctTest('A','S') into t from dual;
    end loop;
    end;
    declare i integer;
    t varchar2(4000);
    begin
    for i in 1..5000 loop
    select FunctTest2('A','S') into t from dual;
    end loop;
    end;
    If you run these blocks with Task Manager opened (I use W2000) on server console, you can see how memory usage grows very fast with the first block, and how it doesn't change with the second one.
    The memory isn't released till the session is alive.
    I'm trying to develop an object application, but these memory leaks are making me crazy.
    Geoff, does release 2 solve some of these problems?
    In particular, please, do I need to free by myself temporary objects (these ones referenced in PL/SQL blocks)? In which way? I haven't found anything about object memory management in documentation...
    As always,
    Thanks for any support to everybody.
    Andrea Arilotta
    [email protected]

  • Oracle 9i Automatic PGA Memory Management

    Hello,
    my team and me, we are facing difficulties to change the size of the PGA used by our server processes for HASH JOIN, SORT... operators,
    here you can see the results of "select * from v$pgastat":
    [pgastat dynamic view results|http://pastebin.com/m210314dc]
    We have been increasing consecutively our pga_aggregate_target parameter from 1.7 Gb initially to 4Gb then at the end 6Gb, the value of "Global memory bound" and " aggregate pga auto target" on the link above are still equal to 0.
    I have been reading threads on the forum and documentation see below, I understand how the global memory manager (CKPT) computest the sql memory target and then the global memory bound, as far as I understand I can only "play" on the pga_aggregate_target value in order to increase the size of our PGAs (I exclude to play with hidden parameters).
    - Joze Senegacnik: Advanced Management of working areas in Oracle 9i/10g : http://tonguc.yilmaz.googlepages.com/JozeSenegacnik-PGAMemoryManagementvO.zip
    - Dageville Benoit and Zait Mohamed: SQL memory management in oracle 9i
    Here different information that could be usefull:
    OS: solaris 10 (db running in a non global zone)
    Arch: 64-bit sparcv9 kernel modules
    Physical memory: 32 Gb (being shared between all non global zones)
    Oracle version: 9.2.0.5 32bits
    Values of init parameters and hidden parameters that could be relevant:
    [init parameters|http://pastebin.com/m40340cf4]
    [hidden parameters|http://pastebin.com/m50d74c53]
    Maybe useful queries:
    over work areas views, I use the following script:
    [wa_analysis.sql|http://pastebin.com/d606ebd9b]
    and the result of it:
    [result of script wa_analysis.sql|http://pastebin.com/m5f49a2e5]

    Joze Senegacnik wrote:
    - either your sessions are using a lot of memory for storing variables like pl/sql arrays which is subtracted from automatic management: PGA_AGGREGATE_TARGET - (aggregated persistent area + a part of the run time area of all server processes)
    - you are hitting a bug
    - or maybe something elseI am really happy you come to this conclusion too, they are the same we made with my team and we have submitting to Oracle support via metalink SR 3-1216060641, we were asking if we hit the following bug (in note 1) or we leak about pl/sql or java... or else indeed,
    note 1: PGA_AGGREGATE_TARGET Assigned Memory Is Left Unconsumed When Set High [ID 844542.1]
    Joze Senegacnik wrote:
    I would like to know:
    1.) what were the values for global memory bound and autotarget immediately (or in short time) after the database restart or when you have increased them Just after the restart of the database and just after the change of P_A_T, we query v$pgastat immediately after and the value of global memory bound and auto target were equal to 0 byte,
    2.) If you are able to change value of PGA_AGGREGATE_TARGET (P_A_T) to 10GB what happens with global memory bound and auto traget. They should be positive at least for a short time. As this is a dynamic parameter you can change it for a short time, run queries and set it back.We plan to do this tonight, we have an "heavy" ITIL change management procedures that allow us to make changes approved by change manager and only during night maintenance window on production system, I come back to you tomorrow. But we have been increasing from 1,7Gb to 4Gb to 6Gb, each time I have been querying v$sgastat in the next 2 mins and global memory bound and auto target were equal to 0 byte.
    3.) Have you checked on the OS level how much memory are using server processes - do these numbers come along with what Oracle says. Not during problematic activities, meaning active work areas performing HASH-JOIN, SORT... operators,
    unfortunately it is a production system, even if he performs poorly, we are not allowed to try or retry the poor queries, but if it comes again I'll do it,
    during low activities, here the results paste with the scripts I used:
    [pga processes info in oracle|http://pastebin.com/f2e540062]
    I spooled the result rows of this previous script in /var/tmp/pga_processes.log then I loop over all processes pid and display pmap output anon info like this:
    h5. cat /var/tmp/pga_processes.log | awk -F' ' '{print $5}' | xargs -n 1 -i pmap -x {}| grep -v 'Addres' |egrep 'Kb' 2>&1 > /var/tmp/pga_processes_os.log
    then I merge line by line the two files with unix paste command, here the results:
    [os and oracle pga informations|http://pastebin.com/f4135c8a6]
    4.) How many server processes are running on you system in average/max and are you using just dedicated processes or also shared?in average 250, we are only using dedicated processes,
    5.) At time of low activity is the global memory bound still 0 or becomes > 0. I have been querying every 15 min during more than 24 hours low activities, it still stay to 0,
    5.) Are you experiencing paging/swapping on OS level?No, here orca figures for details:
    [free memory|http://img509.imageshack.us/img509/5897/ohuron1asd2gauge1024xfr.png]
    swap
    [pagein pageout|http://img121.imageshack.us/img121/6946/ohuron1asd2gaugepginper.png]
    [memory usage|http://img19.imageshack.us/img19/2213/ohuron1asd2gaugeppkerne.png]
    6.) Please post the result of: select * from X$QESMMSGA ;during low activities, [results X$QESMMSGA|http://pastebin.com/f61df7093]
    While you will be answering to my questions I'll try to figure out what we can do to properly diagnose the problem. As you are on 9i it is a little bit harder.I am really kind of your help, as we say in my country, "if you need tow arms one day to carry something, call me."
    --Jeremy Baumont                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • JS memory management?

       I've been having a lot of memory errors crashing illustrator lately, I'm trying to rule out scripts as the reason.  Are there any memory management techniques I should be using while scripting for AI?  All the crashes are "Memory could not be written" errors.

    No takers?  I noticed in the scripting guide for CS5 it says this:
    ... A single global, persistent, ExtendScript engine inside Illustrator handles all BridgeTalk communications. The net effect is that the state of the ExtendScript engine is cumulative to all scripts that ran previously...
    This makes me believe that the variables used in a script are not destroyed after a script finishes running.  The scripts I'm writing are extensive, with many, many variables being created.  I'm wondering if I'm running out of memory after running the scripts so many times.  Do I need to be destroying my own variables as part of my scripts?  If so, how do I do that?

  • MAC OS X Lion performance problem - broken memory management

    Starting with OS X 10.5 there are evident memory management problems in MAC OS X. The web was already then cluttered with complaints about system slowing down dramatically after some time. Back then i had slower machine, Mac Mini with 1GB RAM, so i (wrongly) concluded that it was due to inferior hardware.
    Now i have 2010 MBP, core i7, 8 GB RAM, dual GPU.
    Mac os X Snow Leopard was pain, but after migrating to OS X Lion, working some serious stuff on MAC started to be a nightmare.
    I finally managed to reproduce the problematic scenario, so i run the test and recorded the screen, into video.
    http://www.youtube.com/watch?v=u5wZwZh61_4
    I run the tar+bzip command, which is basic unix stuff, on the large amount of picture files, in my Pictures/ folder. Just before start, i run the "purge" command, to delete inactive/cached program data.
    You can see on the video that free memory starts to drop very fast, and inactive is constantly rising. If you take a look at "bsdtar" command, it takes only a fragment of RAM, so the problem is not in this process. You cannot say that it is a program memory leak, because then the problem would not be in inactive ram, rather in active/wired.
    When the free memory dropped below 100mb, i started some apps, like Safari, iPhoto and MS Word, and you can see in the video, that it takes even minutes to start an app, when normally (when there is free RAM), it would take some 3-5 secs to load.
    I run the same scenario and the same commands on my Linux Centos 6 box, no problem there ! Memory usage is some 10-20mb, no problems with cache/buffer.
    The memory management must be very broken in Mac OS X !

    Broken?  That's a bit harsh.
    Immature?  That's perhaps a better explanation.
    This paper describes Priority Paging as implemented in Solaris 2.7 back in 1998, and that's essentially what Mac OS X is in need of today:
    The problem is that when pages are needed, no differentiation is made between system file cache pages and application pages, and worse, the file cache can actually steal pages needed by applications.
    Finally when Dynamic Pager starts up and needs to start swapping things out, it's fairly heavy weight in operation, and causes the UI not responding cursor (aka the spinning beach ball) to appear.

  • Memory Management in LabView / DLL

    Hi all,
    I have a problem concerning the memory management of LabView. If my data is bigger than 1 GB, LabView crashes with an error message "Out of Memory" (As LabView passes Data only by value and not by reference, 1 GB can be easily achieved). My idee is to divide the data structure into smaller structures and stream them from Hard Disk as they are needed. To do so, i have to get access to a DLL which reads this data from disk. As a hard disk is very slow in comparison to RAM, the LabView program gets very slow.
    Another approach was to allocate memory in the DLL and pass the pointer back to LabView...like creating a Ramdisk and reading the data from this disk. But memory is allocated in the context of Labview...so LabView crashes because the memory was corrupted by C++. Allocating memory with LabView-h-Files included doesnt help because memory is still allocated in the LabView context. So does anybody know if it's possible to allocate memory in a C++-DLL outside the LabView context, so that i can read my Data with a DLL by passing the pointer to this DLL by LabView? It should work the following way:
    -Start LabView program--> allocate an amount of memory for the data, get pointer back to labview
    -Work with the program and the data. If some data is needed, a DLL reads from the memory space the pointer is pointing at
    -Stop LabView program-->Memory is freed
    Remember: The data structure should be used like a global variable in a DLL or like a ramdisk!
    Hope you can understand my problem
    Thanks in advance
    Christian
    THINK G!! ;-)
    Using LabView 2010 and 2011 on Mac and Win
    Programming in Microsoft Visual C++ (Win), XCode (Mac)

    If you have multiple subvis grabbing 200MB each you might try using the "Request Deallocation" function so that once a vi is done processing it releases the memory.
    LabVIEW Help: "When a top-level VI calls a subVI, LabVIEW allocates a data space
    of memory in which that subVI runs. When the subVI finishes running, LabVIEW
    usually does not deallocate the data space until the top-level VI finishes
    running or until the entire application stops, which can result in out-of-memory
    conditions and degradation of performance. Use this function to deallocate the
    data space immediately after the VI completes execution."
    Programming >> Application Control >> Memory Control >> Request Deallocation
    I think it first appeared in LabVIEW 7.1.
    Message Edited by Troy K on 07-14-2008 09:36 AM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • Memory Management Questions

    Hello All!
    I read the Memory Management Programming Guide for Cocoa - several times. But some things are still not really clear.. I would like and need to have a deeper understanding. So, I hope someone could help me The problem is that I had to get rid of several (..) memory leaks in my app, and now I am a bit confused and unsure about my skills at all..
    1.
    What is the difference between sayHello1,sayHello2,getHello1,getHello2,getHello3 and which one is "better" (and why) - please dont try to interprete the logic/sense of the methods itself
    - (NSString *) sayHello1{
    return [[[NSString alloc] initWithString:@"Hello"] autorelease];
    - (NSString *) sayHello2{
    return [[[NSString alloc] initWithString:@"Hello"] retain];
    - (void) getHello1{
    NSString *hello = [self sayHello1];
    [hello release];
    - (void) getHello2{
    NSString *hello = [self sayHello2];
    [hello release];
    - (void) getHello3:(NSString *)hello{
    [hello retain];
    NSLog(@"%@", hello);
    [hello release];
    Concerning this, there are several questions:
    2.
    If I have to release everything I retain/alloc, why then do I have a memory leak, if am returning an object (which was allocated with alloc and init) from a method without autorelease. The object is still in memory. But the following method wont work. What I accept. But the object is, if returned, not reachable, but also not released. Why then is it not automatically released? (i dont mean autorelease)
    - (NSString *) sayHello1{
    return [[NSString alloc] initWithString:@"Hello"]];
    - (void) getHello{
    NSString *hello = [self sayHello1]; //wont work. the object is not there, but also not released. WHERE is it?
    [hello release];
    3.
    When is a delegate method released, if I have no variable I can use to "release"? So, if I have nothing to access the delegate like a NSURLConnection delegate?
    should I, for example, call a [self release]?
    - (void)startParser{
    Parser *parser = [[Parser alloc] init];
    [parser start];
    //should I use a [parser autorelease or retain] here?
    - (void)parserDidEndDocument:(NSXMLParser *)parser{
    //do somethings with the parserstuff
    [self release];
    4.
    *And the last question:*
    Where can I see in instruments, which elements have retain counts > 1 and potential leaks? I was reading the instruments guide but there is only theoretical stuff. No practical guides like: your app should not have/use more than x megabyte ram.. for example: my app gets slower and slower the longer a i use it. -> this indicates memory leaks..

    A Leak is only a leak if the reference to the object is lost.
    https://devforums.apple.com/message/189661#189661

Maybe you are looking for

  • Issue with At selection-screen output

    Hi,   I tried in SDn to find suitable thread atlast i am creating query here. My requirement is: i have two radiobuttons. when i click first radiobutton it hasto show one selection screen it contains pernr and bukrs when i click second radiobutton it

  • Cannot Install this Hardware - can't find the drivers on the cd

    Hey Guys, Well, I have this 2GB Nano since March and trying again to install it. Itunes does not recognize the device. I have done the 5 Rs and the press and hold procedure now twice successfully...but the Itunes does not see the nano. The computer c

  • HP Deskjet F4280

    How do I set the printer to print a 4 by 6 photo This question was solved. View Solution.

  • Having text reveal under an image when hovered on

    I know there is a way to do this using some css and such but I am wondering if there is some tool within Muse that will help me do this. Check out this site built in Muse to see what I am wanting to do: http://jeretslack.com/index.html Thanks.

  • Multiple addressees in mail

    I sent an e-mail thru mail in Snow Leopard using my MobileMe account to 3 addressees all in the "To" section.  After I sent it I checked my sent messages and it only showed that it was sent to the first addressee on the list.  Did I do something wron