8 ms·
Okay, I really think you know much more about memory management than the writer of the original post, the question for me is using chrome with a few tabs (8 for
by hazov 15y ago
Okay, I really think you know much more about memory management than the writer of the original post, the question for me is using chrome with a few tabs (8 for example) and Dropbox besides the default applications I face huge slowdowns (the system becomes unresponsible for a few minutes), the same happens with Safari, for a system that was described for me as "it just works" this really sucks. This with 4GB of RAM in my MacBook Pro.
I face no such problem with Linux or FreeBSD in the same hardware.
- deleted 15y ago[deleted]
- jakobe 15y agoOpen activity monitor, and check which applications use a lot of memory. (Look at the "Real Mem" column). If your computer frequently freezes, the problem is mostly a specific application (Virtualbox comes to mind), not just Mac OS X itself. 4GB are more than enough for casual browsing.
- 4ad 15y agoActivity Monitor is a tool too blunt for these kind of scenarios. It pains me, Mac OS X has DTrace which makes it a breeze to find out what really happens, however, the only GUI tools built on top of DTrace are profiler for programmers, nothing for the casual user. Activity Monitor presents data that's not really useful and does so in an intrusive manner and in a confusing display. Mac OS X already comes with parts of the DTrace toolkit, you can install whatever you're missing: http://www.brendangregg.com/dtrace.html#DTraceToolkit http://www.brendangregg.com/dtrace.html#DTraceToolkit. These tools allow a very deep understanding of performance problems.
- hazov 15y agoWell, I know the basic about SystemTap, but I'm not so much familiarized with low-level stuff, I'll look for DTrace to see what's happening. Thanks for the information.
- 4ad 15y agoSystemTap is a Linux thing, which you can use on Linux to see how this works, but it won't be a pleasant experience. DTrace is also available on FreeBSD, so if you look at what happens on Mac OS X, it might be helpful or insightful to also look at what happens on FreeBSD.
- jakobe 15y agoIf your problem is that you are running out of RAM, Activity monitor will tell you precisely what app is the culprit. Nothing "blunt" there. If you want to know why a specific app is frozen (beachballing), you can click the "Sample Process" button in Activity monitor to perform a time profile. Yes, if you want more details, you have to use Instruments or write your own DTrace scripts. But I doubt that even a time profile is useful to the "casual user".
- 4ad 15y agoSorry, but no, you're just illustrating the problem I've mentioned. In a virtual memory system with on-demand paging, memory mapped I/O, shared libraries and copy on write pages even measuring and interpreting memory stats is very difficult and subtle. The "real memory" column is resident set size, a completely useless metric for the problem at hand because of many reasons. One reason is that much of the physical pages can be shared, indeed most of them usually are, on my system a chrome process has a 120MB RSS, but after closer inspection 110MB is shared, and after even closer inspection 90MB is shared with non-chrome processes. Closing the process with top RSS usage might do very little for decreasing memory pressure. Another reason is that physical memory usage is very misleading, if the system is swapping, a process has less resident physical pages than the virtual pages it uses, that's the reason the system is swapping in the first place! A process can thrash memory and have a relatively small RSS. You also simply assume what the problem is without actually testing for it. You need to look why the system spends time in kernel mode, maybe it's not swapping, most likely is not swapping in this particular case, it's more likely to be the random I/O caused on-demand paging of memory mapped things or something more subtle, like copy-on-write pages being written to. It also could be a million other things. Even if the problem is caused by memory pressure, memory pressure is a remarkably generic term, the VM system has many components and different components are affected by different workloads. A simple metric like RSS can't tell much. Yes, Activity Monitor is very blunt tool.
- jakobe 15y agoYou are missing the point. The idea is not to determine exactly what's going on, because that doesn't matter. You mentioned the casual user before, but all these details are only important to specialists trying to debug an issue with a specific application. When you run out of RAM, it is completely irrelevant which application is thrashing, because the problem is that you run out of RAM. It doesn't matter if the reason is that an app is accessing a memory mapped file or modifying a copy-on-write page, when underlying reason is that you ran out of RAM. Activity Monitor is perfectly suitable to find out why you ran out of RAM. Oh, Mathematica is using 2GB of RAM? Maybe I try closing that. It doesn't matter if "Real Mem" actually counts some memory twice, it is still a useful measure. EDIT: Yes, I assumed that the problem is memory pressure. Since this is a common reason for "The whole system becomes sluggish", it seemed reasonable to start testing for this.
- blktiger 15y agoActivity Monitor is way older than DTrace and I don't think Apple has made any code changes to it in a long time.
- Zev 15y agoThe casual user doesn't know what any of the words in your post means.
- wvs 15y agoThe private memory column is likely a better measure when looking for memory hogs.
- billpatrianakos 15y agoI can't directly answer the question but I get the feeling most memory issues have to do with an individual's use of their system, and not the system itself. I have a 2009 iMac and a little netbook running Xubuntu. The iMac has 4gb RAM and the netbook just a single gig RAM and not even 2ghz processor. The netbook doesn't slow down on me while the Mac is prone to freeze ups. I Could say "Linux is better than my Mac because it doesn't slow down" but that's not fair. They each have their own pros and cons and I don't see one as being better than the other, it's all a matter of preference. When the slowdowns bother me I look at usage. On the Mac I always have 4 spaces open (the dashboard is not set as a space on my Mac), and at all times I have the following apps open: Mail.app, Terminal.app, Chrome w/>=5 tabs at a time, MAMP, CodeKit, iTunes, and Sublime Text. Then Photoshop is open a lot in a addition to a lot of others that get opened at times. On the netbook I've got a terminal session, Chrome, and Sublime Text. That's it. It's no wonder the Mac slows down. So I'd say look how you use the thing. No machine has unlimited performance and when it comes to memory usage it's a lot like money in that the more you have the more you tend to spend and you never seem to be able to have enough.
- hazov 15y agoI thought about that some time ago but I use the laptop mainly to browse the web, never more than 10 tabs, and login via ssh in a Linux desktop. Maybe it is slow because of that, but the main problem I have with this is that I get no slowdowns running Linux and FreeBSD in the same computer and with the same use case. This computer stays up for several days[1], and I suspect the main cause is because of Chrome leaking memory. [1] Now: 20:16 up 43 days, 23:41, 2 users, load averages: 0.38 0.31 0.26
- hristov 15y agoThe parent told you he was using Linux and the Mac the same way.
- calloc 15y agoI've never had this happen, and I run Mac OS X on a MacBook Pro 5,5 with 4 GB's of RAM (core2duo at 2.33 Ghz). This laptop is from the mid-2009's. My default set of apps that I run: 1. Safari 2. Mail.app 3. Terminal.app 4. Adium 5. Twitter 6. iCal 7. X11 8. MacVim 9. GitX 10. Activity Monitor I have no slow-downs and I regularly compile the entire companies code-base on this little machine. Sure it isn't fast compared to some of the newer monsters out there, but I have had no issues with slow downs what so ever. That being said, I don't use Chrome, and I don't have DropBox on my work laptop. I keep hearing about people having really bad slow downs and I just don't understand it. Mac OS X has never been anything but "Just Works" for me. 11:29 up 69 days, 17:34, 11 users, load averages: 1.38 1.24 1.18
- hazov 15y agoBesides of that OS X works really fine for me, although I do not use it to serious work, which is programming in C++, Python and R since I work as a statistician, I will upgrade the memory to 8GB and see if things become better for me.