Memory manager in ML and Lion flawed

I've been finding many 'flaws' eh? Well every OS has it's fair share of fails, and Apple isn't exempt from it. But anyway:
1. I was running SL on my old-ish, early 2011 Macbook (7,1). So I decided to upgrade to Lion when it came out. The problem started to appear.
What's the problem then? Too. Much. Inactive. Memory.
2. So I thought I didn't have enough RAM (I maxed out to 4GB at the reseller, but they didn't have an 8GB option) so I got 8GB. I installed (had to go through a long process to underclock one of the chips) the RAM... but still there.
3. Truth is: After installing Lion, I went back after a few days. First 10.7, then 10.7.1, then 10.7.2. I stayed on 10.7.3. Reason: Lag. But the problem persisted.
4. When ML came out with it's "Over 200 new features", I thought maybe they fixed it. But NO. Neither did 10.8.1. (although that seemed to help me battery, now at 4220mAh, 73% health)
The problem in detail: As I speak, Safari and the system in general is having bouts of lag. As I said before, I have 8GB of RAM. 873MB is wired. 895MB is active. **6.24GB** is inactive. free memory? 32MB. Of. Free. Memory.
As I understand, Inactive memory is used for applications that have recently closed, so that they can start faster. No problem with that. According to Apple, it's supposed to be freed when an application asks for more memory. Doesn't seem the case.
I'm not some overly-paranoid user that wants all his memory to be free, I just want my apps to stop lagging because they can't use memory that is reserved for that VMWare Fusion I opened 3 hours ago. (Yes, true story)
I have to use the purge command to free that.
Is this ever going to be fixed? Is it the OS, or just me?
EDIT: So it turns out 10.8.1 broke the 'purge' command. Geniuses. (Well it worked to a certain extend, now I have 5GB+ of free memory, but 1GB+ of inactive memory. But I don't mind.)

aperturedev wrote:
And no, I also don't think VMWare is not optimised for ML or Lion. I'm using version 6, which is optimised for the Retina MPB so it's definitely optimised for the 64-bit kernels.
That's impressive considering version 5 was just released the other day.
And when the above scenario was given, VMWare was *not* running. And only 4GB of memory was given to the Guest OS, albeit both my CPU cores. But that is completely unrelated. (right? right)
Then which application had all of your RAM?
Perhaps RAM isn't even the issue. People like to dwell on it but a misbehaving application taking your CPU is far more likely to be the culprit for system lag.

Similar Messages

  • Memory Management with NSString and synthesized properties

    I thought I understood memory management but now I'm getting some odd behavior and that's the only thing I can see that I might be doing incorrectly:
    I have a synthesized NSString propery called displayText. At one point I attempt to set a label with the displayText property (label.text = [[note displayText]]). The first one works, but the second one does not:
    [note setDisplayText:[[note fileName]]]; // - works
    [note setDisplayText:[[self getCharacterInFileName:[[note fileName]]]]; // - does not work
    And here is getCharacterInFileName:
    // Given the fileName for the image, get the specific part of that fileName for the note letter
    - (NSString *)getCharacterInFileName:(NSString *)fileName
    NSRange range = {1,1};
    NSString *characterInString = [[[NSString alloc]] initWithString:[[fileName substringWithRange:range]]];
    return characterInString;
    Is there some pointer mismanagement going on here that I'm missing?
    Message was edited by: darkpegasus

    Nevermind, I'm an idiot. I forgot to close an if/else block with a brace and it screwed everything up.

  • Automatic PGA Memory Management in 9i and 10g

    Hi,
    I read the Doc# 223730.1 for Auto PGA advisory.
    At one point in the document, there is given a query to calculate percentage of times work areas were executed in optimal, one-pass, or multi-pass mode since start-up.
    My question is why there is a clause low_optimal_size > 64*1024); ---- for 64 K optimal size
    Why it is safe to ignore all the workareas below 64 K.
    How to decide which entries should be ignored?
    Thanks,
    Neeraj

    I think 64K value used in that document is just an example.
    You can use the prior query (one above which you have cited here) for finding non-empty buckets and then view histograms for range of your concern (the range which is getting used more frequently in your environment).

  • AEBS and Lion Server DHCP

    Hi All!
    I have a scenario I want some input on.
    1 Mac Mini Lion Server 10.7.2
    1 TC 2nd Gen
    x iPads
    x iPhones
    2 Lion clients
    I want to use the Lion Server for all collaboration services, and use Profile Manager to provide central management of iOS and Lion clients, and I want to use network accounts on the server.
    All is set up and working well, mail, ical, wiki, addressbook, VPN servers, profile manager settings, apart from one thing. how do I best push DNS server settings to the client to point to the server?
    In the TC there are no way to set what DNS server is served to clients. That would solve my case in an instant. Now all clients get the ISPs DNS servers, or pass-through of whatever DNS server is set up on the TC.
    I have 2 possible solutions:
    1. Set up TC to only provide 1 DHCP address reserved for the server, and then use DHCP on the Lion Server for the internal clients. This will work as it has been tested by other users here on this forum.
    2. Set the DNS server on the TC to point to the local Lion Server. I actually just came up with this idéa as I was typing.... maybe that is the answer? The inernal clients get the internal server as DNS and the server uses forwarders or roothints.
    What do you think? If you have this combo, TC/AEBS and Lion Server, how did you solve it?
    /Hasse

    Hi All!
    I actually found the solution myself. Soluton 2 does the trick brilliantly! I can't imagine why I didn't think of this before. I have searched this forum for a solution too, but this just was too easy . The Lion Server advanced admin guide didn't mention this either, even in the chapter about AEBS coexistance.
    /Hasse

  • Memory Management of SAP HANA

    Hi All,
    I went through one of the documentation in SAP HANA Memory management .
    http://www.saphana.com/servlet/JiveServlet/download/2299-2-12806/HANA_Memory_Usage_v2.pdf
    This gave me a really good understanding about the Memory management of HANA . Queries for Used and Resident memory and comparison with Overview tab numbers
    I had few questions , Which was almost answered in other discussed in one :
    But i still have few questions about  Resident and  used memory
    Used Memory : Code + Tables + DB Managment
    Resident :  what is the formula or content ?
    What does this picture refers to ?
    Infact the below statements are bit confusing
    When memory is required for table growth or for temporary computations, the SAP HANA code obtains it from the existing memory pool. When the pool cannot satisfy the request, the HANA memory manager will request and reserve more memory from the operating system. At this point, the virtual memory size of the HANA processes grows.
    Once a temporary computation completes or a table is dropped, the freed memory is returned to the memory manager, who recycles it to its pool, usually without informing Linux6. Thus, from SAP HANA’s perspective, the amount of Used Memory shrinks, but the process’ virtual and resident sizes are not affected. This creates a situation where the Used Memory may even shrink to below the size of SAP HANA’s resident memory, which is perfectly normal.
    My doubt here is how  in any given point of time used memory can go below the used memory , because resident memory is always loaded with what is there in used memory , When used memory itslef is less , what does resident contains extra .
    Also how to make a relation with HANA used memory , Database Resident memory , Virtual memory .
    In case of  a memory issue , what should we check , Used memory of HANA   OR resident memory of HANA  ?
    Thanks,
    Razal

    Hi  all,
    I am trying understand memory part bit in details ,  as i am building a complete monitoring infrastructure for HANA , and memory is core of HANA  all part of HANA
    Can you also help me to understand how to make some difference  for used memory in HANA and Resident memory
    When we say that the Resident memory is something from OS point of view  , this is the memory of the OS which is really being used .
    So if the  used memory from HANA Perspective is full , OS still have some free memory  which can be used , How that part is managed .
    When i say we are out of memory ,  Both used memory from HANA
    Resident memory from OS is full ?
    OR does the used memory is simply a calculation of Code + table + etc from HANA point of view .
    When execute query :
    SELECT SERVICE_NAME,ROUND(SUM(TOTAL_MEMORY_USED_SIZE/1024/1024/1024), 2) AS
    "Used Memory GB", ROUND(SUM(PHYSICAL_MEMORY_SIZE/1024/1024/1024), 2) AS
    "DB RESIDENT Memory GB" FROM SYS.M_SERVICE_MEMORY GROUP BY SERVICE_NAME
      SERVICE_NAME     Used Memory GB DB RESIDENT Memory GB
    1 nameserver         6.73           1.7                 
    2 preprocessor       5.38           0.24                
    3 indexserver        9.19           4.35                
    4 scriptserver       7.52           1.83                
    5 statisticsserver  8.52           3.87                
    6 xsengine          7.92           1.82                
    7 compileserver    5.31           0.23                
    On top of all this , In admin view  i get used memory as 17.87 as used memory and 18.89 as peak  .
    How this used memory is summed up in admin view .
    I am using version 70 .
    Thanks,
    Razal

  • 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.

  • How I fixed memory management fails on Lion

    MAC:
    17" i7 2.66GHz Macbook Prom Mid 2010
    SYMPTOM:
    The Free memory was always dropping and I needed to use FREE MEMORY APPS from Apps Store. The beach ball was frequent. The speed is so slowly from OS X Snow Leopard, even I made a Permissions Fix, it takes a lot to start and shut down. The memory drops on every app I open and the system can't free them after I quit the apps.
    WHAT I DO:
    I made a backup, formated and installed a free new copy of OS X Lion and SOLVED all the memory drops.
    IMPRESSIONS:
    I have 8GB of RAM in my  and now I see at least FREE 5.5GB RAM CONSTANTLY (navigating web, without use of huge memory hungry background apps). I'm another 17" MBP Mid 2009 owner with 4GB RAM and noted that it was faster. Both with the last version of Lion. Not now after the new copy of Lion my mac is pretty fast again There is no aparent issues about Lion Memory Management as people are discussing.

    Yes, a brody and thanks for your link. In this Mac I installed an old HP scanner driver
    I'm very concearned about people saying don't upgrade to Lion, it's a big liar! You don't need to put your mac to sleep as people said to don't waste time on boot. I imagine boot process is very useful for system reset and evaluate hardware status.
    I made a lot of reboots to certificate the speed boost, I imagine the system makes it to diagnose any problems and fix itselves.
    I feel the boot and shutdown is becoming fast as I use it since the first boot of reinstaled Lion.
    Only one issue (solved) is about installing Epson printer that couldn't print wirelessly.
    It was solved just clicking at OSX X UPDATE SOFTWARE and it discovers an needed Epson Driver Update for Lion.
    Very happy again with my mac.

  • Mountain Lion memory management Issue !!!

    Hi,
    I have a MacPro Mid-2010 quad-core intel xeon with 10 gb ram.
    Im an audio engineer n i use this machine extensively for my work.
    I recently updated to mountain lion.
    Since updating the memory management has gone from amazing (never ran out of memory even while doing extensive tasks) to crap (running out of memory all the time).
    At the moment im adding a lot of tracks to itunes while simultaneously using mp3 scan+repair to fix my mp3 files.
    this to me doesnt sound like anything that my MacPro should have difficulty with but its sluggish. i can still type this message easily while the other 2 tasks are on but its just feeling slow.
    now when i look at istat this is what i see:
    now why would there be so much inactive memory n free mem only like 10 mb with 260 page outs?
    i shouldnt be getting page outs with so much inactive memory.
    getting page outs means buying more memory but i dont think i need it.
    im unclear about mountain lions memory management.
    please advise.
    Thanks.
    Gautam.

    I'm using version 7.0.15104.778994 and having no trouble under Mountain Lion. I think that it was a July 10th release (coinciding with the GM developer release of ML).
    What version do you have?
    Clinton

  • What is difference between 32 bit and 64 bit sql server memory management

    What is difference between 32 bit and 64 bit sql server memory management
    Thanks
    Shashikala

    This is the basic difference...check if helps:
    A 32-bit CPU running 32-bit software (also known as the x86 platform) is so named because it is based on an architecture that can manipulate values that are up to 32 bits in length. This means that a 32-bit memory pointer can store a value between 0 and
    4,294,967,295 to reference a memory address. This equates to a maximum addressable space of 4GB on 32-bit platforms
    On the other hand 64-bit limit of 18,446,744,073,709,551,616, this number is so large that in memory/storage terminology it equates to 16 exabytes. You don’t come across that term very often, so to help understand the scale, here is the value converted to
    more commonly used measurements: 16 exabytes = 16,777,216 petabytes (16 million PB)➤ 17,179,869,184 terabytes (17 billion TB)➤ 17,592,186,044,416 gigabytes (17 trillion GB)➤
    As you can see, it is significantly larger than the 4GB virtual address space usable in 32-bit systems; it’s so large in fact that any hardware capable of using it all is sadly restricted to the realm of science fiction. Because of this, processor manufacturers
    decided to only implement a 44-bit address bus, which provides a virtual address space on 64-bit systems of 16TB. This was regarded as being more than enough address space for the foreseeable future and logically it’s split into an 8TB range for user mode
    and 8TB for kernel mode. Each 64-bit process running on an x64 platform will be able to address up to 8TB of VAS.
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • 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

  • Difference between nio-file-manager  and nio-memory-manager

    Hi,
    what's the difference between nio-file-manager and nio-memory-manager? The documentation doesn't really discuss the differences as far as I know. They both use nio to store memory-mapped files don't they? What are the advantages/disadvantages of both?
    When to choose the first one and when the second when storing a large amount of data? Can both be used to query data with the Filter API? Are there size limits on both?
    Best regards
    Jan

    Hi Jan,
    The difference is that one uses a memory mapped file and one uses direct nio memory (as part of the memory allocated by the JVM process) to store the data. Both allow storing cache data off heap making it possible to store more data with a single cache node (JVM) without long GC pauses.
    If you are using a 32 bit JVM, the JVM process will be limited to a total of ~3GB on Windows and 4GB on Linux/Solaris. This includes heap and off heap memory allocation.
    Regarding the size limitations for the nio-file manager Please see the following doc for more information.
    With the release of 3.5 there is now the idea of a Partitioned backing map which helps create larger (up to 8GB of capacity) for nio storage. Please refer to the following doc.
    Both can be used to query data but it should be noted that the indexes will be stored in heap.
    hth,
    -Dave

  • Memory management in jelly bean xperia tablet s and performance issues

    Most used apps are always in memory.
    while recent apps few remain in memory untill memory is full.
    this is how memory management is supose to work.
    pretty much same as windows 7
    but if this true then why are games lagging ?
    http://www.youtube.com/watch?v=S3TwBlW5ibk
    When their not enough memory games i suspect lagging.
    if their not enough memory recent apps getting killed to free up ram.
     why does't this happen ?
    And why are their apps in memory that i never use ?
    tv sideview never use why its in memory ?
    social life again never use again using memory
    reader widget again using ram again never use at all
    music unlimited again in memory never actualy use
    Like i say'd most used apps are in memory all the time while rest is in cache.
    But my most used apps are never in ram untill i start them
    now if disabled lot apps my tablet become much faster respondsive.
    Can sony plz plz plz plz fix memory management stop saying you did ?
    You maybe reduced random shutdowns by like 90% or 95% perhaps even 99.99%
    Before random shutdowns happend because of broken memory management, which obviously still broken as i see lag in games
    sony apps use way to much ram, stop treating it like a computer with infinity amount of ram

    I rooted my tablet, and when looking at the processor speed in SetCPU, Sony uses a governor for power management that makes the tablet run jagged... I changed the power governor to ondemand, and got MUCH better smoothness and performance, while not sacrificing my battery life. You should try it out, maybe that'll help with games and such.

  • Memory Management comparison between Database 9208 and 11gR2 on Sun Solaris

    Hi All,
    Need some case studies which would help understand how Memory management is done in 9208 and 11gR2 on Sun Solaris SPARC
    Also wanted some real time data which says 11gR2 manages Memory and CPU better than 9208. Some comparison Graph between 9i and 11gR2.
    Any information will be of great help.
    Thanks everyone for your support.
    Thanks
    Abdul

    please see if below helps :
    http://www.oracle.com/global/de/upgradecommunity/artikel/upgrade11gr1_workshop2.pdf
    http://www.dba-oracle.com/oracle11g/oracle_11g_memory_target_parameter.htm
    Regards
    Rajesh

  • I migrated everything from my Snow Leopard iMac to my new Lion iMac and now whenever I launch an Adovbe app like Photoshop the Adobe Manager pops up and wants my serial numbers or to start a trial version. I don't have my CS5 serial

    I migrated everything from my Snow Leopard iMac to my new Lion iMac and now when I launch anything in CS5 like Photoshop the Adobe Manager pops up and wants my serial numbers or to start a trial version. I don't have my CS5 serial numbers but wouldn't they migrate over with everything else?

    but wouldn't they migrate over with everything else?
    Are these PowerPC apps that ran on Rosetta with Snow Leopared?
    If so you need to read these articles...
    Lion upgrade questions and answers:  Apple Support Communities
    What applications are not compatible with Mac OS X 10.7 "Lion"? What upgrade or substitute options are available for common incompatible applications? @ EveryMac.com

  • Aren't Cocoa Memory Management Rules flawed?

    I understand the details of Cocoa memory management but I'm wondering what's the rationale behind the usage of autorelease with convenience constructors.
    The golden Cocoa rule is that factory methods send an autorelease message to objects prior to returning. But why is that? Why don't consider convenience constructors the same as alloc, newObject and the like?

    Well, that's even worse: if you create several throwaways with autorelease, you're essentially delaying their releasing to the release of the autorelease pool, i.e., by default, when the application quits, unless you provide your own autorelease pool. It sill doesn't make any sense to me.
    Stack based objects would have probably complicated the syntax of the language.

Maybe you are looking for

  • Windows nor iTunes does not recognize iPod anymore

    I have a major problem that I can't comprehend. OK, so my hard drive did some weird stuff on me and I had to repair it. Afterward, a whole bunch of things got messed up so I had to repair my Windows XP installation. And now, when I connect the iPod,

  • Web service security with mutiple certificates

    Is it possible to secure a web service on OC4J such that multiple clients can securely access the same web service. I have been trying to send messages to the same web service end point using multiple signature keys. The problem that I am getting is

  • Kernal_task keeps taking 100% of one of my CPUs. Does anyone else have this problem?

    This seems to relate to when the computer is hot. However, it is not that hot at all. Seems to be aggressive way of cooling? Does anyone else notice this? I am on macbook air 2013 and mavericks

  • Scedular Task

    All, I am creating a KM Scedular task to run at some interval. The task is running fine. Now want to configure the task with certain custom properties. The javadoc on the run method is not explanatory and it doesn't explain anything. If you have some

  • What is causing this to happen to the screen?

    My son has a new 15" MBP (July 2012). When he tries to play a game on it, like WoW. He is getting this happen on his screen. Is this a video card problem?