by alin23 · 5y ago · 0 comments
Every time this happens, Xcode uses about 4GB of RAM (probably because of the monolithic UI storyboard of Lunar) but it should still leave enough memory for my other non-memory hungry apps.
But then I open Activity Monitor and I see WindowServer using ~80GB of memory [2]
The only remedy is either `killall WindowServer` or a full reboot.
I've been using an M1 MacBook Pro and Monterey since the first developer beta but this only became an issue in the last 2 months or so.
This is an intel Mac though. I haven’t seen it on my M1 at home.
https://bugs.chromium.org/p/chromium/issues/detail?id=115840...
I wish I had found this website when my MacBook Pro was still alive, maybe Chrome actually killed it after all. The low performance was so bad I moved to Windows 10 ("the last Windows system" they said), but after it notified my system can be upgraded to 11 I quickly moved to Ubuntu. I'm currently experiencing a few hiccups and reduced them with some memory tweaks, but still the experience is much better than Mac and Windows.
To answer your question, I have a total of 73 windows open at the moment. 11 of them are from applications with a single window open, 8 are from iTerm, and 54 are from Sublime Text. I am aware that is quite a lot for Sublime, but that is just how I use it.
Regardless, I just quit Sublime Text, and the memory usage only dropped to 8.9GB still absurdly high for having 19 windows open.
WindowServer has consistently been the main culprit but occasionally other apps like to chip in where they can too. Often that means there isn’t one single process which I can kill to reclaim enough memory to continue working without being promoted again or having MacOS forcibly close all my applications on me. As a result, reboots appear to be the only real solution for me.
Interestingly though, in the past few weeks I have been working with similar numbers of open Sublime Text windows as yourself and I can confirm that since then, ST4 has been a regular and serious offender when it comes to memory usage in Activity Monitor.
They sell you a very expensive machine that doesn't work.
Your reaction?
Buy a more expensive one from the same provider!
I use a dual xeon, 64GB Linux desktop which performs reasonably well.
A colleague runs a Linux machine with 16GB of ram. Compiling the same project can cause OOM issues for him and the kernel starts whacking processes.
Even if he closes all non-essential processes, his builds run 10x as long as mine due to memory constraints.
My main point here - let’s not pretend your 4GB machine is being used to do any intense local work.
The inverse of this is seen on my Intel MacBook Air and my colleague’s M1 MacBook Air. The compilation time for our code is 35 minutes or more on my machine and only 3 minutes on the M1.
That depends entirely on what you consider intense local work. Just because you are not compiling doesn’t mean running your 15 microservice stack locally is not intense.
Most Linux distro suggest you to setup swap so instead of crashing it could use the swap. I personally don't use swap, because if something is consuming too much ram I most likely want it dead.
I don't know what are you compiling, but requiring more than 16GB of ram for compiling something sounds lazy and unneeded. Likewise you can use a browser extension which reclaims ram from unused tabs.
I can understand the need to have 64gb to do video editing or rendering, but most of the times we need that much ram is because our software is badly written and we don't want to face the problem, not because of the complexity of what we're doing.
Which distro and can't you configure this? (Genuinely interested)
Also if the MacBook is better, than you should use that device. It's your "conclusion".
While the tooling and system stability are better, the desktop and app experiences are far worse. It’s buggy, half-baked, and crash.
I regularly hop distributions and do clean installs to see if that will fix it but they’re all the same — pop!_os might be slightly more stable in that regard.
I’ve been using Linux since 1992. I’ve had several year periods in the 90s and early 2000s where Linux was all I used.
I can ditch GNOME, KDE, and XFCE and go back to twm or i3 or fvwm or Window Maker, but I’ve moved beyond thoses experiences. I want a more functional desktop.
But, I see now why I paid more to put up with Apple.
So besides dpi-scaling issues linux is known for, whats the draw? Some hotkey that does a thing? Some visual candy? Smoothness in transitions?
Whatever it is, it's hard for me to imagine it being worth the tradeoff. I can't even name desktop workspaces on a Mac!
I'm reviewing the "new features" section on Monterey: https://www.apple.com/macos/monterey/features/ and I'm not seeing much other than a few known areas (multi-device support if you bought fully into the apple ecosystem, etc).
With most "I tried linux desktop" people it's a problem of DE/WM, but you seem to be beyond that so I'm genuinely curious.
Does the OS hard lock or completely crash? No... unless you have graphics drivers issues, which isn't unlikely. Then, oh man, yes, lots. X/Wayland crashes that restart the window server? Yep. Applications crashing pretty regularly or glitching out so badly they have to be restarted, including the basic applications distributed with the heavier DEs? Yep. And it turns out that your windowing environment crashing or the main program you're currently using crashing is really close to as bad as the whole machine blue-screening in Windows, from the perspective of the user. Using Linux makes me anxious, even though I very much know WTF I'm doing with it. MacOS and even (spits) Windows don't do that to me, any more. Now that I've experienced not feeling that way, I can't go back. I go years between work-lost crashes of any sort at all on MacOS. Linux, one month without such a thing would be miraculous.
If you build up from almost nothing and keep things very minimal and have very boring and stable old hardware, and do as much as possible from the command line, it can be kinda OK, but it's a lot of work to set something up like that, and ongoing effort every time you do something manually that'd be automatic or trivial on a more full-featured GUI desktop. If you start with something like Ubuntu or Fedora standard desktop installs, though, there's just too much that can go wrong, and it will, with some frequency.
I could tolerate some hardware or workflows not working and things generally being a little less convenient, maybe, if it were rock solid, but it's very far from that. The main problems seem to be that its entire graphics stack is incredibly fragile (Wayland doesn't seem to have done much, if anything, to fix that) and it's way too easy for a glitchy driver to screw up the whole system.
Grass isn't always greener.
Edit for an example, I'm stuck on Catalina because they tried deprecating functionality my firewall uses. And the window shifter shortcut key program I use won't work in Big Sur.
I use my computer to write Elixir code, write music with Logic and Studio One, and edit photos/videos. Maybe none of those tasks trigger the problems other people are having.
I like how x86 is a power sucking hog for the performance and enthusiasts response is to go out and buy more power sucking hogs!
Someone wasn’t around when Linux could figure out what to do with a USB device. Spectre? Meltdown? What are those?
It’s almost as if engineering is hard and being a critic is easy.
Kind of like numbers, language allows for a never ending, so big in a sense, corpus of little ideas.
Two concrete examples: trackpad feels like shit on both Windows and Linux, installing or updating drivers and some apps on Windows constantly switches back to legacy modes to display the installers (with different fonts, no subpixel smoothing etc.). If it's not a deal breaker, it is annoying as hell and something that almost never happens on my Mac.
Your experience must differ, but if I spent $2000+ on a device only to find that was locking up (due to poor memory management in a standard component!) under my standard workload, I would be livid. I would probably return it, and then tell the next 10 people I meet about my poor experience.
That said, I have run across a Windows 7 bug where the font manager would repeatedly fail and leave its cache/log on disk, only to restart and repeat until the hard disk was just about full. Complaints about the poor state of software engineering as a discipline go back to the beginning.
That.
I don't love Apple. They're a corporation, so at best our interests temporarily align. Loving them would be absurd. I really really want them to have strong competitors. I'd love to be back on an open source OS full-time, like I was for many years.
Unfortunately, they're so far ahead of the competition, that they screw up, sometimes even in a few ways at the same time, and people come out saying "LOL and Apple fanboys won't switch to Linux even now", and that's true... but it's because I'd be trading a few problems for a few score problems.
I ran Linux on laptops and desktops for about a decade, as my main computers. Ubuntu near the end, Gentoo for about five years, Mandrake really early on, a little time with Fedora somewhere in there, a sprinkling of Debian. I still try it out every year or two! I wish it weren't, but it's still much, much worse, and in the best case slows me down and gets in my way more than a "bad" Apple machine with a "bad" version of an OS X / MacOS, barring actual faulty hardware.
I got so sick of troubleshooting issues myself, I switched to Windows 7 and have never had to troubleshoot my OS since then. I don't google Windows issues, I don't have crashes, nothing.
It's nice to have a machine that I can just work on and not constantly debug.
(I 100% expect privacy advocates to admonish me for this, but I use hardware I assembled myself and block MS telemetry.)
Changing brands becomes more of an ordeal than staying.
It's extraordinary to find more than a handful of anecdotes about any particular model number of consumer Windows laptop that happens to be on sale at Best Buy today. There are so many, and they cycle so rapidly.
Also, I get along just fine with the last few Macs I have had...
[1] https://github.com/tpoechtrager/cctools-port
[2] https://github.com/apple-cross-toolchain/xcbuild
[3] https://thi.im/posts/cross-compiling-for-ios-part-1-build-sw...
Note that I've had Dell XPS laptops that were configured with the same price point as a Macbook and while nice...those devices definitely didn't have the same attention to quality that I've experienced with Apple products. So it seems unfair to make such a broad criticism against Apple users at large!
I use a MacBook trackpad to make diagrams, for 3D modeling using Blender and FreeCAD, to draw schematics and route PCBs with KiCAD, and whatever else you’d otherwise do with a mouse, and it just doesn’t get in the way.
Over the years, I’ve been forced to use work supplied top-end Thinkpads, HP, and Dell laptops and none come even close to even the trackpad of my long retired, lowly 2009 MacBook Air 11”.
I don’t really care whether I use macOS, Linux or Windows: they all run the same applications. I also don’t care about the price of a laptop: what does it matter that a tool that I use day in day out for years costs $1000 more?
I care that it’s usable.
MacBooks are usable for things I use them for. The other laptops are not.
That's how you sound.
What is the alternative platform that runs Xcode but with the memory leak bugs fixed?
A finance professor once told me “if you don’t vote with your wallet you don’t get to complain”
Looks like the 16gb model is now artificially made obsolete as well - you are supposed to buy the 64gb one.
Modern hardware can and should last ten years. Accept no excuses.
It was a measure to increase product longevity (e.g a slow phone was seen as better than a phone that shut off randomly when voltage dropped)
If this was such an altruistic measure why would the geniuses at the Genius Bar deny that my mothers phone had slowed down and throw diagnostic tests at our faces? Why was the exasperated Genius, who could clearly tell that the phone was slow indeed but his successful diagnostics meant there was nothing he can do, reduced to swiping up all the apps on the phone to kill them, when we both knew that if iOS was working properly that should do nothing?
My iPhone 5 got so slow and Apple was so unhelpful that I ended up replacing it. That was my first and last iPhone.
I ran heap(1) on WindowServer [1] but there's nothing in there standing out so maybe this is a red herring.
[1] https://gist.github.com/772687dba65a35cca8cd707fcfda99c0
I have no idea how to troubleshoot this and don’t really have time for it when working on hotfixes, I just want to get back in a state where I’m not facing an imminent system lock up where I can’t even save my recent work.
Although that particular issue will show in application footprint, not WindowServer. I see WindowServer buildup on one of my M1s still, even in 12.1 beta :(
https://randomascii.wordpress.com/2018/02/11/zombie-processe...