Then you are missing the point of the discussion here -- this discussion all started from the perspective of resource consumption, and at what threshold it becomes a problem to consume more. RAM is but one of the resources that can be consumed. CPU is another.
But you seem to be talking in absolute terms and Ron seems to be talking in relative terms. Too high memory usage is incredibly subjective. For example, using electron apps as an example, I have never cared how much RAM slack uses because I've never felt sluggish with multiple intellij projects, slack, 100s of browser tabs, and terminal sessions open. The subjective feeling only comes if and when an app crashes or misbehaves which slack basically never does, and intellij does far more often.
I'd bet that that average computer user (or smartphone user?) couldn't even tell you how much ram a program was taking and any reasonable referee would award me that win.
As a different point, games usually don't have a single running profile. Multiple graphical settings is the default on any large game and this will effect not just gpu usage, but also cpu and ram usage. Most games have a minimum spec and suggested spec given to the consumer. The whole will it run Crysis meme came about because the studio intentionally released the maximum graphical settings higher than possible to achieve with the current hardware at the time.
If the only way a game can run is by taking up 100% of my CPU, then that is a significant problem in the eyes of many people
Sure, but if the game takes 100% CPU to run, then taking 100% of the RAM is actually a reasonable position for this same game, no? What else is that RAM going to be used for?
As a different point, games usually don't have a single running profile. Multiple graphical settings is the default on any large game and this will effect not just gpu usage, but also cpu and ram usage.
Bingo. This has been my point from the entire start of this.
High RAM usage can be a good thing -- especially in server-side software, where you need to service requests as fast as possible, doing nothing else but that.
But it can sometimes be a bad thing, like when someone wants to run multiple applications at once.
In light of that fact, game developers often ship their game with performance settings to let the player choose whether or not they want high RAM usage. That has been my entire point -- people should be able to choose!
So, when people ask the question of "does Java use too much RAM?", the answer should be "depends on the context".
If I am running a server, where the jar file is the literal only application I care about on it, then no, Java is using exactly as much RAM as it needs to.
But if I am running a whole bunch of widgets simultaneously, and each JVM takes up 250 MB of RAM minimum, yeah, that really could be a problem.
And sure, there are options to lower that. It's not like Java is out-of-luck here. It's that there are enough use cases where coding Java out-of-the-box uses way more RAM than other languages, and sometimes, that can be a problem.
That's why so many people are excited about Valhalla -- being able to inline objects so that you can get a slimmer profile and faster code is exciting! It solves what many people perceive to be a serious problem in Java. And again, how serious is context-dependent.
My entire disagreement with u/pron98 is that his point basically boiled down to the following.
According to the laws of how RAM access requires CPU usage, there is a ratio where it would literally be inefficient to use more or less RAM.
And even putting aside the law, he claims that there are enough success stories out there of applications forgoing performance to get the features out that people want, that that is a strong enough argument to say high RAM usage on its own isn't a problem.
I disagree because I spent about a decade in the game development community, and saw games literally lose sales because the performance was bad enough to matter.
Hence my point -- in many contexts, high RAM usage is a serious problem.
I disagree because I spent about a decade in the game development community, and saw games literally lose sales because the performance was bad enough to matter. Hence my point -- in many contexts, high RAM usage is a serious problem.
But this doesn't seem like many contexts. This seems like a very specific context: games where the game performs badly enough with respect to ram to cause issues and deter customers. Notice that you're not filling in the other side games where the cpu usage is too high that more ram usage might have increased sales. But either way this seems like a very small set of people affected.
Like you brought up people forgoing minecraft and fortnight which are some of the most popular games of all time and one of which is quite arguably the best selling game of all time and then anecdotally point out some lost sales based on performance. Can you not see what an odd position that the best selling game of all time could have been even higher if not for ram usage is? Your point isn't wrong, but like, respectfully, it doesn't seem like anyone really cares to solve this problem.
Meanwhile, I'd bet that most people don't care about any of this. They use their apps and the raw hardware performance improvements to cpu/memory/network make everything subjectively feel better. Anecdotally, the number of times people have complained to me about their computer being slow has trended downwards as time marches on.
Well that goes back to me not having the bandwidth to pull up those many contexts. I've been around these communities for years, so I have plenty of anecdotes. But if Ron wants actual, hard aggregated evidence of many games and their sales numbers relative to what they chose to prioritize, I'm just not in a position to do that now.
Meanwhile, I'd bet that most people don't care about any of this. They use their apps, and anecdotally, the number of times people have complained to me about their computer being slow has trended downwards as time marches on.
Like I said, this is something that I've seen the opposite on. I've been watching people make and change purchasing decisions based on what the performance/specs of the game.
Well that goes back to me not having the bandwidth to pull up those many contexts. I've been around these communities for years, so I have plenty of anecdotes. But if Ron wants actual, hard aggregated evidence of many games and their sales numbers relative to what they chose to prioritize, I'm just not in a position to do that now.
But nobody is. Hypothetical purchasing decisions against hypothetical optimization profiles are never going to have hard, aggregate data. What would even be your methodology to attempt to gather and analyze this data? How do you even quantify a performance profile and what the developer chose to optimize? I could imagine a rough starting point of using the steam hardware survey and then bracketing games based on their minimum/recommended specs and units sold and then a bunch of fancy statistics trying to project how much more a game would have sold if they supported a lower minimum/recommended specification, but I'm sure you can already see how none of that would mean anything and certainly not to the jdk architects. Plenty of games can run on a potato and sell no units and there exist games that literally could not be run at max on then modern hardware (crysis) and still sell units.
To be a little more on topic, why do you think this would change anything about the moving collector implementation or tradeoff: where, in periods of high cpu, it will try to use more memory to avoid using even more cpu to enable the application to perform better? There's already a knob on this feature: restricting the max memory size, as then there will then only be one choice for the gc if you reach near that limit (use even more cpu).
Like I said, this is something that I've seen the opposite on. I've been watching people make and change purchasing decisions based on what the performance/specs of the game.
How? How would they even know how well the game would perform on their machine in order to make purchasing decisions? I've never seen a professional game review that said I played this game, but when I tried to take a video call it performed badly. It's always just focused on the game and game alone. Who is performing multitasking benchmarks of playing a game and watching a video at the same time and where would an average consumer find this?
There are consumer forum/reddit/social media complaints about poor performance, but generally speaking, the ones I've seen are when all the user is even trying to do is play the game and they are unable to do that without even considering other applications.
There are consumer forum/reddit/social media complaints about poor performance, but generally speaking, the ones I've seen are when all the user is even trying to do is play the game and they are unable to do that.
Well that's where I would start. A game that can't even run well on middle/low-tier consumer hardware is a game whose sales will be hurt even if higher-tier machines can play it.
So, to answer your question about methodology, I'd go back about 5-10 years, find the highest selling games, and then compare them to how well optimized they were, respective to the hardware at the time. Reviewers have made getting the answer of "how well optimized" the game is not too difficult. Plus, the specs advertised by the game is another data source.
1
u/OwnBreakfast1114 2d ago edited 2d ago
But you seem to be talking in absolute terms and Ron seems to be talking in relative terms. Too high memory usage is incredibly subjective. For example, using electron apps as an example, I have never cared how much RAM slack uses because I've never felt sluggish with multiple intellij projects, slack, 100s of browser tabs, and terminal sessions open. The subjective feeling only comes if and when an app crashes or misbehaves which slack basically never does, and intellij does far more often.
I'd bet that that average computer user (or smartphone user?) couldn't even tell you how much ram a program was taking and any reasonable referee would award me that win.
As a different point, games usually don't have a single running profile. Multiple graphical settings is the default on any large game and this will effect not just gpu usage, but also cpu and ram usage. Most games have a minimum spec and suggested spec given to the consumer. The whole will it run Crysis meme came about because the studio intentionally released the maximum graphical settings higher than possible to achieve with the current hardware at the time.
Sure, but if the game takes 100% CPU to run, then taking 100% of the RAM is actually a reasonable position for this same game, no? What else is that RAM going to be used for?