News for hackers. Stuff that matters.
Re:Show HN: Save Memory in Google Chrome by SomeCallMeTim on Monday March 11, 2013 @12:31PM (#5357788)
I have 8gb. There was a time when 1gb was more than enough. Now you're saying I should have 16gb -- and you're right!

This is Not A Good Thing. This is people throwing every last feature -- even if it has a pile of 800kb of DLLs/SOs attached -- into every app, with no regard for memory.

I find my system thrashing almost daily at this point. I need to upgrade. Two years ago, running predominantly the same software, 4Gb was just barely not enough, and I upgraded to 8Gb. And two years before that, cut the memory requirements in half again. And again, and again, until you get back to the 1Mb of RAM I had in 1990.

There has been a trend to do exactly what you say you want for 30+ years. And you know, some of that extra memory has been used to great effect -- we can do a ton more now than we could in 1990. But a lot of it is wasted, just Because It's Easy.

And that wasted RAM means pointless upgrades every two years; 99% of the bloat at this point is for something I don't need or want. The ONLY valid reasons to need 16Gb+ are if you're actually using that much data in one place -- a server that needs to scale, for instance, or editing video, or maybe a game that uses crazy amounts of data and/or video.

That the same apps are bloating 2x every two years -- and as a result get slower, since hard drive and memory speeds certainly aren't doubling every two years -- is really unacceptable laziness on the parts of companies and developers in general. It's pretty much the opposite of a Good Thing.

Re:Show HN: Save Memory in Google Chrome by jdietrich on Monday March 11, 2013 @04:05PM (#5359250)
Python and Ruby are on average about 40x slower than C. Fifteen years ago, this relegated them to the status of "scripting languages" that were unsuitable for Real Work. Today, there are still plenty of important applications where every clock cycle matters, but many more where that performance difference is absolutely irrelevant.

We have come to understand that developer time is vastly more valuable than computing resources in the overwhelming majority of applications - the only real disagreement is how many orders of magnitude of inefficiency we consider tolerable. Even the most resource-constrained applications are using higher-level languages and computationally inefficient designs, because it's much easier to spec a faster chip than a smarter dev team.

Most applications aren't getting significantly slower. Web browsers are a perfect example of this; Almost every aspect of their performance has improved vastly over the past few years, but as a result we're building much more sophisticated web apps and doing things in the browser that were once purely the domain of highly optimised native apps. It's a near-perfect example of Jevons Paradox. Improving the efficiency of a process reduces the cost of the output, which leads to increased demand for the inputs to that process.

My current computer has 700,000x more RAM than my first computer. If 99% of that memory is wasted, I'm still doing pretty well.

Re:Show HN: Save Memory in Google Chrome by SomeCallMeTim on Tuesday March 12, 2013 @09:31PM (#5366225)
Funny that you should post this, and the next day on the front page of Hacker News an article talking about Ruby taking 30 servers, each of which running at 50% CPU utilization -- and still Rails would go to 100% utilization and crash the cluster when usage spiked -- while Go could run on a single server without even seemingly using CPU (5% was typical). [1] That's greater than a 40x speed improvement -- closer to 300x, going from 5% on one to 50% on 30.

>We have come to understand that developer time is vastly more valuable than computing resources

I get that, but still, 30 servers is pretty expensive. Having a full time engineer just to manage the cluster and write load balancing code is pretty expensive. Having down time because of a usage spike is pretty expensive. I'd rather pay for the smarter dev team myself, but I'm an engineer, so I'm biased.

Though fundamentally I wasn't talking about servers above. I was talking about desktops, and mostly Windows desktops. And having to install Python because that's what one developer prefers, and .NET because of another preference, and Perl because of a third, and Ruby because of a fourth, and Java because of a fifth...where does it end?

My own "scripting language" of choice is Lua. It's TINY, it's faster than all of the above (except, under some circumstances, Java -- but give Mike Pall another year or two and I bet LuaJIT will be beating Java in all the benchmarks instead of just many of them), and using it gives developers that productivity boost you're rightly saying is important.

And if you need more speed than Lua can give you, Go is a good option, if it comes to that. But as you point out, not every app needs every cycle.

[1] http://blog.iron.io/2013/03/how-we-went-from-30-servers-to-2...

Re:Show HN: Save Memory in Google Chrome by Dylan16807 on Tuesday March 12, 2013 @12:21AM (#5360137)
Except when you're wasting that much ram you don't have room for modern high-resolution bitmaps. Binaries and GUIs and whatnot can afford to be bloated, but not everything.
Re:Show HN: Save Memory in Google Chrome by tomkarlo on Monday March 11, 2013 @01:02PM (#5358027)
8GB of RAM is about $50 right now. If you have to replace that every $2 years, are you really complaining about the cost of $25 per year on your $1,000 computer system? It's a rounding error.

Chrome, in particular, is generally be used for far more tabs (I have like 30 open right now on a MacBook Air) and increasingly complex web sites every year. It's easy to look at memory usage and complain, but the fact is that our usage and the size of the pages we're loading is also rising rapidly. If you loaded Chrome from two years ago and used it how you work today, you might not find the memory footprint that much better than the current version.

Re:Show HN: Save Memory in Google Chrome by learc83 on Monday March 11, 2013 @01:16PM (#5358132)
>If you have to replace that every $2 years, are you really complaining about the cost of $25 per year on your $1,000 computer system?

That's assuming you're using a computer with user upgradeable RAM, and not a new macbook pro.

Re:Show HN: Save Memory in Google Chrome by codemac on Monday March 11, 2013 @02:01PM (#5358503)
This is where the physical waste really gets bad to me. I'm not weighing in on this discussion as far as more RAM vs better binaries because /I want both/.

But if you have to buy a whole new machine every two years when they only pieces of hardware that are getting better should be upgradeable (ram & display) it's pretty disheartening.

Re:Show HN: Save Memory in Google Chrome by tomkarlo on Monday March 11, 2013 @02:11PM (#5358573)
Even if you don't have replaceable RAM, you're still replacing your computer at some regular interval. It just means you have to buy the computer with more RAM than you would if it wasn't upgradeable (which was true anyway.) That's part of the cost of buying a computer where you can't upgrade the RAM.
Re:Show HN: Save Memory in Google Chrome by jjore on Monday March 11, 2013 @02:25PM (#5358665)
If it's not upgradeable then it's disposable. Get the new one next time.
Re:Show HN: Save Memory in Google Chrome by sneak on Monday March 11, 2013 @11:40PM (#5359981)
You say that as if MBPs have no resale value.

The ram upgrade procedure for the new MBPs is backup, Craigslist, Apple Store, restore.

Re:Show HN: Save Memory in Google Chrome by idupree on Monday March 11, 2013 @02:20PM (#5358635)
I'd love to be able to upgrade my laptop RAM like that. Laptop CPU and motherboard manufacturers are still quite stingy about the maximum RAM they support. This limit is the only reason I had to buy a new laptop last year, and why I will likely need to buy another one in a few more years. A laptop sold today should support up to 2x64GB DDR3 RAM[1], but typical Ivy Bridge laptops only go up to 2x16GB, and a year ago it was max 2x4GB or for higher-end 2x8GB. The laptop I replaced had max total 3.2GB (you could put in 2x2GB DDR2 but the system would only see about 3.2GB, so I stuck to 2GB+1GB). Its 2007 Core 2 Duo is still blazingly fast, and its disk was easy to upgrade to an SSD.

[1] One can't easily buy a 64GB DIMM today, but Moore's Law is swift and mighty.

Re:Show HN: Save Memory in Google Chrome by columbo on Monday March 11, 2013 @01:16PM (#5358133)
It's not about the money, it's about the complete disregard of quality. The applications we create should only use the resources they need.
Re:Show HN: Save Memory in Google Chrome by sp332 on Monday March 11, 2013 @01:38PM (#5358311)
If hogging lots of RAM makes my program legitimately run better, then that's what it should do! Chrome runs a process per domain (or something like that) for security and stability reasons. That adds a lot of overhead for lots of tabs. But that's OK because there's actually a reason for using all that RAM.
Re:Show HN: Save Memory in Google Chrome by SomeCallMeTim on Monday March 11, 2013 @01:58PM (#5358477)
>If hogging lots of RAM makes my program legitimately run better

It objectively doesn't make your program run better to waste RAM.

If RAM usage goes up 2x every two years but RAM and hard drive speed go up 20% in the same time period, then using more RAM when you don't need it is making programs more sluggish to start and to suspend to disk, and it's making computers draw more power while sleeping (to keep that much RAM alive -- the D in DRAM means every bit in the RAM needs to be refreshed continuously).

Re:Show HN: Save Memory in Google Chrome by Resident_Geek on Monday March 11, 2013 @11:37PM (#5359967)
Objectively? That's a dangerous word; I hope you've got a better argument than this one. Hard drives are being rapidly replaced by SSDs, so their speed just jumped _way_ up (especially start-up and random access times, which affect sleeping and waking performance). 2 or 3 orders of magnitude, not 20%.
Re:Show HN: Save Memory in Google Chrome by SomeCallMeTim on Tuesday March 12, 2013 @09:38PM (#5366256)
SSDs are great. But I have exactly one hard drive bay in my laptop, and it currently holds >580Gb of data. Some of that is bloat, but MOST of it is real data; I have lots of raw video, source art for games, music, and many folders of compiled object files. I'm a game developer, so I use a lot of hard drive.

From what I've read, an SSD has an expected life of about 1-2 years. Aside from not being able to afford $2500 JUST for an SSD to hold my data [1], I can't fathom paying that much every 1-2 years as the drives die. Not to mention downtime and potential lost data (between the back-up and the failure).

I'd love to have an SSD. In a year or two, I probably will, as the costs will likely drop.

But until then, yes, the performance has objectively dropped.

[1] http://www.amazon.com/OCZ-Technology-2-5-Inch-Performance-OC...

Re:Show HN: Save Memory in Google Chrome by derleth on Monday March 11, 2013 @08:35PM (#5359385)
> the complete disregard of quality

Quality is measured on multiple axes. RAM use is only one of them. CPU use is another, for example, and it's often the case that reducing CPU use requires increasing RAM use.

Re:Show HN: Save Memory in Google Chrome by Joeri on Monday March 11, 2013 @02:24PM (#5358661)
Total page size as measured by the http archive project is currently growing 20% per year on average. Any benefit to be had by chrome's speed-ups is lost many times over by web designers bloating their pages. The web is becoming slower to use.

http://httparchive.org/trends.php?s=All&minlabel=Mar+15+...

And yes, that's pure raw bloat. Sites haven't gotten richer content the past 2 years, they've just put on some weight.

Re:Show HN: Save Memory in Google Chrome by ruv on Monday March 11, 2013 @02:54PM (#5358859)
What are you guys talking about? My main machine has 1.25GB of RAM and is 10 years old.

Sure I don't use it for modern gaming and sure I've delegated tasks to much stronger uni machines a few times in the past but other than the occasional hw problems due to age it still works and is mostly enough...

Re:Show HN: Save Memory in Google Chrome by robotresearcher on Monday March 11, 2013 @12:49PM (#5357928)
| a pile of 800kb of DLLs/SOs attached

Shared Objects are not too bad, since they are shared between all processes that use (the same version of) them. In fact, the apparently worst case of linking them "into every app" is only slightly worse than having them appear in one app each. Assuming they are not all in the working set of every app at once, the overhead is small. Great OS technology!

I think the main technical problem with code/feature bloat is the increased likelihood of bugs with every additional line of code.

Re:Show HN: Save Memory in Google Chrome by SomeCallMeTim on Monday March 11, 2013 @02:11PM (#5358571)
The problem isn't when everyone is using the same .so/.dll. THAT would be a dream by comparison.

The problem is that one app wants the Mono/.NET runtime, another wants Python, another is using Java, another is using a huge pile of Visual Basic libraries...and then every app ECOSYSTEM has its own pile of dependencies and libraries. And on Windows, to avoid DLL-hell, everyone pretty much ships their own version of libraries to ensure compatibility (and if you're on Mac, the story is pretty much the same there -- apps don't share anything but OS services -- it's only on Linux where you can rebuild everything that people dare share versions, and even then another commenter just pointed out there are bugs with that too).

Java/Eclipse is probably my current worst offender, and Firefox is still greedy (though it's gotten better -- and Chrome is just completely broken on my system right now for whatever reason). Both are actually worse than the (bloated) Visual Studio that I need to run to develop Windows apps. And then of course there's Firefox (which has gotten better) and other various apps I'm running just to do basic development.

Eclipse makes Visual Studio look lean by comparison -- but if I want to develop for Android, I have to work a lot harder to get an alternate environment ALMOST working as well as they've got Eclipse configured to work.

Sounds like you're on Linux or Mac, and not doing as much GUI development as I choose to do. Looking right now Eclipse (the GUI from hell) alone is using 608Mb of memory. I know it has a lot of useful features, but 608Mb is a crazy amount of memory to use for a fancy text editor.

I'm also using Notepad++ with tons of plug-ins, and it takes up <10Mb. Eclipse does more, but really, does it do THAT much more?

And SKYPE is taking 90Mb to sit idle. I use Skype to chat with business clients, so I can't easily just toss it, despite that Pidgin is using 21Mb to connect to 4 different chat networks simultaneously and Skype only connects to one...

The list goes on. And I need to upgrade to 16Gb soon (though looking at the memory usage right now, shortly after a reboot, I'm "only" at 4.1Gb, so it's not critical yet). Sigh.

Re:Show HN: Save Memory in Google Chrome by bd_at_rivenhill on Monday March 11, 2013 @01:01PM (#5358023)
Actually, I encounter the problem of mismatched .so versions constantly when running new programs or libraries that are built from source. It would be nice if developers would figure out how to use libtool (and whatever the Windows equivalent is) so that this doesn't become a regular exercise in frustration.
Re:Show HN: Save Memory in Google Chrome by gcr on Saturday March 16, 2013 @03:08PM (#5386385)
This is precisely the motivation behind the renaissance of the "simple / command-line-driven software movement" that you see sprouting up from the corners of the Arch Linux users, Slackware, and elsewhere.

I used to carry around a laptop with 128MB RAM. In 2010-2012, I had 1GB and was happy with it, but I had to adapt:

- Try a tiling window manager. You'd be surprised how many resources it takes to draw those window decorations, which not only saves RAM but also helps you focus better.

- Try a lightweight browser like LuaKit, dwm, surf, etc. Most of them are Webkit-based anyway, so there's not many problems. Plus, a keyboard-driven web browser is a hoot

- Try using emacs/vim instead of Word or OpenOffice. Thanks to LaTeX, I haven't touched a huge office suite in ages.

- Instead of having lots of programs open in the background, why not try some command-line equivalents? If you're not on windows, you have access to a world of utilities: music players, todo lists, file managers, etc.

Now I'm on an 8GB machine, and even under heavy load, I don't think I've ever come close to reaching that limit in the six months I've owned this box. (I don't have any swap space either)

Re:Show HN: Save Memory in Google Chrome by ibrahima on Monday March 11, 2013 @02:34PM (#5358725)
This specific case is not bloat at all though, it's actually you as a user having too much content that you care about. So I don't see why this is relevant at all.
Re:Show HN: Save Memory in Google Chrome by Dylan16807 on Monday March 11, 2013 @02:45PM (#5358798)
It's not 'boat' per se but it's not caused by the user content. It's caused by chrome's process model. Firefox uses almost an order of magnitude less memory per tab.
Re:Show HN: Save Memory in Google Chrome by ubercow13 on Monday March 11, 2013 @03:01PM (#5358899)
It's always had that process model though.