Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

> The memory usage in PHP 5.5 is far less than earlier versions.

Regarding Zend Engine, does anyone have a link for just how much 'less'?



sort by: page size:

> Memory usage is improved by a factor of about 3x. For Zig, building itself went from using 9.1 GiB to 2.7 GiB.

Pretty impressive.


> developers are reportedly severely limited in the amount they can actually use.

When did 5 GB of RAM become severely limited?


> not being too opinionated about your use of memory

That's a bit hard to tell, isn't it? When I checked out the docs after last week's Zig thread, the entire section on memory allocation was a big fat TODO.


>-XX:+UseZGC: Memory usage for my project dropped to a constant 600 megs. Using the IDE felt just as fast as the normal experience.

Shame, I hoped it would feel faster than the normal experience, with (even infrequent) user-felt GC pauses completely eliminated.


> This in the time when 16 gigs ram is the baseline if you plan to do anything more than facebook and instagram.

Facebook and Instagram is probably the upper bound on memory-hungry apps. (The average webpage consumes more memory nowadays than gcc -O3.)


> it uses up 3-5% CPU while doing nothing

This is meaningless without context, as editors typically run indexing processes in the background. I used to use $beloved_native_editor, which in some cases ran at 100% single-thread for extended amounts of time (due to indexing).

> It takes an age to load. It uses heaps of RAM with no projects open [...] I have never seen a single use of it where it doesn't use an extraordinary amount of RAM

I've taken some real-world measurements, with the disclaimer there is no universal interpretation of measuring memory:

  >  Private  +   Shared  =  RAM used
  >
  >   8.9 MiB +   9.1 MiB =  18.0 MiB
  >  17.0 MiB +  17.3 MiB =  34.3 MiB
  > 119.2 MiB + 149.4 MiB = 268.6 MiB
  > ---------------------------------
  >                         321.0 MiB
  > =================================


  >  Private  +   Shared  =  RAM used
  >
  > 332.1 MiB + 519.2 MiB = 851.3 MiB
  > ---------------------------------
  >                         851.3 MiB
  > =================================


  >  Private  +   Shared  =  RAM used
  >
  > 124.0 KiB + 176.0 KiB = 300.0 KiB
  >   1.1 MiB +   1.1 MiB =   2.1 MiB
  >  95.5 MiB + 200.2 MiB = 295.6 MiB
  >   1.3 GiB +   1.3 GiB =   2.5 GiB
  > ---------------------------------
  >                           2.8 GiB
  > =================================
Startup times (approximate), before being able to type: 0.3", 1.2", 4.7".

The editors are vanilla installations, and I've opened the directory of a relatively large project. The machine is a modern desktop one.

The editor that people love to hate is not the one you'd expect.


> 5 MB was never a realistic estimate of process RAM.

They probably meant "Firefox Setup 1.0.exe" was 5 MB.


> Memory on application servers is severely underutilized

That's highly dependent on your choice of language and how you're running your app.


> The memory needed to efficiently compile an application isn’t the same as the memory needed to run it.

This is becoming more and more false. See Firefox for example.


> The problem here is Chrome.

Chrome 55 (due to be released on 6th December) is meant to use upto 50% less RAM [1].

[1] https://chromeunboxed.com/chrome-update-significantly-reduce...


>>note taking or chat apps need several hundreds of megabytes of RAM to run.

I have a fairly big app and while I'm not sure how to measure that I ran "about:memory" in Firefox and added up everything I saw for the app and it came out to be about 30mb.

My Mac's Finder says the directory with all the code is 9.9 MB.

That app is plenty fast, even on my old late `09 Mac Mini Mac running 10.11.6 with just 4gb ram.


> ...surely this memory consumption is broadly pretty reasonable? A few hundred MB?

No.


> having no ZRAM

Windows 10 has had memory compression [1] for quite a while now. On the PC I am on at the moment with 100+ Chrome tabs open, I have 1.3GB compressed out of a total of 16GB.

[1] http://www.thewindowsclub.com/memory-compression-in-windows-...


> It is in the best interest of everyone to make applications use less memory, since all the applications (and the OS) have to share what the system has.

There is always a trade-off between speed and memory usage. For my use cases, I prefer this particular trade-off for a browser. I realize you might not have the same preference.


> About 1GB of memory is required to run the phone with its default scopes and settings, leaving us about 2GB of space for applications and other features.

I did not see this coming. I was under the impression that moving away from a JVM would have lowered the memory requirements.

A comparison of the two versions of Meizu Pro 5, Android and Ubuntu, would have been useful too. I am curious if the move away from the Android architecture has changed the responsiveness of apps, or affected battery life.


> I might be missing something but I actually couldn't reproduce.

Someone in the GitHub comments had the same experience when using a 10GB VM to limit memory usage.

It appears the claims of memory reduction were premature. Perhaps an artifact of how memory usage is being reported by some tools.


> IDEs such as IntelliJ can easily consume 8GB of memory

Sound more like a Jetbrain ( IntelliJ company ) problem. Used to develop on PHPstorm ( another Jetbrain ) product ( same software in the background ) and the slow startup's, 2GB+ memory eating for relative small projects, crashes way too much, expensive as hell for what it does ( especially with the license change years ago ) ...

Eventually switched to Visual Studio Code and while people whine how Electron is memory inefficient, its like 1/6 the memory usage of PHPstorm, with only a few features missing.

Even on a 32GB PC system, i barely use 16GB ( and WSL2 is eating up a lot with a lot of docker images. And its not really docker, just Linux cache eating up memory ). Not a issue on a Mac that does not need a VM like layer.

Its about priorities sometimes. If people keep upgrading their memory, developers/companies simply push the responsibility to the clients and do not bother with spending time on optimizing.

If people start leaving software product on the way side for being just horrible inefficient messes, then maybe a bit of focus will come back to actually optimizing products! You will see Jetbrain change tune, when VSC etc keep eating its market share.


> able to improve the java perf by 35%

How much more memory did you use?

> i didn't bother running it

https://salsa.debian.org/benchmarksgame-team/benchmarksgame/...


> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less).

What does 120% less memory usage mean, really?

next

Legal | privacy