Slashdot Mirror


Android ICS Will Require 16GB RAM To Compile

ozmanjusri writes "New smartphones may be lightweight, compact objects, but their OSs are anything but. Ice Cream Sandwich will need workstations with no less than 16 GB RAM to build the source code, twice the amount Gingerbread needed. It will take 5 hours to compile on a dual quad-core 2+GHz workstation, and need 80GB disk space for all AOSP configs. Android developers are also being warned to be cautious of undocumented APIs: 'In almost every case, there's only one reason for leaving APIs undocumented: We're not sure that what we have now is the best solution, and we think we might have to improve it, and we're not prepared to make those commitments to testing and preservation. We're not claiming that they're "Private" or "Secret" — How could they be, when anyone in the world can discover them? We're also not claiming they're forbidden: If you use them, your code will compile and probably run.'"

357 comments

  1. Of Course. by Frosty+Piss · · Score: 4, Funny

    Nobody will ever need more than 16GB...

    --
    If you want news from today, you have to come back tomorrow.
    1. Re:Of Course. by hedwards · · Score: 1

      16GB is an awful lot of RAM, I'm really curious as to what it is that they're doing that's going to require more RAM than most of these devices have in total storage space.

      I get that optimizations take memory and that there are likely independent steps, but still 16GB of RAM?

    2. Re:Of Course. by lolcutusofbong · · Score: 3, Informative

      probably using the -pipe CFLAG.

    3. Re:Of Course. by iluvcapra · · Score: 1

      16GB is an awful lot of RAM, I'm really curious as to what it is that they're doing that's going to require more RAM than most of these devices have in total storage space.

      These are the hardware requirements to compile the complete AOSP Android system and platform, and not the requirements to merely develop an application on it.

      --
      Don't blame me, I voted for Baltar.
    4. Re:Of Course. by vanDrunen · · Score: 0

      16GB is nothing, just playing with large amounts of TNT in Minecraft requires this. An average server has 32+ GB when hosting some decent VM's. Windows Server with Exchange will eat up 16GB in no time as well.

    5. Re:Of Course. by fuzzyfuzzyfungus · · Score: 4, Interesting

      I have to wonder if the 16GB "requirement" is more of a recommendation and/or a bunch of default settings that deliberately avoid the disk as much as possible, and keep as many cores as you can throw at the job busy by compiling every little bit and piece in parallel...

      On the one hand, with 16GB of RAM in the desktop/light workstation 4x4GB only running around $100(with the more workstation-friendly 2x8GB with ECC only twice that), it seems rather pointless to burn any developer time on trying to optimize the RAM needs of building the entire OS. RAM is cheap.

      On the other hand, I have to wonder what they could possibly be doing to the process of compiling what is basically a weird-but-not-unrecognizable linux distro to make it that RAM hungry.

    6. Re:Of Course. by OeLeWaPpErKe · · Score: 1

      It's probably the amount of RAM required to have every line of source code + one device image file + gcc + java + linker + ... all in ram at the same time.

      It'll probably compile on 640k of ram. It just won't be finished by Christmas.

    7. Re:Of Course. by mjwx · · Score: 5, Interesting

      I have to wonder if the 16GB "requirement" is more of a recommendation and/or a bunch of default settings that deliberately avoid the disk as much as possible

      I have to wonder if the 16 GB requirement is real.

      Reading the blog linked to in the summary, there is no source mentioned. The author completely fails to mention how they came across this information. Even ignoring their bad English (obviously not their first language).

      I think I'll wait for a more trustworthy source to confirm or deny this.

      --
      Calling someone a "hater" only means you can not rationally rebut their argument.
    8. Re:Of Course. by a_n_d_e_r_s · · Score: 2

      Looking at the article; the 16GB is because they compile the code in parallell so need lots of memory. They get the 5 hours of build time down to 25 min.

      --
      Just saying it like it are.
    9. Re:Of Course. by SomePgmr · · Score: 1

      Indeed, and google searches only return results to that blog post with no sources, slashdot and slashdot-reposts. It's like wikipedia-style circular references.

    10. Re:Of Course. by DigiShaman · · Score: 0

      It will take 5 hours to compile on a dual quad-core 2+GHz workstation

      To me, that sounds like it takes 5 hours after compiling the code in parallel. So if it was a single threaded compilation job, in theory, the task would take much much longer.

      --
      Life is not for the lazy.
    11. Re:Of Course. by kidgenius · · Score: 3, Informative
    12. Re:Of Course. by PopeRatzo · · Score: 5, Informative

      And if you read that original source, you'll see that they are recommendations for building future development machines:

      -6GB of download.
      -25GB disk space to do a single build.
      -80GB disk space to build all AOSP configs at the same time.
      -16GB RAM recommended, more preferred, anything less will measurably
      benefit from using an SSD.
      -5+ hours of CPU time for a single build, 25+ minutes of wall time, as
      measured on my workstation (dual-E5620 i.e. 2x quad-core 2.4GHz HT,
      with 24GB of RAM, no SSD),

      --
      You are welcome on my lawn.
    13. Re:Of Course. by Anonymous Coward · · Score: 0

      Agreed that it's not real (as mentioned elsewhere in these comments). The stated 8GB requirement for Gingerbread is also wrong. I build that on a VM allocated just 2GB of my system's 4GB of RAM.

    14. Re:Of Course. by evilviper · · Score: 5, Informative

      To me, that sounds like it takes 5 hours after compiling the code in parallel. So if it was a single threaded compilation job, in theory, the task would take much much longer.

      Yes, it does SOUND that way... It's very "truthy" that way...

      Relying on /. summaries just makes you look like an idiot, when you're just one quick and easy click away from the source. Surely, if you cant be bothered to put that much effort in, then you must not have enough time to write-up a response, either...

      Verbatim quote from TFA:
          "5+ hours of CPU time for a single build, 25+ minutes of wall time"

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    15. Re:Of Course. by chrb · · Score: 1

      Looking at those specs, maybe it's about time to think about switching Android to a modular architecture. There is no reason why the complete build needs to be made in one go. It's like running Gentoo and compiling the entire system from source when you really just want to upgrade an application. Or like the old OpenOffice days, when they bundled everything, so compiling it required compiling every library that it depended on, plus compiling Python and everything else that was embedded. Building/distributing a whole new system image and whacking it over a partition seems crazy in this day and age. What Android needs is something like .deb packaging and a proper package repository, honestly I'm surprised the Cyanogen guys haven't done it yet, it would make their job of getting rapid and incremental updates out much easier.

    16. Re:Of Course. by citizenr · · Score: 1

      16GB is an awful lot of RAM, I'm really curious as to what it is that they're doing that's going to require more RAM than most of these devices have in total storage space.

      I get that optimizations take memory and that there are likely independent steps, but still 16GB of RAM?

      Im guessing they are running compiler in ARM virtual machine, compiler is of course written in JAVA.

      --
      Who logs in to gdm? Not I, said the duck.
    17. Re:Of Course. by chrb · · Score: 2

      If I remember correctly, you could build OpenOffice on Gentoo with -pipe and various other performance tuning flags, and the hardware requirement was only a minimum of 512MB. And every other package, including big stuff like the kernel and KDE, could be built with only 64MB... though 256MB was recommended.

      I would guess the default Android build is optimized for the Google Android team, and so speed is the most important factor; they probably use a build server with multiple processors and big memory and don't waste engineering time on optimizing for anything else. I would also guess that there probably aren't that many people outside of Google who build their own Android images.

    18. Re:Of Course. by Anonymous Coward · · Score: 0

      This is accurate, IMHO, from working with Honeycomb source.

    19. Re:Of Course. by wvmarle · · Score: 1

      I would also guess that there probably aren't that many people outside of Google who build their own Android images.

      And those that would, are most likely big companies that have a very good reason for wanting to do that, and also don't mind having to buy a bit more RAM. It's not that expensive these days anyway.

    20. Re:Of Course. by phantomfive · · Score: 1

      It is modular. Different packages can be built separately. (I haven't checked ICS, but the last release from the AOSP was modular).

      Although one caveat: figuring out the command-line to build the module you want may be beastly.

      --
      "First they came for the slanderers and i said nothing."
    21. Re:Of Course. by Daniel+Phillips · · Score: 1

      I'm really curious as to what it is that they're doing that's going to require more RAM than most of these devices have in total storage space.

      Being lame. Apparently, being a certified smart person does not necessarily imply understanding how to code efficiently, including not understanding how to code a build efficiently. An excellent example of how Google hobbles its development pace by its fear of embracing community developers.

      --
      Have you got your LWN subscription yet?
    22. Re:Of Course. by Daniel+Phillips · · Score: 1

      Just by way of illustration, there was one guy on my team at Google whose solution to a QA problem was to run the whole build under QEMU, increasing the latency of the build by two orders of magnitude. Turning it into an overnight process in fact. And this guy's approach had the full support of my manager, even being tech lead of the team I was not allowed to overrule that braindamage. No technical reason at all, just pure process of its own sake. This kind of mess is endemic at Google, including in some of the highest profile projects. Oh wait, we just saw that, didn't we?

      --
      Have you got your LWN subscription yet?
    23. Re:Of Course. by PopeRatzo · · Score: 1

      I'm not an Android developer, or any kind of developer. Why is "wall time" so different in this case from CPU time?

      Maybe I don't understand completely what "CPU time" really means. A little help here?

      --
      You are welcome on my lawn.
    24. Re:Of Course. by Anonymous Coward · · Score: 1

      "CPU time" is the time all CPUs/cores are actively running for the task, "wall time" is the time the process takes from start to finish. In this case, CPU time is much greater than the wall clock because the build process is apparently able to exploit a huge amount of parallelism on a powerful multi-CPU workstation. For most user tasks, CPU time will be a lot less than the wall clock time because CPU time does not include time waiting for IO or for a time slot for the process to execute.

    25. Re:Of Course. by PopeRatzo · · Score: 1

      In this case, CPU time is much greater than the wall clock because the build process is apparently able to exploit a huge amount of parallelism on a powerful multi-CPU workstation.

      Got it. Thanks.

      Even on an 8 core machine, that's pretty impressive, more than 10 to 1. (300 minutes/25 minutes)

      --
      You are welcome on my lawn.
    26. Re:Of Course. by bemymonkey · · Score: 1

      Sounds like the dude tested it himself and just checked how much RAM was in use during compilation... or something like that?

    27. Re:Of Course. by Daniel+Phillips · · Score: 1

      I would guess the default Android build is optimized for the Google Android team, and so speed is the most important factor

      Well, but the build speed sucks too. I feel comfortable stating that what we have here is a problem of too much suck.

      --
      Have you got your LWN subscription yet?
    28. Re:Of Course. by SnowZero · · Score: 1

      Just by way of illustration, there was one guy on my team at Google whose solution to a QA problem was to run the whole build under QEMU, increasing the latency of the build by two orders of magnitude. Turning it into an overnight process in fact. And this guy's approach had the full support of my manager, even being tech lead of the team I was not allowed to overrule that braindamage. No technical reason at all, just pure process of its own sake.

      So solving a QA problem is not a technical reason? Surely there is more to this story.

      This kind of mess is endemic at Google, including in some of the highest profile projects.

      This is an extrapolation based on your sample of one project before you left, which was unrelated to either of the three biggest codebases at the company. I think you've established your opinion that the larger group you were in was mismanaged; I think others agreed and there's been a bit a reboot there from what I have heard.

      On the projects I've worked on, some quite high profile, I haven't seen this at all. Yes it is a big company and there are company-wide changes and migrations that can be a PITA, but it is rare that there isn't a good reason for such actions. When there isn't a good reason, aggregate developer push-back usually forces a more reasonable plan.

      Of course, getting stuff done in such an environment requires tactful communication skills, but that ability varies among developers (as is visible on Slashdot, at Google, on LKML, or just about anywhere developers frequent).

      Oh wait, we just saw that, didn't we?

      What I saw was a platforms-guy railing about a product that was rushed for product reasons. I think he's entitled to his opinion, and as a backend-developer I certainly see where he is coming from. However I don't think he can put himself in product-development shoes very well, as there are times when you simply must launch (any good startup will know this). A successful product with bad code is an engineering problem, which engineers can fix. A beautiful design and codebase with no users is still dead. In the kernel world, you might compare Linux versus Hurd in this regard.

      Anyway, on the original topic, the build systems at Google are kinda different now, such that compilation time is never a problem. In particular for an early release, I can see why this has not been optimized (note that 16G is simply achieve 25 min parallel compile, and is not necessary if you wait longer on a less beefy machine). If build requirements are a big problem for the AOSP community that would a be a good place for a community member to help the rest of the community. With the run up to the release, along with things such as kernel.org going down, developers such as JBQ are pretty damned busy.

    29. Re:Of Course. by Daniel+Phillips · · Score: 1

      Im guessing they are running compiler in ARM virtual machine, compiler is of course written in JAVA.

      I would hope you're wrong, there is such a thing as a cross compiler. But truth to tell, I have seen Googlers do such things and not even get thrown immediately into the proverbial alligator pit.

      --
      Have you got your LWN subscription yet?
    30. Re:Of Course. by Anonymous Coward · · Score: 0

      E5620 has hyperthreading. So that's basically 8 cores + 8 virtual cores. And unlike P4 hyperthreading, the newer hyperthreading is quite efficient, giving up to 30% speed increase in 7zip, for example.

      So 10:1 for a complex task like compiling is expectable.

    31. Re:Of Course. by Daniel+Phillips · · Score: 1

      So solving a QA problem is not a technical reason? Surely there is more to this story.

      Obviously, there were other solutions to the problem not requiring running under QEMU, as you might expect.

      --
      Have you got your LWN subscription yet?
    32. Re:Of Course. by GauteL · · Score: 1

      "they are recommendations for building future development machines"

      In which case this makes perfect sense. There is an absolutely massive difference between recommending a spec for a developer machine and stating requirements for building the source.

      Given how cheap RAM is these days, there is no reason for a decent software company to give their developers machines with less than 16GB of RAM now, especially in order to fully utilise those multi-core workstations to run parallel builds. Any reduction in compilation time can be time spent debugging.

      This story just reads like flamebait to me.

    33. Re:Of Course. by Calos · · Score: 4, Informative

      Mmm, no. Third party modders do a lot of work, and make some really awesome builds, with all kinds of customizations and new features. Cyanogenmod, for instance. Quite the opposite of working for a large company with resources, their developer are now actually being hired by big companies because of their freelance work.

      --
      I vote based on politicians' actions, unless contrary to my preconceptions. Often wrong, never uncertain. #iamthe99%
    34. Re:Of Course. by TheRaven64 · · Score: 1

      -pipe just means that the compiler writes the assembly to the assembler's standard input (if you use a less archaic compiler, it will emit object code directly, not invoke an external assembler, but if you're stuck with gcc...). It won't use much more RAM, just enough to run the assembler on top of the amount required to run the compiler.

      More likely, they've turned on link-time optimisation. For big projects, this can use an insane amount of memory - the compiler basically has to load the intermediate representation of the entire program into memory at once and analyse it.

      Oh, and for C++ projects, the linker can take a lot more memory than the compiler.

      --
      I am TheRaven on Soylent News
    35. Re:Of Course. by dave420 · · Score: 0

      It's like the difference between the number of "man hours" a task takes to complete, and the actual time taken to complete. More CPUs = more men = less time the task takes.

    36. Re:Of Course. by quenda · · Score: 1

      Back in the day, you could recompile Linux in 4MB on a 386 in a few hours. Thats mega-, not giga-.
      Good thing, since building your own kernel was almost compulsory before kernel modules were invented.
      For Android to _require_ 4000X that seems a little bloated. I know it has a lot more than a kernel, but do all those parts really have to be compiled at the same time?

    37. Re:Of Course. by AmiMoJo · · Score: 1

      I imagine when they say "you need 16GB" they actually mean "you need 16GB or it will be very, very slow". Assuming you have a large enough virtual memory partition of course.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    38. Re:Of Course. by quenda · · Score: 1

      "5+ hours of CPU time for a single build, 25+ minutes of wall time"

      On a system with two quad-core CPUs, how can you get 300 minutes of core time in 25 of wall? Does not add up.

    39. Re:Of Course. by RCGodward · · Score: 2

      Hyperthreading. Best base is 25 * 16 = 400, so getting 300 doesn't seem so unlikely.

    40. Re:Of Course. by Kjella · · Score: 1

      Back in the day, you could recompile Linux in 4MB on a 386 in a few hours. (...) do all those parts really have to be compiled at the same time?

      No, if you're willing to wait 5 hours for a single-threaded compile (like you say, Android is way more than just Linux) then you can with far less memory. But if you're paying anything like a western salary then 16GB RAM and 25 minute (hint: much shorter than "a few hours") compile time is recommended.

      --
      Live today, because you never know what tomorrow brings
    41. Re:Of Course. by Anonymous Coward · · Score: 0

      Luckily we are not in Jobs' world where 64K is enough.

    42. Re:Of Course. by krenaud · · Score: 1

      RAM is cheap unless you have an Apple Macbook or iMac. (Apple have put a limit of 4 or 8GB depending on model). In that case you need to buy a completely new computer. (Preferably a Linux or Win-box that doesn't have arbitrary limits in order to push sales of Mac Pro)

    43. Re:Of Course. by Anonymous Coward · · Score: 0

      That makes a lot more sense, and the RAM limitations make sense, too. A dual quad-core can run 16 threads, and 1GB per thread is not unreasonable.

      I wonder how well it scales and what the limiting factor is. 5+ hours is closer to ~19 minutes divided between 16 cores, assuming perfect parallel, but they state 25+ minutes. That's over 6 hours of CPU time on a 16 core system, so there's over 25% of time spent on overhead or lost on idleness. What if we use 8-core CPUs and 32 GB of RAM? Are are we hitting bus or disk capacity? Or is it just a limitation based on other inherent factors, such as needing to finish compiling before linking occurs and the last module to compile leaves the CPU mostly idle.

    44. Re:Of Course. by eudaemon · · Score: 1

      My standard developer desktop is an HP 8540W with 16GB of memory. Laptops aren't known for speedy disk i/o so it would probably take 50-100% longer, but still, these sized machines in a corp environment aren't hard to find.

    45. Re:Of Course. by Anonymous Coward · · Score: 0

      Which indicates that it'll work with less, but be VERY painful instead of mostly so.

    46. Re:Of Course. by rsborg · · Score: 1

      I'm not an Android developer, or any kind of developer. Why is "wall time" so different in this case from CPU time?

      Maybe I don't understand completely what "CPU time" really means. A little help here?

      If you look at his cores (2x4C with HT) then you'll notice the OS sees 16 virtual cores. Dividing the 3hrs CPU time by 25 min wall time you get about a factor 12 (which means his 16 virtual cores had about a 75% usage over those 25min - quite solid). Unless I'm way off track, I think that's what he means.

      If you don't have 16GB RAM, having virtual memory on an SSD isn't too far a step down...

      --
      Make sure everyone's vote counts: Verified Voting
    47. Re:Of Course. by Anonymous Coward · · Score: 0

      16GB is an awful lot of RAM

      Maybe in sheer numbers it's an awful lot of RAM, but from a cost perspective, that much RAM is actually pretty cheap. (The last machine I built for my wife came in at $1200 and included dual GTX 460's in SLI mode, an i7, and 24GB of RAM - and the RAM was by far the cheapest component.)

    48. Re:Of Course. by canajin56 · · Score: 1

      Actually, that IS what they say. It's Slashdot that modified the quote to look bad. (They also changed 25 minutes into 5 hours).

      --
      ASCII stupid question, get a stupid ANSI
    49. Re:Of Course. by Anonymous Coward · · Score: 0

      16 GB is trivial. Half a dozen good, highly rated kits on newegg for 100$ USD or less, take your pick:

      http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100007611+600006073&QksAutoSuggestion=&ShowDeactivatedMark=False&Configurator=&IsNodeId=1&Subcategory=147&description=&hisInDesc=&Ntk=&CFG=&SpeTabStoreType=&AdvancedSearch=1&srchInDesc=

      Ram is dirt cheap right now. 4GB modules are the sweet spot, price wise. Pretty much the chipset/cpu and slot layout of your motherboard is the limiting factor today. If your system can handle 16, go for it.

    50. Re:Of Course. by Nemo's+Night+Sky · · Score: 1

      Also the Android-x86 team and thousands of xda-developers, as well as CyanogenMod. I'm sure somebody can tweak the makefile a bit to reduce this to 8 GiB. Otherwise a lot of homebrew developers will need to continue their experiments with gingerbread until they can upgrade their build machine. Perhaps distributed computing could help?

    51. Re:Of Course. by bored · · Score: 1

      In which case this makes perfect sense. There is an absolutely massive difference between recommending a spec for a developer machine and stating requirements for building the source.

      Furthermore, there isn't any reason to be building on the "developers" machine anyway. That is _SO_ Microsoft... I worked for a company 15 years ago that cured me of that. Ever since, I always recommend build machines. That way you spend a bunch of money getting a fast disk and a lot of CPU's put it in the closet and then the compile speeds don't factor into the decisions on the developers desktop. It also provides a place to have a standard set of libraries/etc in order to get repeatable builds. Takes a little getting used to, but it turns out that most people accept that not everyone can have a 64 thread machine with 128G of ram on their desktop, and once it becomes apparent that not everyone is building at the same time, the speed advantages are readily apparent. Buy a new one every year or so, and the developers machines last longer too.

    52. Re:Of Course. by mldi · · Score: 1

      After whining about my workstation having only 3.1GB of recognizable memory and my desire to have at least 8, I had a co-worker ask me why I needed more than 2GB of RAM. I asked him if he was really a developer. Yes, he was serious. Yes, my jaw was on the floor.

      --
      If you aren't suspicious of your government's actions, you aren't doing your job as a responsible citizen.
    53. Re:Of Course. by mldi · · Score: 1

      Then show me the donate button. Seriously, RAM is cheap. If you own a machine that only supports up to 8 however...

      --
      If you aren't suspicious of your government's actions, you aren't doing your job as a responsible citizen.
    54. Re:Of Course. by Meski · · Score: 1

      16 GB is pretty much a base config for programming workstations, hell, I even have that on my laptop.

    55. Re:Of Course. by Anonymous Coward · · Score: 0

      That's the way you attract attention

      16GB RAM recommended => "will require 16 GB RAM"
      5+ hours of CPU time for a single build, 25+ minutes of wall time => "It will take 5 hours to compile"

    56. Re:Of Course. by Calos · · Score: 1

      http://www.cyanogenmod.com/

      Bottom right-hand corner.

      --
      I vote based on politicians' actions, unless contrary to my preconceptions. Often wrong, never uncertain. #iamthe99%
    57. Re:Of Course. by fuzzyfuzzyfungus · · Score: 1

      Out of curiosity, are those insurmountable hardware differences, or some sort of EFI twiddling?

      I remember that, back in the day, ibooks could only do display mirroring on the video-out port, while powerbooks could do dual-display, until somebody had a poke at the firmware and came up with a teeny little tweak that restored the locked capabilities of the (otherwise pretty much identical) hardware.

    58. Re:Of Course. by Anonymous Coward · · Score: 0

      just like 640K is more memory than anyone will ever need on a computer?

      That is 64K you iNsensitive clod!

    59. Re:Of Course. by chrb · · Score: 1

      Most developers I know who are using laptops have switched to SSDs. Access times and bandwidth should be much the same as SSD on desktop.

    60. Re:Of Course. by krenaud · · Score: 1

      I haven't got a clue. However, I didn't seen any mentions of EFI-hacks when I googled before updating my MBP to 8GB.

  2. Moores law... by mulvane · · Score: 1

    Next Android will need 32GB.... Then 64GB... Soon, Skynet level of resources....

    1. Re:Moores law... by leuk_he · · Score: 1

      If the level of resources required get too high then that process will be optimized. But as other people point out, 16GB costs about $100, or 1-2 hours of developer time, it is much cheaper to put that money in hardware. In fact you will be supposed how often it easier to put money in hardware than it is to put into a costly developer who will not give any guarantee of a result.

      Optimizing the resulting ROM for mobile devices SHOULD be a priority since that will run on millions of devices. Since only a handful of people will run a full build of a OS that is not a target for optimization from business POV.

  3. Recommended, not required, right? by BeforeCoffee · · Score: 2

    16GB recommended, or else you'll be waiting quite awhile. But, you could build the thing in less RAM than that, right?

    1. Re:Recommended, not required, right? by XaXXon · · Score: 1

      Yes, it can always swap out. The compiler has no visibility into whether the memory space it is executing in is actually mapped to physical ram.

      But like other people said, it might take a really long time.

    2. Re:Recommended, not required, right? by Anonymous Coward · · Score: 0

      mkswap is your friend.

    3. Re:Recommended, not required, right? by dotancohen · · Score: 1

      16GB recommended, or else you'll be waiting quite awhile. But, you could build the thing in less RAM than that, right?

      From the original source:
      16GB RAM recommended, more preferred, anything less will measurably benefit from using an SSD.

      --
      It is dangerous to be right when the government is wrong.
    4. Re:Recommended, not required, right? by petermgreen · · Score: 1

      Also with many projects you can reduce the number of parallel builds invoked by make saving ram at the cost of not being able to exploit as much parallelism.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  4. Sure... by STratoHAKster · · Score: 1

    This is of course if you don't edit out that -j64 in Google's main Makefile.

  5. Well do you want by Osgeld · · Score: 1

    A pile of ram, or a pile of time as it thrashes your hard disk? Ram is cheaper than time.

    1. Re:Well do you want by tepples · · Score: 1

      Does compressing the swap file, as seen in Connectix RAM Doubler and compcache, help any?

    2. Re:Well do you want by Osgeld · · Score: 1

      yea if you want the overhead of compression / decompression on top of virtual memory.

      ok lets put it this way, if you were IN CHARGE what would you want? your devs sissy slapping cause everything is in (compressed) swap or 100 bucks in ram?

      neh =p

    3. Re:Well do you want by imroy · · Score: 1

      yea if you want the overhead of compression / decompression on top of virtual memory.

      It's a pay-off. Yes, it does cost you RAM. But compressed RAM is still much faster than rotating disk, and probably SSD too (for now). So sacrifice some RAM (and CPU) and save swapping quite as much.

    4. Re:Well do you want by 3dr · · Score: 1

      Swapping is rarely a problem. If one builds a highly memory-constrained machine on purpose (only installing 1GB RAM for a Android build machine, for example), then yeah, swapping will occur.

      My Android build machine has 8GB, but the last time I benchmarked memory usage (froyo, summer 2010) I only saw about 2.2GB used at any time. Swap was zero.

      The need for swap space on today's machines has become far less important than it used to be, solely because of the low price of memory.

  6. 16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 0

    Seriously, you're complaining that you need $100 of RAM?

    1. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 5, Funny

      ...and a computer that can take 16 gigs of RAM.

      I mean, you can spend $100 and buy a 16-inch horse cock dildo, but that doesn't mean you can shove the whole thing up your ass.

    2. Re:16 Gigabytes RAM costs $100 by kelemvor4 · · Score: 1

      You beat me to it. It's not like 16GB is really asking that much for a dev workstation. I've got 24GB in mine currently.

    3. Re:16 Gigabytes RAM costs $100 by vanDrunen · · Score: 1

      Sucks if your motherboard doesn't support 16GB RAM or if you have a laptop.

    4. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 3, Funny

      I mean, you can spend $100 and buy a 16-inch horse cock dildo

      I'll leave that to you. Interesting that you knew the price off the top of your head, though.

    5. Re:16 Gigabytes RAM costs $100 by petermgreen · · Score: 1

      and a computer that can take 16 gigs of RAM.

      Indeed though support for 16GB is nothing unusual these days, if your desktop was made in the last couple of years and wasn't bottom of the barrel it will probablly support 16GB.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    6. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 0

      I wish.
      Where I work (at a major semiconductor company) everyone is required to use laptops. Crappy dell laptops. Slow ass 80GB hard drives, 4GB of ram under Windows XP. We might get Win7 in six months or so. Did I mention I need to compile Android every now and then? Under VirtualBox? Sigh. at least I think we'll get new laptops for Win7. We're a large international company so they want to be able to put us on a plane to visit other offices and take our development machines with us. It would be so much easier of they gave us big honkin' linux boxes to do our work on and a cheap windows laptop to VPN in remotely when necessary.

    7. Re:16 Gigabytes RAM costs $100 by Osgeld · · Score: 1

      Bingo, dev workstations are not 199$ Acer's bought at K-mart

    8. Re:16 Gigabytes RAM costs $100 by izomiac · · Score: 2

      16 GB is far more than any desktop user should need, and most laptops simply cannot hold that much, so it's creating a sharp demarcation between user and developer. This is bad. You want your advance users to naturally transition into becoming developers, and making your codebase inaccessible for them prevents that.

      IOW, most people have suggestions for improvement for any tool they use. Ideally, it would be trivial for someone to download the source, modify it, recompile, test, and submit improvements. People start with simple things (e.g. misspelled words) and move to more advanced tasks as they gain familiarity. By requiring several hundred dollars of hardware and massive time investments, you are ensuring that users never become developers, just needy consumers whining about feature requests.

    9. Re:16 Gigabytes RAM costs $100 by Wyatt+Earp · · Score: 0

      You can put 16GB in the newest MacBook Pro

      http://ramjet.com/macbook.asp#BlackBezel

    10. Re:16 Gigabytes RAM costs $100 by earls · · Score: 1

      Speak for yourself. I pay less and take more. Practice makes perfect.

    11. Re:16 Gigabytes RAM costs $100 by 0123456 · · Score: 1

      16 GB is far more than any desktop user should need, and most laptops simply cannot hold that much, so it's creating a sharp demarcation between user and developer.

      I have 8GB in my development system at work. With two copies of Eclipse sucking up a gigabyte each, if I try to compile my C++ software without shutting down the old version, I go over 8GB and start to swap.

      16GB would definitely be beneficial; I put 16GB of 1.6GHz DDR3 in my home server when I built it earlier this year and it cost under $150. ECC RAM for the work system would cost more, but would probably pay for itself in a few weeks.

    12. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 0

      I'm on my work dev notebook now. It's a Lenovo X201 with 8 GB of RAM and an SSD. But, when I need real RAM, my desktop is a HP Z800 with a dual quad core and 24 GB of RAM.

    13. Re:16 Gigabytes RAM costs $100 by swalve · · Score: 1

      Why would ECC pay for itself in a few weeks?

    14. Re:16 Gigabytes RAM costs $100 by EETech1 · · Score: 1

      maybe he meant the productivity increase due to the time saved from the ram upgrade, even through it was the more expensive ecc type ram.

    15. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 0

      Most employers I've had won't spend money on a workstation. I'm lucky to get a remotely decent desktop. In fact, I always have better hardware at home than at work. The most RAM I've ever been given on a work system is 4GB. I'm a programmer.

    16. Re:16 Gigabytes RAM costs $100 by muridae · · Score: 1

      I got a rather workable gaming/development laptop (HP) from an office supply store just 3 years ago. It supports a max of 8gigs of ram. Granted, it was the cheapest laptop with a nvidia 9600GTM with a gig of dedicated ram(really, a better mobile graphics chip than most of the 100 and 200 series), which is to say not the cheapest thing on the shelf.

      True, I didn't buy it for Android development, and making the trade off for a few extra minutes of wall time versus a whole new computer is worth it in my short run. But I wouldn't presume that it takes a decade old computer to not support more than 8 gigs of ram. Plenty of cheap/lazy motherboard suppliers out there.

    17. Re:16 Gigabytes RAM costs $100 by Osgeld · · Score: 1

      8 gigs is a 2 slot board you can pick those up for less than 40 bucks in desktop form if you dont mind a older CPU and yea a decade old, 16 gig requires a bit more

      maybe next years 39.99 boards but its totally not needed at this point

    18. Re:16 Gigabytes RAM costs $100 by peppepz · · Score: 1
      Intel's most advanced and expensive laptop processors, on sale currently and in the foreseeable near future, only support 8 GB of RAM.

      16 GB of RAM is an awful lot of it, by today's standards.

    19. Re:16 Gigabytes RAM costs $100 by peppepz · · Score: 1
      But even Apple don't know it http://www.apple.com/macbookpro/specs.html

      4GB (two 2GB SO-DIMMs) of 1333MHz DDR3 memory; two SO-DIMM slots support up to 8GB

    20. Re:16 Gigabytes RAM costs $100 by Guy+Harris · · Score: 1

      Ideally, it would be trivial for someone to download the source, modify it, recompile, test, and submit improvements.

      I'm not holding my breath waiting for that, any more than I'm holding my breath waiting for everybody who has pain in a joint to open themselves up and replace the joint, or waiting for everybody who finds {their car, their bicycle, their local public transportation system, ...} to open up their box of tools and fix it. No, I don't think most people will want to be developers, and I don't think most people would be able to be developers. I don't think that because I want to be a Highly Paid Member Of A Priesthood, I think it because I haven't seen anything to indicate that most people will want to be software developers - they have better things to do with their lives.

      People start with simple things (e.g. misspelled words) and move to more advanced tasks as they gain familiarity.

      If they gain familiarity.

      By requiring several hundred dollars of hardware

      How many of the people with the time, energy, and ability to become developers won't be able to afford the hardware at the prices many people here have cited?

      and massive time investments

      Making changes to the core of Android (or iOS or Mac OS X or Windows or the Linux core or...) is eventually going to require a significant time investment to understand the code in question. If you're making relatively minor tweaks a single application, you may not need a machine so Studly(TM) as to be able to compile the entirety of Android in a reasonable time.

      you are ensuring that users never become developers, just needy consumers whining about feature requests.

      It might be more like "you are ensuring that users never become needy developers whining that their poorly-conceived patch hasn't been accepted, just needy consumers whining about feature requests". :-) I might well consider a needy consumer whining about a feature request less annoying than a needy developer who cooked up some half-assed "solution" to a problem, causing more problems to the system as a whole than it fixes, bitching because their patch hasn't been accepted or was sent back with a large number of issues.

      As far as I'm concerned, an ideal system is largely written at a high level that makes it hard to screw up, with that high level implemented at a lower level where angels fear to tread. This doesn't introduce a barrier to entry, it just moves the high barrier a little bit closer to the core, and perhaps makes it higher.

    21. Re:16 Gigabytes RAM costs $100 by 0123456 · · Score: 1

      maybe he meant the productivity increase due to the time saved from the ram upgrade, even through it was the more expensive ecc type ram.

      Yes. Just having to shut down the software to recompile it means I can't do any testing while I'm waiting for the compile to finish; that's not a huge amount of time each day but it all adds up in wasted developer time.

    22. Re:16 Gigabytes RAM costs $100 by petermgreen · · Score: 1

      Yeah laptops are a pain if you want/need lots of ram. Some can handle 2x8GB but 8GB laptop modules are bloody expensive.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    23. Re:16 Gigabytes RAM costs $100 by nosferatu1001 · · Score: 1

      Incorrect, they all support 16GB

      THe next gen chipset supports 64GB

    24. Re:16 Gigabytes RAM costs $100 by petermgreen · · Score: 1

      Intel's most advanced and expensive laptop processors, on sale currently and in the foreseeable near future, only support 8 GB of RAM.

      Some are listed as supporting 16GB or 32GB. for example http://ark.intel.com/products/50067, http://ark.intel.com/products/52224

      But yeah in general laptop users get shafted on ram because they generally only get two ram slots and even when their platform supports 8GB modules they are frightfully expensive but then IMO if you are trying to do heavy computation on laptops you are probably doing it wrong.

      16 GB of RAM is an awful lot of it, by today's standards.

      Currently 16GB is the max you can put in a mainstream (but not bottom of the barrel) desktop with reasonablly priced modules and afaict it's been that way for a couple of years now. Desktops based on the high end LGA1366 socket support 24GB of reasonably priced modules.

      Once you go byeond 24GB you currently have to either buy frightfully expensive 8GB unregistered modules or buy a server platform that supports registered modules and/or more ram slots.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    25. Re:16 Gigabytes RAM costs $100 by carnivore302 · · Score: 1

      If people are interested, I'll sell 'em for 16 gigabytes worth of ram.

      --
      Please login to access my lawn
    26. Re:16 Gigabytes RAM costs $100 by peppepz · · Score: 1
      Until last month, the mobile i7-2600s were listed as supporting up to 8 GB on ark.intel.com. Now the specs on the site have changed, saying they support up to 16 GB. Perhaps they made a mistake when they first published the 8 GB limitation, as I don't think they're quietly releasing a new stepping of the hardware with new features without changing its model number.

      As a owner of one of those CPU, I'm glad for that but I hope there isn't some other 8 GB limitation lurking either in the chipset or in the BIOS preventing me to upgrade to 16 GB in the future.

    27. Re:16 Gigabytes RAM costs $100 by Kjella · · Score: 1

      I guess it depends what you're doing too. Compared to all the time you're working on code, design, architecture, documentation, meetings and using cached compiled code, how often do you really make a full recompile and how long do you wait? Are you instead thinking ahead or are those minutes the usual slack people have to get a cup of coffee or something? I mean if you are working for a software giant on a huge project that takes forever to compile, I doubt you'd be stuck with 4GB of RAM. You just have to have a reasonable business case that getting a fast machine would save you X minutes a day.

      --
      Live today, because you never know what tomorrow brings
    28. Re:16 Gigabytes RAM costs $100 by smash · · Score: 1

      Sounds like your employers are behind the curve. We've been standardising on 4gb of RAM for our end user desktops to run Outlook, Word and Excel. Since 2007.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    29. Re:16 Gigabytes RAM costs $100 by smash · · Score: 1

      my i7-2720 supports 16gb. and it is about to be superseded by ivy bridge...

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    30. Re:16 Gigabytes RAM costs $100 by smash · · Score: 1

      Apple only "support" 8gb because they only support apple memory upgrades. And they choose not to sell 8gb DIMMs. Hence, it is unsupported by apple. The machine will take 16gb just fine, and kits are readily available from OWC.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    31. Re:16 Gigabytes RAM costs $100 by Lumpy · · Score: 1

      Sounds like your IT department is staffed with people that know nothing about IT. IF you have to travel with your dev boxes, then a Lunchbox PC would be a perfect choice for a very high end setup that is easily portable.

      --
      Do not look at laser with remaining good eye.
    32. Re:16 Gigabytes RAM costs $100 by Lumpy · · Score: 1

      I have 24 gig in my Old G5 quad core Apple desktop and I used every drop of it. I also know a lot of other people that use 16 GB or more ram in their desktops daily.

      I am guess you dont know that they edit TV shows and movies as well as render CG on computers. All on desktops. AVID on it's own will suck up every drop of ram you hand it.

      --
      Do not look at laser with remaining good eye.
    33. Re:16 Gigabytes RAM costs $100 by Wyatt+Earp · · Score: 1

      Same with my ASUS laptop, but it will take 8GB DIMM as well.

    34. Re:16 Gigabytes RAM costs $100 by Anonymous Coward · · Score: 0

      wow dude, your analogy is breath-taking...

  7. 16GB RAM and GCC optimization by Zan+Lynx · · Score: 2

    This is a guess as to the reason.

    One of the better ways to optimize C++ code for building with GCC is to put all of the source code into one big code file. Or you can build it as a few independent modules, but the code is still quite large. Then you build it with the O3 flags. In GCC, the amount of RAM and CPU used in an O3 compile goes up by quite a lot as the code size in a single module increases. I am not sure what the exact equation is but I think it's an exponential function.

    This would easily explain the RAM and CPU usage.

    1. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      One of the better ways? I think a more accurate description would be, lazier ways that often promotes continued inefficiency and bad design. Even with a massive disk cache, I can't think of any good reason that it would take 16 GB to compile anything.

    2. Re:16GB RAM and GCC optimization by Rich0 · · Score: 2

      I run Gentoo and usually run make with -j5 on a tmpfs, and I've never managed to use even half of my 8GB RAM building anything from chromium to firefox to openoffice. And I certainly don't skimp on my CFLAGS.

      Maybe if you build this thing on a tmpfs and run -j50 or something you'd need that kind of RAM, but seriously...

      Plus, since parallel make tends to limit itself to a single module at a time in most build systems it is hard to get the parallelism to be all that high anyway.

      I'll take them at their word, but I suspect that you'd be able to build android with a lot less than 16GB if you aren't running so highly parallelized. For starters I certainly don't have 8 cores to throw at it...

    3. Re:16GB RAM and GCC optimization by bucky0 · · Score: 3, Informative

      No, you can perform better optimizations if you know, for instance, that a function can be inlined. You can't get that if some of the uses are in other compilation units.

      --

      -Bucky
    4. Re:16GB RAM and GCC optimization by exomondo · · Score: 2

      I can't think of any good reason that it would take 16 GB to compile anything.

      Well how much RAM would you think should be needed to compile Android? If you're taking 5 hours of CPU time to ~25mins wall time then obviously your parallel compiles are going to be chewing up a lot of RAM. If you reduced the amount of parallel builds it would reduce the amount of RAM required - and also take a lot longer.

    5. Re:16GB RAM and GCC optimization by shutdown+-p+now · · Score: 1

      Think about how much time and memory a complete escape analysis for several hundred megabytes of C++ code would take.

    6. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 0

      Inlining 12 GB (conservatively) worth of functions, that's the argument? Really?

    7. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      My "smart" answer would be not much more than the host operating system itself needs. However, yes, RAM can affect the number of parallel compiles but I think its safe to say in this case we are not optimally limiting the number of symbols and objects that the compiler needs to work at any given time.

    8. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Is there a reason we would analyze several hundred megabytes of C++ code, at once?

    9. Re:16GB RAM and GCC optimization by wmac1 · · Score: 0

      It isn't? I upgraded my PC to 4G of RAM just a few weeks ago.

      BTW I do a lot of software development and also academic simulation (using Matlab and my own simulation software which handles hundreds of thousands of intelligent autonomous agents ). I am a computer science researcher by the way.

    10. Re:16GB RAM and GCC optimization by exomondo · · Score: 1

      My "smart" answer would be not much more than the host operating system itself needs.

      And just thrash your HDD, yeah you could do that in fact you could do that with everything and never need much more RAM than the host operating system, it would of course be extremely slow.

      However, yes, RAM can affect the number of parallel compiles

      Well no, in this case the amount of RAM required is affected by the number of parallel builds.

      but I think its safe to say in this case we are not optimally limiting the number of symbols and objects that the compiler needs to work at any given time.

      Conserve RAM or conserve time? I think the latter given the nature of the task.

    11. Re:16GB RAM and GCC optimization by UnknownSoldier · · Score: 1

      Maybe after you've actually worked on a professional C/C++ compiler you will be able to point out BOTH the positive and negatives to Unity/Bulk Builds. Until then, just because YOU are ignorant of Unity / Bulk Builds and have obviously never used them, doesn't mean other people would be wiling to trade there 5 min compiles + 2 min links times for 1+ hr builds using the inefficient precompiled header approach.

    12. Re:16GB RAM and GCC optimization by Intropy · · Score: 5, Informative
      Yes, there certainly are. The most obvious reason is code optimization. If your target device is something relatively light on resources like a mobile phone, then you probably want to optimize very aggressively. All forms of optimization require context. For something like "false && statement" all the required context for optimizing away the statement is very nearby. Something like the return value optimization needs to know about the entire function. So far we're considering the easy stuff. If you want to go all out and get into whole program optimization then some optimizations cannot be guaranteed to be safe without knowing the entire program.

      Now if "compile" refers to the entire build process, then we're also probably talking about some serious static analysis. Checking for things like "can this function ever throw?" or "is this code reachable?" or "is the memory allocated here always eventually freed?" also requires an awful lot of context to check. In the worst case each of these questions requires knowing all of the code to answer.

    13. Re:16GB RAM and GCC optimization by bucky0 · · Score: 1

      Are you being obtuse? No, you're obviously not inlining 12GB worth of functions, I was just giving an example of an optimization that benefits from combining the code into one compilation unit, so you can make an intelligent decision on what can be optimized away.

      --

      -Bucky
    14. Re:16GB RAM and GCC optimization by shutdown+-p+now · · Score: 1

      The more you analyze at once, the better cross-function optimizations you can do. Think very deep inlining, loop unrolling, propagation of conditions that let the compiler skip various checks or completely optimize out some code, etc.

    15. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Well, thanks to your thoughtful and professional response I now realize I have been working with Mickey Mouse compilers for the last two decades.

    16. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Annoying? Maybe. Obtuse? No. While I agree optimizations are important, in a project with a code base of this size structured logical components and boundaries is going to be far more important than finding that last piece of code that can be "inlined". Its becoming less of a critical factor with devices supporting 1 GB of RAM, but inlining is not always the most preferential optimization.

    17. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      I think the difference in opinion between the two of us is I think some of those decisions should be pre-determined design decisions and not left up to a compiler trying to figure things out after the fact. The larger the code base, the more strongly I would feel about this. I know they were just quick examples, but... "can this function ever throw?" - it's been a while since I went scratching through an object or class file, but wouldn't the compiler already know this from previous compiles? "is this code reachable?" - unless we're using goto's, isn't this confirmable by module? "is the memory allocated here always eventually freed?" - I'm not sure a compiler could ever truly know this answer, best case would be management code either injected by the compiler or part of the framework to determine this at runtime.

    18. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      If you're advocating packaging everything up and sending it to the compiler in one shot so it can figure things out - no, I would say that is not a good way to optimize a project especially if it has a large code base.

    19. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Organize the project better, and you won't have to make that decision or compromise.

    20. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Forgetting for a second that especially in an embedded style device, I want the results to be very predictable - at what point do you draw the line between compiler optimizations and just plain bad organization or code?

    21. Re:16GB RAM and GCC optimization by exomondo · · Score: 1

      Organize the project better, and you won't have to make that decision or compromise.

      Yes of course, if you arbitrarily 'organize it better' you'll be able to build it instantly on 640k of RAM too, how? You know, just 'organize it better'.

    22. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Nothing arbitrary about it, deliberate would be a better word to use. I'll meet you half way, say instead of a 16 GB or a 640K environment we use an 8 GB build environment?

    23. Re:16GB RAM and GCC optimization by bucky0 · · Score: 1

      And like I said, it was just an example. There's obviously more optimizations than just inlining.

      Even well-separated and intelligently written software benefits from the compiler doing smart things, and to do that, it needs as much information as possible. Also, a *ton* of the memory usage for compiling something that large comes just from the bookkeeping required to keep track of debug information.

      --

      -Bucky
    24. Re:16GB RAM and GCC optimization by badboy_tw2002 · · Score: 0

      Spoken like a true java programmer. You've spouted up this tripe like three times. Why do you feel its necessary to comment on a large c++ project when its obvious you've never worked on one? Insane, truly insane.

    25. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Oh? Just what part makes you think I'm a Java programmer?

    26. Re:16GB RAM and GCC optimization by Curunir_wolf · · Score: 1

      I think the GP was referring to parallelization options, not optimization flags. Maybe you didn't read the post?

      --
      "Somebody has to do something. It's just incredibly pathetic it has to be us."
      --- Jerry Garcia
    27. Re:16GB RAM and GCC optimization by Anonymous Coward · · Score: 1

      Hint: make -j is not gcc -O

    28. Re:16GB RAM and GCC optimization by Anonymous Coward · · Score: 0

      Oh dear god another geek who cant read.

    29. Re:16GB RAM and GCC optimization by shutdown+-p+now · · Score: 1

      What does this have to do with "being predictable"? Compiler optimizations, by definition, don't change semantics of code so long as it's written right. If you're relying on something that's undefined behavior according to the language (or your compiler) spec, you're doing it wrong.

      There's no line between compiler optimizations and bad organization of code - these two are completely orthogonal. As GGGGGP noted, a common way to optimize code real well, regardless of how it's written, is to concat all .c/.cpp files together, and then compile the result. Doing so will inevitably take a lot of resources, no matter how well it's organized.

    30. Re:16GB RAM and GCC optimization by exomondo · · Score: 1

      I'll meet you half way, say instead of a 16 GB or a 640K environment we use an 8 GB build environment?

      Of course you could use 8GB, it would just take longer as either the data would have to be swapped to disk or you would end up running less parallel processes.

      Nothing arbitrary about it, deliberate would be a better word to use.

      Ok then, if it isn't just a baseless suggestion then how is it specifically that you would re-organize the Android project to achieve a no-compromise solution wrt RAM utilization and compilation time? You clearly think they're doing it wrong so what would you do differently?

    31. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      We probably just disagree about this, but being a common way does not mean its a good way - there's also probably a bit of difference between a project the size of SQLite and Android. I do agree compiler optimizations in general should not cause a problem, but in practice I think more judicial reliance on them decreases the effort in maintaining a solution especially as the size and/or scope of the solution evolves. Even if you were bent on bundling all source files up and sending them to the compiler in one shot, I would think that if you truly need a machine with 16 GB of RAM that would be a good indicator its also a good time to better organize and segregate your code in to more discrete and logical pieces.

    32. Re:16GB RAM and GCC optimization by fast+turtle · · Score: 1

      and I have to absolutely disagree about compiler optimizations. To many times the toolchain does something that actually slows things down and makes debugging far more difficult becuase every build is different.

      What I want is all software to build the same way, consistently and that's why the *BSD folks began work on their own toolchain. Simply put, they'd discovered too many cases where the toolchain was introducing flaws due to changes in how it optimized things even when using the same hardware and settings. Not good when you're trying to debug something.

      So give me a toolchain that builds things strictly as written so I can see where the lag points are. I'll then be able to revise the flowchart (you do know how to flow chart?) to account for the lag points and begin reworking just those sections.

      --
      Mod me up/Mod me down: I wont frown as I've no crown
    33. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      That would be like me asking you to specifically state exactly why Android needs a 16 GB build environment. What I have stated is not that they are doing it wrong, but the fact that if it truly requires 16 GB to build reasonably then they can probably do a better job of organizing the source and/or build environment. Considering most projects, even larger than Android, build fine with far less resources I don't think that's too much of a stretch.

    34. Re:16GB RAM and GCC optimization by Daniel+Phillips · · Score: 1

      There should be a build flag to select between "just build sorta fast code and don't take all day" vs "go crazy". Obviously.

      As a fringe benefit, you then get more test coverage.

      --
      Have you got your LWN subscription yet?
    35. Re:16GB RAM and GCC optimization by tyrione · · Score: 2

      This is a guess as to the reason.

      One of the better ways to optimize C++ code for building with GCC is to put all of the source code into one big code file. Or you can build it as a few independent modules, but the code is still quite large. Then you build it with the O3 flags. In GCC, the amount of RAM and CPU used in an O3 compile goes up by quite a lot as the code size in a single module increases. I am not sure what the exact equation is but I think it's an exponential function.

      This would easily explain the RAM and CPU usage.

      And when LLVM/Clang gets full Concurrency in 3.1 you can bet Google will be put GCC in the rear of the bus with LLVM/Clang taking over the wheel.

    36. Re:16GB RAM and GCC optimization by Anonymous Coward · · Score: 0

      Do you guys live in the stone age? Nowadays we have LTO for that.

    37. Re:16GB RAM and GCC optimization by DrXym · · Score: 1

      Organize the project better, and you won't have to make that decision or compromise.

      Building a shitload of code consisting of a kernel, cross compiler, developer tools, runtimes, libraries, and applications is not going to be fast no matter what way you dice it. Speeding it up boils down the old business of throwing faster & more CPU, memory, hdd at it and tweaking the build to use parallel builds to take advantage of multiple cores.

      After you built it the once chances are you wouldn't need to build significant chunks of it again unless you were actively changing them.

    38. Re:16GB RAM and GCC optimization by MechaStreisand · · Score: 0

      Sir, compiler optimizations can introduce bugs if the compiler itself has bugs. I think gcc sometime runs into this with -O3. By your "definition", those wouldn't be compiler optimizations anymore, but that is not how the term is defined. No true Scottish compiler optimization, and all that.

      --
      Disclaimer: IANAL. This post is, however, legal advice, and creates an attorney-client relationship.
    39. Re:16GB RAM and GCC optimization by KiloByte · · Score: 1

      You don't do that by hand anymore, there's -flto for that. But the biggest case I've heard of so far is Firefox which fails to compile with -flto within 32-bit address space. Android here dethrones it by a factor of four...

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    40. Re:16GB RAM and GCC optimization by shutdown+-p+now · · Score: 1

      If the compiler itself has bugs, you don't always need optimizations to trigger them. And yes, it happens with pretty much all compilers, but the risk of hitting a new one is small enough that no-one is seriously tuning down -O just because they're afraid of that.

    41. Re:16GB RAM and GCC optimization by exomondo · · Score: 1

      That would be like me asking you to specifically state exactly why Android needs a 16 GB build environment.

      Well you claim to be able to cut that usage to 50% so you must know some specifics surely, that's a big claim if you know nothing about it.

      What I have stated is not that they are doing it wrong but the fact that if it truly requires 16 GB to build reasonably then they can probably do a better job of organizing the source and/or build environment. Considering most projects, even larger than Android, build fine with far less resources I don't think that's too much of a stretch.

      You don't need 16GB to build it, you just need that much to build all the targets in ~25mins, i thought that was pretty clear.

    42. Re:16GB RAM and GCC optimization by t2t10 · · Score: 2

      The most obvious reason is code optimization. If your target device is something relatively light on resources like a mobile phone, then you probably want to optimize very aggressively.

      And that's why they program the phone in Java???

      All forms of optimization require context. For something like "false && statement" all the required context for optimizing away the statement is very nearby.

      Whole program optimization is useful for large computational codes. It is useless for something as dynamic as a mobile phone operating system. If you attempt to run such optimizations on something like Android, you get a bloated memory footprint and a miniscule performance improvement, leaving you worse off than you would otherwise have been.

      JIT was supposed to fix this (since it obviates the need for whole program analysis; you just compile the hotspots), but obviously that didn't work out so well either.

    43. Re:16GB RAM and GCC optimization by Rockoon · · Score: 1

      Oh? Just what part makes you think I'm a Java programmer?

      ..probably the part where you dont seem to have a clue what sort of optimizations a modern C++ compiler can make, and what is required to get those optimizations...

      For instance, modern C++ compilers will consider folding constants across function call boundaries (and thus either inlining or producing a new function in the process) with the right command line switches... this isnt just being able to inline, but to also actually be able to greatly optimize the called function based on the specific parameters used in practice.

      Before you say that perhaps that function should be moved into the callers module, please restrict your retorts to those that would apply to heavy string work (an area where whole program optimization commonly gets big wins in practice due to the large number of string constants typically involved.) You arent going to copy all the string functions from the standard library into your source modules, are you?

      --
      "His name was James Damore."
    44. Re:16GB RAM and GCC optimization by MechaStreisand · · Score: 1

      A few projects do just that, actually. The FreeBSD hackers, for instance, warn users off of using -O3 for compiling the system (which compiles fine with -O2). Anecdotally, I've heard from other sources of problems from using it, and also that it's not necessarily even faster than -O2: it depends on the code itself. Seems to be not worth the bother of using it unless the makers of the individual piece of software have tested it that way.

      --
      Disclaimer: IANAL. This post is, however, legal advice, and creates an attorney-client relationship.
    45. Re:16GB RAM and GCC optimization by TheRaven64 · · Score: 1

      What I want is all software to build the same way, consistently and that's why the *BSD folks began work on their own toolchain

      Okay, speaking as one of those [Free]BSD guys working on the toolchain... bullshit. Consistency is important, and nothing is more important than producing correct code, but producing fast code comes a close second (producing correct code quickly is also important for fast compile-debug cycles).

      Inlining and function specialisation are both important optimisations. For example, if half the time a function is called, one of the parameters is a constant, you can emit a custom version that does propagation of that constant all of the way through and get vastly simpler code. For functions that are not exported outside of a library, you can change their calling convention to a faster one, but only if you can control every possible callsite.

      All of these work better when you can do whole-program (or, at least, whole-library) optimisation. When you're talking about a mobile platform, performance means battery life. If you improve performance, you can put the CPU in a low-power state more often, and the battery lasts longer. This is really important.

      So give me a toolchain that builds things strictly as written so I can see where the lag points are.

      Any compiler does this. If you're writing a C-family language, then you might want to check the parts of the spec that are undefined behaviour. There are a lot.

      --
      I am TheRaven on Soylent News
    46. Re:16GB RAM and GCC optimization by robthebloke · · Score: 1

      It's not lazy. It's called "using a build tool" (unity build being one such example). Combining multiple cpp files into a single compilation unit as part of your build process is a huge optimization. But note that I say as "part of your build process", and not "restrict your working process to a single cpp file".

    47. Re:16GB RAM and GCC optimization by mmcuh · · Score: 1

      Wouldn't turning on LTO give exactly the same benefits but without the horror of huge source code files?

    48. Re:16GB RAM and GCC optimization by TheRaven64 · · Score: 1

      "can this function ever throw?" - it's been a while since I went scratching through an object or class file, but wouldn't the compiler already know this from previous compiles?

      How? Unless the programmer has tagged it as not throwing (throw() or __attribute__((nothrow)) ) then the only way to determine this is to walk the call graph from that function down until you find a function that does throw, or you explore all nodes until every leaf is guaranteed not to throw. This requires you to have the AST (or the IR) for that function and every function further down the call graph in memory.

      --
      I am TheRaven on Soylent News
    49. Re:16GB RAM and GCC optimization by TheRaven64 · · Score: 1

      The problem with -O3 (in GCC) is that it enables optimisations that revolve around various bits of undefined behaviour in the spec. Lots of programmers aren't aware of these bits of undefined behaviour (e.g. overflow of unsigned values) and expect some well-defined behaviour in their code. This code will run fine on a compiler that makes the same assumptions that they do (e.g. wrap-on-overflow behaviour for all integer types, or float* may alias int*), but won't when you turn up the optimiser.

      It is usually the case that code that works at one optimisation level but not another is wrong, but often the wrongness can be very subtle.

      --
      I am TheRaven on Soylent News
    50. Re:16GB RAM and GCC optimization by TheRaven64 · · Score: 1

      That's out of date. -O4 will enable link-time optimisations these days, which can make a big difference (assuming that you entire toolchain supports it).

      --
      I am TheRaven on Soylent News
    51. Re:16GB RAM and GCC optimization by smash · · Score: 2

      maybe they should switch to clang.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    52. Re:16GB RAM and GCC optimization by Ash+Vince · · Score: 1

      One of the better ways? I think a more accurate description would be, lazier ways that often promotes continued inefficiency and bad design. Even with a massive disk cache, I can't think of any good reason that it would take 16 GB to compile anything.

      I always find it funny when people come out with things like this, especially when they have very high slashdot uids that suggest they are still young student or new types. There are many other sensible posts in this thread details possible reasons why it may require 16Gb to compile.

      Let me know give you a small word of advice from someone who has spent many years posting things that are similar and even saying them in an academic or work situation: Be Humble.

      By saying things like you have above you seem to be implying that since you know of no reason why something should be the case, then there can be no reason for it. I have no idea who you are or anything about you, but I am fairly sure you are not a world renowned expert on compiling mobile operating systems so you not knowing a reason for something you know very little about is not likely to be of any relevance. If you are an expert on compiling mobile operating systems, then please accept my apologies.

      This is not a troll post, its just that arrogance is the biggest problem most young engineers face when the enter the work place and are suddenly surrounded by people who really know their shit, unlike when your a student when most of your fellow students are at the same or similar level. The best developers I have ever work with generally have one redeeming feature: They are quiet, humble and only contribute when they have some invaluable piece of information to contribute. This way they get remembered for the invaluable contribution only.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    53. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Thank you for showing me what an arrogant post looks like. ;) Far from a student, and I don't think I qualify as "young" anymore but thank you for trying to make assumptions. Engineers like any other group of people come in all different flavors and there is no magic stereotype that helps you figure out which ones are "better" than others; some are loud, some are quiet, some are great at certain things while others are better at other things - blah, blah, blah...

    54. Re:16GB RAM and GCC optimization by tomhudson · · Score: 1

      I'll then be able to revise the flowchart (you do know how to flow chart?)

      Your faith in kids today is touching ... :-p

    55. Re:16GB RAM and GCC optimization by Dishevel · · Score: 0

      He would keep his mouth shut next time.
      I do not think he likes it when his quick one liner based on "A cool thing to just say" gets turned on him and points out with a big red arrow his lack of any real knowledge in the situation.
      Shame on you.
      You should have just let him seem cool. I think he really needs it.

      --
      Why is it so hard to only have politicians for a few years, then have them go away?
    56. Re:16GB RAM and GCC optimization by Dishevel · · Score: 0

      If you had RTFA you would know that your need a dual quad core machine with 16GB of ram to get it done in ~25 min.
      Sometimes in the real world it just makes sense to throw cheap RAM at a job and make it go much faster.
      But if you want you can keep arguing about "if you truly need a machine with 16GB of RAM" instead of just realizing that everyone already knows that your initial statements on the subject were due to not reading or not understanding TFA.
      Please just stop.

      --
      Why is it so hard to only have politicians for a few years, then have them go away?
    57. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      There are days where I miss Slashdot, this is not one of them. I did read the article (always do) and understood it. You can throw resources at a problem to try and "solve it" by masking the problem(s), but sometimes you actually have to sit down and do the real work to fix it. Sorry if you don't understand that concept.

    58. Re:16GB RAM and GCC optimization by grumbel · · Score: 1

      Is it so hard to understand? The more context the compiler has, the better he can optimize. Thus throwing all the .cpp files at once at the compile will lead the best results and use naturally more resources then compiling each file alone. That's not "masking the problem", that's simply getting the best possible results with the tools you have available.

    59. Re:16GB RAM and GCC optimization by scot4875 · · Score: 1

      The source code is available. If you're such a whiz, go ahead and organize the project better.

      I get pretty sick of you armchair quarterbacks. You're in a unique situation in which you can do something about the perceived problem. Put up or shut up.

      --Jeremy

      --
      Jesus was a liberal
    60. Re:16GB RAM and GCC optimization by scot4875 · · Score: 1

      Worked on != worked with.

      --Jeremy

      --
      Jesus was a liberal
    61. Re:16GB RAM and GCC optimization by zeroshade · · Score: 1

      JIT has nothing to do with the OS and everything to do with the applications that are running on top of it. The JIT was for dalvik running applications, the OS is, for the most part, compiled C++.

    62. Re:16GB RAM and GCC optimization by Ash+Vince · · Score: 1

      Thank you for showing me what an arrogant post looks like. ;) Far from a student, and I don't think I qualify as "young" anymore but thank you for trying to make assumptions. Engineers like any other group of people come in all different flavors and there is no magic stereotype that helps you figure out which ones are "better" than others; some are loud, some are quiet, some are great at certain things while others are better at other things - blah, blah, blah...

      I wasn't expecting you to admit you were a student, they never do. If you read my post though I did not actually say you were though, I said your high slashdot uid suggested that you were.

      You are not professing to be an expert in compiling operating systems though and that is the only way your original post would have been with any merit. Someone who knows nothing about a topic saying they know of no reason why something is the way it is simply not interesting.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    63. Re:16GB RAM and GCC optimization by AVonGauss · · Score: 1

      Sorry, I forgot an adjective, condescending. If it makes you feel better to think of me as a student, I'm all for it, send me back and let me do it again.

    64. Re:16GB RAM and GCC optimization by t2t10 · · Score: 1

      So? I was simply pointing out that global static analysis is useless for these kinds of applications, and moving more of the OS into "managed code" with JITs (like Microsoft is trying) also isn't working. Both language and compiler technologies that Android is built on (C++, Java) optimize badly.

      Apple's choices (Objective-C, now LLVM) seem better to me in comparison when it comes to efficient, unbloated code (unfortunately, Objective-C has other problems, like a lack of type-safety).

    65. Re:16GB RAM and GCC optimization by Rich0 · · Score: 1

      Oh dear God, another ignorant Gentoo ricer...I've been using Gentoo for about 10 years now.

      Always nice to see the community doing wonders to improve its own reputation. :)

      You really need to learn before opening your mouth...(snip out discussion on the merits of various CFLAGS - in particular -O3)

      That would be why I don't use -O3. Also - we're talking about compilation RAM use and I don't see anything suggesting that compiling with -O3 uses all that much more RAM during building. The resulting executables certainly do, since -O3 in many GCC versions tends to unroll loops pretty aggressively and skipping a bunch of LOOP instructions doesn't make up for all the L1/2 cache waste.

      Read this stuff. It actually is kinda important.../me rolls his eyes.

      Uh, thanks for the lesson. You'll fit in fine on the gentoo-dev mailing list.

      - A random guy who has commit access to your package repository... ;)

    66. Re:16GB RAM and GCC optimization by zeroshade · · Score: 1

      Having your OS be managed code is a horrible idea. The OS should be native code. Otherwise you'll have to write a native code JIT anyways which needs to run....inside an OS...you see the problem. You could always bootstrap it, but that just seems messy.

      In addition, C++ optimizes exceptionally well. You can see massive improvements simply from compiler optimizations. Would you care to have some kind of source backing up your claim that Objective-C optimizes better than C++? It seems highly unlikely. As far as compilers, I agree that LLVM is definitely better than gcc, but nothing really stops you from using LLVM to compile Android instead of gcc.

      Lastly, whole program optimization is useful for any program. Doesn't matter how dynamic it is, no one rights fully optimized code that is optimized in every possible way (unless you're awesome and writing assembly directly which very few people do anymore). The compiler will always find things it can optimize, and whole program optimization will find more optimizations to make than simply running optimizations on the individual modules only.

      If you attempt to run such optimizations on something like Android, you get a bloated memory footprint and a miniscule performance improvement, leaving you worse off than you would otherwise have been.

      Care to back up that statement? By definition, the difference between whole program optimization and per module optimization, is that the whole program optimization can do more optimizations. It can be certain about the safety of more things like inlining thus reducing the memory footprint and improving performance.

    67. Re:16GB RAM and GCC optimization by BrokenHalo · · Score: 1

      I sometimes wish that Slashdot would do away with the UID#. A low number always seems to be used (and abused) as some form of implicit authority and seniority, when in reality, of course, it suggests none. An old fool is still a fool.

      Incidentally, I am happy to admit that although I might be an old fool, I have had a (long-abandoned) 4-digit UID that presumably should qualify me as a sensei Slashdot poster.

    68. Re:16GB RAM and GCC optimization by Ash+Vince · · Score: 1

      I sometimes wish that Slashdot would do away with the UID#. A low number always seems to be used (and abused) as some form of implicit authority and seniority, when in reality, of course, it suggests none. An old fool is still a fool.

      Incidentally, I am happy to admit that although I might be an old fool, I have had a (long-abandoned) 4-digit UID that presumably should qualify me as a sensei Slashdot poster.

      Wow, nice reply to a very old post. As this is quite an old thread and I am bored on a long distance train you can have a long reply :)

      To be honest though, I was only loosely basing my reply on his uid and did try and get across that this was not set in stone by my use of the word "suggests". The problem though is that there are a great many grad or college students who post to slashdot pretending they have more accumulated knowledge than they actually do. I particularly notice this in the field of software development as this is my chosen career.

      I did also say in my post that I was not better when I was young (I might not be old but at 36 I am long past young unfortunately). In real life I generally have peoples CV's or LinkedIn profiles to go by when assessing how much weight to give their assertion that "they know of no reason for x to be true", here I can only judge them based on UID and whether they are on my list on friends or foes (or friends of friends). In the real world we also have the ability to assess peoples age by looks, this is not perfect but it is a damn good start when applying weighting to different peoples opinions.

      One thing I have noticed though is that people with uids that are at least a few years old are generally more likely to post stuff I find interesting and want to read. I do not really notice crap like 4 digit uids or whatever as you do not have to me an old master to have some interesting points of view. I do think though that if you were going to do away with uids being shown you should replace it with some way that I could filter out posts from people who only signed up yesterday or last week.

      I would still hold by my original sentiment which is that someone saying they know of no reason why it would need so much memory to compile something is simply not interesting unless they are actually an expert on the subject. I know of no reason why fish can breath underwater with strange flaps of skin (gills) but I am not going to post this to some biology based discussion board.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
  8. Obligatory XKCD by hedwards · · Score: 0
  9. What Slashdot wants to know by Anonymous Coward · · Score: 0

    tabletroms
    what are troms? and what do they have to do with tables?

    1. Re:What Slashdot wants to know by Anonymous Coward · · Score: 0

      tabletroms

      what are troms? and what do they have to do with tables?

      It's Tablet Roms obviously.

  10. So that's Google's master plan by Anonymous Coward · · Score: 5, Funny

    While Android will remain open-source, eventually it will require so much RAM/processing power/etc. to compile that only Google will have the computational resources available to compile it.

    Clever!

    1. Re:So that's Google's master plan by Anonymous Coward · · Score: 0

      The people who work at Google have probably gotten so used to having such vast processing power and resources that they simply overlooked the fact that the poor common programmer would struggle to work with it. By the time they realized what they have done it was too late. For a company that thinks of storage in Terra-bytes I wouldn't put it past them.

    2. Re:So that's Google's master plan by Anonymous Coward · · Score: 0

      While Android will remain open-source, eventually it will require so much RAM/processing power/etc. to compile that only Google will have the computational resources available to compile it.

      Clever!

      Total crap and bullshit. I don't beleave a single word abot those 16 GB.

    3. Re:So that's Google's master plan by martin · · Score: 1

      or use several AWS instances ;-)

  11. Rookie question on debugging monster code bases by Twinbee · · Score: 3, Interesting

    Quick question for those with giant codebases such as this. How the heck do you test, and debug the software with those kind of lag times? Do you split everything up into smaller pieces or something? If so, then surely there are cases where you need to test something that requires EVERYTHING to be compiled. I can imagine such shot in the dark scenarios to be the stuff of pure nightmares.

    --
    Why OpalCalc is the best Windows calc
    1. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      If they're using make, you only end up recompiling the bits you changed. If you really need to recompile everything, you're SOL of course :-P , but typically, you only need to recompile and test a small number of files.

    2. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      i remember when you could make world on an 80486 dx 75mhz with a 100 mb hdd and 64 mb of ram.

    3. Re:Rookie question on debugging monster code bases by tchuladdiass · · Score: 2

      Back in my college days we had to submit a compilation job on the mainframe, and then wait around for a couple hours for someone to put the printout containing the results (or more likely a crash dump) into the appropriate mail box slot. Then you had to wait your turn to submit a revised copy. (No, this wasn't that long ago -- 89, 90, something like that -- but the community college I went to still taught their Cobol & assembly classes on an older mainframe -- 3270 terminals though, no punch cards).

      But in the case of Android, remember that all the components are still separate -- you have the Dalvik VM, the Linux kernel, and libraries as probably the large components. So you can still debug any particular program module independently.

    4. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      ccache is a compiler cache that operates on the preprocessed files, so assuming there are no defines in a header file that actually change anything, it can still speed things up by using the previously compiled object file.

    5. Re:Rookie question on debugging monster code bases by Osgeld · · Score: 2

      As others have said, you dont recompile the entire thing cause you changed one integer, but as others have not said you really should be testing in smaller chunks, you are not perfect enough to vomit out something that takes 5 hours of CPU time (which on the given systems is about a half hour of real time) perfectly the first time you try.

      Its much easier to write a chunk and make sure it works than to write a freeking monster blob and go hunting for a chain reaction.

    6. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      What is this testing you speak of? Compile==Ship!

    7. Re:Rookie question on debugging monster code bases by epine · · Score: 1

      No, this wasn't that long ago -- 89, 90, something like that

      Seems pretty unlikely unless you were in a deep backwater. Interactive terminals became commonplace very early in the 1980s. It wasn't uncommon to work on a batch processing system until the mid 1980s, but not with results delivered on paper.

      The development model you're talking about properly dates to the 1960s and into 1970s, in backwaters where the future had yet to penetrate. FFS, the Xerox Alto was introduced in 1973.

      Sixteen years later, you're still on a line printer development loop? I think your college needed a shot of Future Lube if your dates are accurate.

    8. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      1) Distributed build systems.
          Assuming your build consists of parallizable components (nearly all builds do), just buy a build cluster and use that. There are systems out there which will autodetect dependencies and analyze serialization so you can get the build time down significantly. Nearly all cell phone manufactures use the same distributed build technology. I work for the company that produces it so I'll avoid naming it so I don't seem like a shill.

      2) Incremental builds.
        Only build what changed. This works well if you aren't refactoring stuff frequently. It tends to fail pretty horribly if you change a common shared file or are frequently synccing a rapidly changing source tree.

      3) Subbuilds.
        Only build the branch of the tree (and its dependancies) that you care about. If I'm working on the radio code, I don't care about any of the application changes that are happening. If I'm building an application interface, I generally don't care about any of the other application interfaces.

    9. Re:Rookie question on debugging monster code bases by Andrewkov · · Score: 1

      Luxury! Back in my day, make world was a stack of punch cards half as tall as a man!

      And it would take a lot more than 5 hours for the operator to feed them into the machine!

    10. Re:Rookie question on debugging monster code bases by swalve · · Score: 1

      Easy: if it compiles, you release it and let the users test it.

    11. Re:Rookie question on debugging monster code bases by swalve · · Score: 1

      It was like that at UIC in 1993. I had to walk to a different building to pick up printouts. It was a thrilling experience.

    12. Re:Rookie question on debugging monster code bases by sconeu · · Score: 1

      1982 WUSTL. It was an IBM 370. Towards the end of one semester, when everyone was submitting jobs, I had a 12 hour turnaround time for a 30 hour program.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    13. Re:Rookie question on debugging monster code bases by sconeu · · Score: 1

      That'll teach me not to proofread. 30 *LINE* job.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    14. Re:Rookie question on debugging monster code bases by Tepic++ · · Score: 1

      Where I work we have a 200MB+ stripped executable. At that point, even though your build is incremental you can see link times in the minutes due to the network traffic needed to pull all the object files together (from the fileserver to the machine where the linking takes place). Full builds take a similar order of walltime to those in this post. This is only the tip of the iceberg though as its normal to have test cases which take hours to load and can even take days to run (my field is electronic design automation software: http://en.wikipedia.org/wiki/Electronic_design_automation).

      It was certainly a shock to the system when I came back to this world from web development! You learn to cope with this latency though by becoming more careful and disciplined in how you design and program before hand so you rely less on fast testing iterations. You also try to make the most complete use of any debugging session/environment you have open and you build as much instrumentation as possible into the software.

      As far as debugging goes, thankfully code bases generally scale at worst linearly with developers and age while bisection search has log(n) performance. :-)

      As much as you try to work around the latency and whatever benefits it bring to your own discipline, theres no doubt that the latency hurts productivity and penalizes experimentation.

    15. Re:Rookie question on debugging monster code bases by jampola · · Score: 1

      Another Rookie here. So am I wrong to think that make works in a similar fashion to rsync? (obviously they're 2 different things but I'm talking in terms of how both can check if a file has changed, either by sums or some other way)

    16. Re:Rookie question on debugging monster code bases by Daniel+Phillips · · Score: 1

      Quick question for those with giant codebases such as this. How the heck do you test, and debug the software with those kind of lag times?

      You have a lot of code monkeys with high pain threshold and tolerance for less than perfect quality of life in return for a paycheck.

      --
      Have you got your LWN subscription yet?
    17. Re:Rookie question on debugging monster code bases by gl4ss · · Score: 1

      you only compile the sub-project you're working on at any given time.

      the rest you spend one day a week copying from the network... hoping it works. then you have a dedicated team doing those everything builds and hope they can get a fix release every week out for the devs doing development on the sub-parts.

      --
      world was created 5 seconds before this post as it is.
    18. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      Make only considers file modification time. It creates a directed graph of file dependencies, and any file that depends on a file with a modification time ahead of itself gets recreated using whatever rules you defined in the Makefile.

    19. Re:Rookie question on debugging monster code bases by smash · · Score: 1

      64mb in a 486? doubtful. most people i know who had more than 8-16mb of ram had pentiums.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    20. Re:Rookie question on debugging monster code bases by trolman · · Score: 1

      That is nothing. Our punch cards went by bus up a mountain road to the MF 70 miles away. It took a week to get back that error report.

    21. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      >It wasn't uncommon to work on a batch processing system until the mid 1980s, but not with results delivered on paper.

      Not.

      I worked in 1985 for the 25th largest insurance company in the US and we used batch processing on IBM mainframe iron and debugged from either paper printout or core dumps on microfiche (go look it up). Many years later they were still doing the same; large companies move to new technology VERY SLOWLY, especially if they are financial operations. Stability and repeatability are more important than new whizz-bang technology for many such institutions.

    22. Re:Rookie question on debugging monster code bases by Anonymous Coward · · Score: 0

      uphill both ways?

    23. Re:Rookie question on debugging monster code bases by Darinbob · · Score: 1

      The size of the code base is irrelevant. People can compile stuff vastly larger with small amounts of RAM. I don't know why they need this much RAM unless their compiler is junk. I suspect that it's just the link phase that's nasty. Especially if you've got a lot of statically linked, even more so with some code that hates linkers like heavily templated C++. But Android isn't that big so I'm still a bit baffled.

    24. Re:Rookie question on debugging monster code bases by Darinbob · · Score: 1

      We went from a 1-2 day build to 40-60 minutes by changing compilers and build system once. Once your build takes a certain amount of time it will drastically hinder productivity. Even if you've got a good make system you can hinder productivity if your link takes ten minutes. A lot of people tend to treat these build procedures as low priority issues and never get around to improving them once they've got something that works, but in my experience they can be big time wasters.

      Even something simple like being able to recompile just a single file to check for errors is not possible with some build systems that require a top-down build.

    25. Re:Rookie question on debugging monster code bases by mjr167 · · Score: 1

      I worked a job where it took us 45 minutes to compile, an hour to install, and 12 hours to run the regression tests. Tests ran nightly at 6PM and the results were analyzed when we got in in the morning. We were able to do a lot of patch builds/installs to test minor changes during the day, but if it couldn't be patched... We were told to be "not busy" places where the customer couldn't see us.

    26. Re:Rookie question on debugging monster code bases by size_t · · Score: 1

      You can easily do this with designing your components that way. It's painful, and often not worth it if the overhead is too much, but here's an example in C++

      Foo.h contains

      class FooImpl;
      class Foo
      {
      // calls here that require interaction with foo.
      FooImpl *foo_impl;
      };

      Foo.cpp can then include FooImpl.h which references FooImpl.cpp -- which in turn can have FooImpl.t.cpp which is a unit test for FooImpl.

      This obviously will not stress interdependencies and bugs, but you can make tests for larger component behavior too. (At the limit, you have to consider the costs of your tests...hmm..)

      --
      printf("size: %lld", sizeof(slashdot::size_t)); Output: size: 2496386 Apparently I'm not aligned.
  12. Something doesn't add up by Anonymous Coward · · Score: 1

    Ice Cream Sandwich will need workstations with no less than 16 GB RAM to build the source code, twice the amount Gingerbread needed.

    2 * 2 = 16?

    Gingerbread can be compiled with 2GB.

  13. not true by MrCrassic · · Score: 4, Informative
    Here's what the article *actually* says:

    16GB RAM recommended, more preferred, anything less will measurably benefit from using an SSD.

    Emphasis mine. Still pretty beast, though.

  14. Recompile *should* be much, much faster by dwheeler · · Score: 3, Informative

    Unless the build system is screwed up, recompiling after a change should be relatively fast. Usually source code is stored as lots of smaller files, and each file is compiled separately to produce a separate object file (e.g., .o). Then next time a rebuild is requested, the system should notice what changed, and only rebuild the needed parts. Some parts take the same time each time (e.g., a final link), but it shouldn't take anywhere near the same amount of time. There are lots of build tools, including make, cmake, and so on. If you use the venerable "make" tool, you might want to read Miller's "Recursive Make Considered Harmful": http://aegis.sourceforge.net/auug97.pdf Cue the lovers and haters of "make", here :-).

    --
    - David A. Wheeler (see my Secure Programming HOWTO)
    1. Re:Recompile *should* be much, much faster by Anonymous Coward · · Score: 0

      That's mostly irrelevant. During development, rebuilding only what has changed saves time. But that's the ONLY time you do that. Any sort of official build is always from scratch.

    2. Re:Recompile *should* be much, much faster by Anonymous Coward · · Score: 0

      Having worked on Google Chromium (non-packaged releases of Chrome Browser), I suspect that part of the problem is the linker. Chromium's link jobs were 4GB, and it used to be that make -j would result in several link jobs in parallel, bringing your machine to its knees if it didn't have at least 12GB or so. Once this happened to me, and it took me 10 minutes to long into the console to kill the build. Now they have a linker lock, but I digress...

      Since linking is the last stage of compilation, it's not hard for a change to require relinking several objects. Maybe Android is smaller, but a few link jobs on a smaller machine and your disk cache will be gone. So 16GB on a build machine actually sounds pretty reasonable: 8GB for two link jobs in parallel with 6 compile jobs, 4GB to cache the codebase and object files, 4GB for whatever else is running on your system.

    3. Re:Recompile *should* be much, much faster by intoxination · · Score: 0

      Well unless the housecleaning service comes in and see's "clean" on your working tree and thinks that means they should click it.

  15. 5 hours of CPU time != 5 hours of wall time by jlebar · · Score: 1

    From TFA:

    5+ hours of CPU time for a single build, 25+ minutes of wall time, as measured on a workstation (dual-E5620 i.e. 2x quad-core 2.4GHz HT, with 24GB of RAM, no SSD).

  16. Not so bad... by msevior · · Score: 1

    TFA says:

    5+ hours of CPU time for a single build, 25+ minutes of wall time, as measured on a workstation (dual-E5620 i.e. 2x quad-core 2.4GHz HT, with 24GB of RAM, no SSD)

    25 minutes of wall time is nothing for a first build. After that updates from changes in the source code will be trivial.

    25 minutes to build a complete linux distro is fantastic.

    1. Re:Not so bad... by Anonymous Coward · · Score: 0

      Unfortunately for consumers, Android is far from a complete distro.

  17. shitty /. summary by petermgreen · · Score: 5, Informative

    TFA: "5+ hours of CPU time for a single build, 25+ minutes of wall time, as measured on a workstation (dual-E5620 i.e. 2x quad-core 2.4GHz HT, with 24GB of RAM, no SSD)."
    /. Summary: "It will take 5 hours to compile on a dual quad-core 2+GHz workstation"

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    1. Re:shitty /. summary by Anonymous Coward · · Score: 0

      Seriously, which editor was asleep at the wheel for this one?

    2. Re:shitty /. summary by Anonymous Coward · · Score: 1

      And so, an incorrect meme is born.

      "I hear it takes 5 hours and 16GB to compile ICS"

      Sigh. thanks /.

    3. Re:shitty /. summary by Archangel+Michael · · Score: 1

      Of course that was the /. summary. Most people, including me, have never heard of "wall time" and I was trying to figure it out, until I did the calculation and figured out that "wall time" is the clock on the wall, not some fancy compiler term I've never heard before.

      Thanks /. for making it more complicated than it needs to be.

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    4. Re:shitty /. summary by wvmarle · · Score: 1

      You know, /. summaries are just teasers, to get you on the subject. For the meat you have to either read TFA or just read the comments.

    5. Re:shitty /. summary by Anonymous Coward · · Score: 0, Troll

      How the fuck did you ever even find Slashdot in the first place if you don't know what "wall time" is? You know this is a computer website, right? You have heard of a "computer" before, yeah?

      ENGLISH, MOTHERFUCKER. DO YOU SPEAK IT?

    6. Re:shitty /. summary by Anonymous Coward · · Score: 0

      you mean 25 minutes

    7. Re:shitty /. summary by Theovon · · Score: 1

      So you're known as petermgreen here and plugwash everywhere else? Wow. That's almost as boring as the fact that I'm known as theovon here and theosib everywhere else. :)

    8. Re:shitty /. summary by Anonymous Coward · · Score: 0

      No, I think elapsed time = CPU hours / number of CPU cores = 5 / 8 = 0.625 hours = 37 minutes.

      This is why they also mention "25+ minutes of wall time".

  18. Also distributed compiling by Sycraft-fu · · Score: 1

    In game programming, Incredibuild is a common tool for that. You run it on everyone's machine and it integrates with Visual Studio. Lets you reduce build time a ton since you have a lot of resources to use. Also tends to scale nicely as the larger the project, the more people working on it and thus the more computers available and so on. You can, of course, have dedicated servers just for compiling but many places don't bother, just having it use idle time from office systems as it is amazing how much that can add up to. Particularly since it is very rare for all devs to compile something at once.

    1. Re:Also distributed compiling by JohnnyBGod · · Score: 1

      I'll take the opportunity to plug distcc, which is Incredibuild's equivalent in the open source world. I'm not affiliated with it in any way, but it's a good idea and I'm a happy user.

  19. Depends on how you look at it by Sycraft-fu · · Score: 5, Informative

    While it is a lot of RAM compared to what many system have, it really isn't a big deal these days. 4GB DDR3 sticks are $25 or less each, and that is for high quality RAM. Regular, consumer grade, LGA1155 boards support 4 of them. So for $100 you can have 16GB on a normal desktop system. My home system I type this on has 16GB for that reason. It was so cheap I decided "Why not?"

    They actually can support more, with 8GB chips you can have 32GB on a standard desktop, but those are still expensive.

    The enthusiast X79 LGA2011 boards coming out will have 8 sockets and thus handle 64GB. Of course beyond that there's workstation which cost a lot more, but not as much as you might first think.

    At any rate, 16GB is now a "regular desktop" amount of RAM. Standard boards the likes of which you get in cheap ($1000 or less) towers support that much, and it only costs $100 to get. It is quite a realistic thing to require, for something high end.

    1. Re:Depends on how you look at it by Rich0 · · Score: 1

      At any rate, 16GB is now a "regular desktop" amount of RAM.

      Well, it is an amount of RAM you could cram into a brand new regular desktop, but it certainly isn't something you'd find on an average desktop. I think I have two slots free in mine so I could bump it up to 16GB, but that is $50 I don't really need to spend. I rarely am using more than half of my RAM as it is, though the extra obviously helps with caching/etc.

      Android has always been RAM-intensive, and it makes sense since you have no choice but to build an entire OS at once (not like you can dynamically link it to your desktop's libraries). Just building something like chromium takes a ton of CPU.

      Still, not looking forward to this... :)

    2. Re:Depends on how you look at it by Lehk228 · · Score: 1

      my ~1.5 year old desktop has 8 gigs and a SSD, but i'm crazy like that

      --
      Snowden and Manning are heroes.
    3. Re:Depends on how you look at it by KingMotley · · Score: 1

      My nearly two year old desktop has 12GB of ram in it, and can take 24GB (i7 930 based system). My next build which should be in December or January will likely have 32GB and expandable to 96GB (Dual socketed X79).

    4. Re:Depends on how you look at it by peppepz · · Score: 1
      Oh come on, it's twice the amount that Sandy Bridge notebook processors support at the CPU level, and it "isn't a big deal" these days?

      -- A pissed Android user who just bought a € 1.000 laptop maxing out at 8 GB

    5. Re:Depends on how you look at it by webheaded · · Score: 1

      Yeah...easily attainable, perhaps. Regular desktop amount...I'm thinking no. My gaming rig only has 4gb and that has been working pretty well for me...granted it is DDR2 and it's like 3 years old or so but still. 16gb is still a little ways away from being the norm. :)

      --
      "Those who would sacrifice essential liberties for a little temporary safety deserve neither liberty nor safety." - BenF
    6. Re:Depends on how you look at it by Anonymous Coward · · Score: 0

      I just bought my new PC three months ago. After considering 16GB of RAM I settled for just 8GB because I have almost never seen it peak to 8GB except due to memory leakes. Now this comes out. Luckily I can pop in another 2, 4GB's in if I need it.

    7. Re:Depends on how you look at it by Anonymous Coward · · Score: 0

      But you do understand that's not representative of the general population... I would venture to guess the average for that (based on what new "Wallmart" PC's sell with) is 2-4 GB. And it makes sense, because 2-4 GB will happily run any modern desktop OS you throw at it, including Windows 7 or a recent Ubuntu version.

    8. Re:Depends on how you look at it by Tr3vin · · Score: 1

      Why would the general population be building Android from source?

    9. Re:Depends on how you look at it by Darinbob · · Score: 1

      Most dev systems I think are still 32-bit operating systems. 16BG RAM is not a reasonable requirement there. It is only recently when these super systems are becoming affordable. Even then it is very expensive to upgrade everyone's workstation. There may be under-30s in the trenches who say "dude, it's cheap I've got one at home, lol" but there are also managers higher up who are trying to keep escalating costs under control.

      I think this is a luxury effect; that is the people who built the system originally have these high end systems and so they mistakenly assume this is a normal build system for everyone else, and have taken no effort at all to make the build reasonable.

      The Android is not a massive system, it's for a tiny phone. It's not reasonable to assume that this tiny thing should require bigger build requirements than systems many times its size and complexity. If Android really is this bad then it needs fixing; better build system, slap around devs who use too many templates, whatever does the trick. Time to optimize: ignore the misunderstood mantra to delay optimization because that way of thinking leads to this sort of misguided mess.

    10. Re:Depends on how you look at it by Darinbob · · Score: 1

      And this is part of the problem: do only crazy people get to compile Android because it was designed by crazy people?

    11. Re:Depends on how you look at it by James+Carnley · · Score: 1

      I'm not sure why a developer would have a 32 bit system. That actually boggles my mind.

      Windows has been 64bit for years and years. Normal desktop processors have been 64bit for ages. I don't even remember the last time you could actually buy a 32bit only CPU for a developer desktop.

      There is really no reason to still be running in 32bit mode, especially if you are a developer. Developers need to work on modern code, and most modern code should at least be transitioning to 64bit builds if it hasn't already.

      You treat 64bit like a luxury, but any developer machine bought in the last 5 years is almost guaranteed to be 64bit.

    12. Re:Depends on how you look at it by Darinbob · · Score: 1

      32-bit systems were common within the last 5 years. 64-bit systems did not start to become popular until Windows 7 (most people shunned Vista). 64-bit XP was extremely rare. The replacement cycle in a lot of corporations is 5 years, thus 32-bit systems are still out there.

    13. Re:Depends on how you look at it by Darinbob · · Score: 1

      Should also add that 64-bit systems really have little advantages except for larger memory. 64-bit compiled code is not necessarily faster code than 32-bit code.

    14. Re:Depends on how you look at it by James+Carnley · · Score: 1

      Even if the IT department insisted on keeping XP on those 5 year old machines, the hardware itself is still 64bit.

      Upgrading to a modern OS would usher in a new era of 64bit goodness for that old box.

      Granted they probably didn't put enough RAM in those machines since they clung to XP, but spending the cost of dinner at a restaurant to buy a stick or two of RAM will make it stand up to even compiling Android.

  20. This has to be BS overstating.... by Anonymous Coward · · Score: 0

    I built Gingerbread on a 4-year old mac with 4gb. It took a while, but build times are being reported to take ~25 mins.

  21. Hmmm... by damn_registrars · · Score: 2

    I was looking for something else to do on my old 16-cpu Itanium cluster with 64gbs of shared ram. I think I just found it...

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
    1. Re:Hmmm... by afabbro · · Score: 1

      Android builds on Itanium?

      --
      Advice: on VPS providers
    2. Re:Hmmm... by Anonymous Coward · · Score: 0

      ever heard of cross compiling?

    3. Re:Hmmm... by Zan+Lynx · · Score: 1

      Cross compilers. Same thing as building it on a Xeon. Neither one is an ARM.

  22. Why they can test if it takes 5 hours to compile by Anonymous Coward · · Score: 0

    http://google-engtools.blogspot.com/2011/06/build-in-cloud-accessing-source-code.html
    Google does iterative builds, meaning small changes take minimal amount of time to compile. If you have to build from scratch though, it can still be a big headache...

  23. Build battle scars? by ben_kelley · · Score: 5, Funny

    Unless the build system is screwed up, recompiling after a change should be relatively fast. Usually source code is stored as lots of smaller files [...] Then next time a rebuild is requested, the system should notice what changed, and only rebuild the needed parts.

    I feel your pain brother.

    1. Re:Build battle scars? by Anonymous Coward · · Score: 0

      more buts in that than a rap video

  24. I wonder... by levicivita · · Score: 1

    ...does a phone really require an OS of that complexity? Don't get me wrong, I have a current generation Android smartphone I bought 2-3 months ago, 4G enabled, it even has an HDMI out, and I completely comprehend that a modern smartphone is essentially a fully fledged computer.

    That being said, it's still a phone. And in fact, it's horrible at it. To redial the last number I have to press 3 buttons (1 physical, 2 virtual) and suffer through 3s+ of erratic lag or more. On my 4 year old boring but functional Blackberry, it took under 1s and all I had to do is press the same button twice. Hanging up, redialing, going back to the home screen is slow as molasses. Yes, I can browse the web, access my Google Docs, open PDFs, read books, play chess, watch Youtube HD, etc. etc.

    The smart- part of the phone is great and a step forward, however the -phone part of the phone is actually a big step back in my opinion.

    1. Re:I wonder... by arth1 · · Score: 1

      ...does a phone really require an OS of that complexity?

      It's not the OS complexity. It's the laziness of programmers, who want everything abstracted through seven layers until they can write single lines of code that through black box code magically expands into what they think they want done, not that they can ever know for sure.
      And the poor compiler works overtime, because it has to redo the same work every time someone writes object.method().

      There are reasons why so many of the kernel developers (including Linus Torvalds) are adamantly against using "higher level" languages for the Linux kernel. And it's not just because of size, but because the risks of hiding bugs combined with the nightmare of debugging the underlying code is so immense.

    2. Re:I wonder... by Anonymous Coward · · Score: 0

      If redial is such an important feature to you then why not add a shortcut to one of your homescreens, or even your dock, to 'redial last number'? That's even quicker than your 'boring but functional Blackberry'.

      I'm sorry, but I don't want my phone to be "boring, but functional".. I want something that I can customize and make my own, something that is powerful enough to do most of my lightweight computing tasks, and something that still works as a reliable phone when and how I want it to. You see, Android is only limited by how far you're willing to expand your knowledgebase. If you don't see someone else doing it, do it yourself. If someone is already doing it, use it and make it better.

    3. Re:I wonder... by JBMcB · · Score: 1

      And the poor compiler works overtime, because it has to redo the same work every time someone writes object.method().

      A larger problem is the hacked-up Java VM Google came up with to work around licensing problems with Sun/Oracle (fat lot of good that did them) Dalvik is a fairly poor implementation of a Java VM - on the same hardware the embedded version of Java runs much faster.

      I feel the OP's pain. I have a pretty fast android device (Archos 43) and the UI feels smooth about half the time, the other half it's flaky and unresponsive. My wife's iPod touch never so much as hiccups. I still use a cheapo feature phone as a cell - it just works.

      --
      My Other Computer Is A Data General Nova III.
    4. Re:I wonder... by wvmarle · · Score: 1

      I have the same issue with my smartphone. Considering buying a second phone, a more traditional "dumb phone", to go with it. My LG P500 has pretty poor sound quality even. For the rest it's a great device.

      That, and I don't understand why Android can't just read it's contacts from an LDAP server.

    5. Re:I wonder... by muridae · · Score: 1

      It's not just the OS, I believe. It's the whole kit that takes that long to build. Remember, there are all the debugging tools, the emulator, the virtual machine, the OS, and all the user interface goodies. In the OS you then have drivers for every different HDMI graphics chip that Android supports natively, drivers for the different radios, bluetooth, usb, drivers for the touch screens, sound chip drivers.

      How long does it take you to compile the whole linux kernel, not just the few parts you use?

      As for your problem with redial, I haven't seen it. I have accidentally redialed several people because the primary bluetooth headset button redials when you tap it twice. Had to learn to turn off the headset, because cats will find blinking blue lights and swat at them, calling all sorts of people in the middle of the night.

    6. Re:I wonder... by Anonymous Coward · · Score: 0

      It's Android. Why don't you put a phone dialer widget on your front screen for easy access rather then whining about it? Throw in an unlock-when-out-of-pocket app (either by prox or light sensors) if you really want to save pressing the physical button. That way, you just pull it out, and BAM, dialer right in front of you without pressing buttons. One virtual button to redial and you're done.

      Or buy an Android phone with a keyboard, so you can redial or assign contacts to each key -- never needing to go back into your contact list. =)

      Also, you might want to check your installed applications. My old Nexus One rarely, if ever, just randomly stops responding.

    7. Re:I wonder... by Daniel+Phillips · · Score: 1

      I have a pretty fast android device (Archos 43) and the UI feels smooth about half the time, the other half it's flaky and unresponsive.

      Building the whole UI in Java instead of just supporting Java applications was a completely stupid idea. I just wonder how long this mistake is going to last - less than forever? We can only hope.

      --
      Have you got your LWN subscription yet?
    8. Re:I wonder... by Asic+Eng · · Score: 1

      Well essentially you think of a smartphone as a phone which has grown into a fully fledged computer. It's probably the other way round - a smartphone is a pocket-sized ultra-portable computer, which also has a phone and a GPS built-in. You can make phone calls, but it's just one of many applications and not central to the device.

      There might be a market for a lite-phone which could be tethered to a smart phone via Bluetooth - easy to handle, but not able to make phone calls on it's own. A bit like an overgrown Bluetooth headset with some buttons.

    9. Re:I wonder... by Anonymous Coward · · Score: 0

      You mean, you actually use your android device to make phonecalls? That is so 2010.

    10. Re:I wonder... by Xugumad · · Score: 1

      > It's the laziness of programmers

      I used to think like that. Y'know what; I've got a limited number of productive hours in the week. I have vastly more feature requests than I have time (mine or my team's). I'm not abstracting it 7 layers deep for lolz, I'm doing it because it lets me keep each layer at something easier to grasp, and therefore less likely to have bugs in.

      There's a balance with these things always, but I object to the implication that developers get to decide between abstracting code, or having more free time.

      Also, this isn't the kernel we're talking about, this is the entire Android API (which I believe includes much of the JVM libraries in there as well as its own UI). Yes, it's really big.

  25. What's it doing in there? by Animats · · Score: 1

    What is it actually doing that needs 16GB of RAM to compile?

    1. Re:What's it doing in there? by Anonymous Coward · · Score: 0

      What is it actually doing that needs 16GB of RAM to compile?

      Read the article, please- the summary is shit.
      That RAM recommendation (NOT "requirement") is for if you don't have a SSD. That's how much you'll need to keep the whole compile running in RAM without paging to disk.

    2. Re:What's it doing in there? by swillden · · Score: 1

      What is it actually doing that needs 16GB of RAM to compile?

      Exploiting a great deal of parallelism and file caching to get the wall clock build time down to 25 minutes.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    3. Re:What's it doing in there? by swillden · · Score: 1

      What is it actually doing that needs 16GB of RAM to compile?

      Read the article, please- the summary is shit. That RAM recommendation (NOT "requirement") is for if you don't have a SSD. That's how much you'll need to keep the whole compile running in RAM without paging to disk.

      I don't think it's so much to eliminate paging as it is to enable lots of file caching.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  26. Re:Have I heard this before? by Anonymous Coward · · Score: 0

    Oh hay java has undocumented APIs: everything in sun.*. glibc has undocumented functions too.

    Just maybe android also has APIs that are implementation details too.

    But no, it must be a conspiracy, or they're just a bunch of mouthbreathing derps. Everyone on slashdot is always a superior genus of being who could do better if they lowered their mighty selves to bother.

  27. Finally, an answer! by 93+Escort+Wagon · · Score: 0

    Ice Cream Sandwich will need workstations with no less than 16 GB RAM to build the source code, twice the amount Gingerbread needed.

    I've been wondering, for quite a while, exactly what patents Microsoft seemed to believe Android infringes upon - but those memory requirements are definitely Microsoft-esque!

    And the Redmond folks have lots of prior art too...

    --
    #DeleteChrome
    1. Re:Finally, an answer! by Anonymous Coward · · Score: 0

      but those memory requirements are definitely Microsoft-esque!

      No, Microsoft have it backwards.

      Android needs lots of RAM to build but not that much to run. Microsoft doesn't need a lot of RAM to build but does need quite a lot to run.

  28. Re:Have I heard this before? by blackraven14250 · · Score: 1

    ....can't you believe that they're deliberately undisclosed because they don't want to support them in any fashion, as they stated?

  29. ps aux by tepples · · Score: 1

    The compiler has no visibility into whether the memory space it is executing in is actually mapped to physical ram.

    If the compiler doesn't know its own resident size, then how does top know the compiler's resident size, and how does ps aux know the compiler's resident size? I imagine that if a program detects that it's being swapped out, it might be able to adjust its CPU/memory tradeoffs at runtime.

    1. Re:ps aux by Anonymous Coward · · Score: 0

      Can you imagine? Different compiler output depending on how many background tasks you were running at the time, or how many files you decided to compile in parallel. How's that for reproducibility?

      No, compilers don't do that.

    2. Re:ps aux by Anonymous Coward · · Score: 0

      In theory this would be possible to do. It is to easy to get details about your allocated memory. However no software I know actually does it. Writing code in this manner would complicate it even further. Adobe Photoshop has/had (Don't know about now) 'swap' files which it used to manage memory but these were files it managed manually outside of the OS memory control.

    3. Re:ps aux by TheRaven64 · · Score: 1

      ps and top generally use platform-specific non-POSIX interfaces. They are written for the specific kernel, and use things like kvm or procfs to get that data. The compiler, in contrast, is expected to run on a large range of operating systems. There is also no standard way of the OS notifying processes that memory is low. OS X will deliver a message on a specific Mach port in this case, which makes it relatively easy to handle, but if you want this to work everywhere then it will need some effort (including modifying the kernel on many systems).

      --
      I am TheRaven on Soylent News
    4. Re:ps aux by tepples · · Score: 1

      Can you imagine? Different compiler output depending on how many background tasks you were running at the time

      I was referring to CPU/memory tradeoffs within the compiler that do not affect the generated code. Are you trying to say that these do not exist?

    5. Re:ps aux by tepples · · Score: 1

      ps and top generally use platform-specific non-POSIX interfaces.

      So does any GUI application. That's why applications have a small amount of special-case code to interact with each platform, and "estimate available memory" might be among this.

      The compiler, in contrast, is expected to run on a large range of operating systems.

      Including operating systems that don't support POSIX at all, such as DOS (DJGPP) and Windows (MinGW).

  30. Re:Have I heard this before? by darkonc · · Score: 2
    If the undocumented API changes or disappears, be ready to either (1) change your code, or (2) emulate the old API. Nothing nefarious -- just too damned lazy to document something that might be unstable.

    Human nature -- If you document it, people will expect it to be stable (no matter what you may say to the contrary). Undocumented API's have a built-in "we told you so" flavour to them.

    --
    Sometimes boldness is in fashion. Sometimes only the brave will be bold.
  31. Recompile only the parts that changed by tepples · · Score: 1

    Android has always been RAM-intensive, and it makes sense since you have no choice but to build an entire OS at once

    Can't you do the initial build overnight, come back the next day, do more development, and recompile only the parts that changed?

    1. Re:Recompile only the parts that changed by Rich0 · · Score: 1

      Yup.

      I was just getting at the fact that ultimately you have to build the whole thing since Android is all-encompassing. Linus can build his bleeding-edge kernel but then load it onto an Ubuntu box or whatever where everything else was pre-compiled. But, Android is a complete vertically-integrated package so you're basically building everything you find on the phone. Once you've done that of course you can just rebuild a single app or whatever it is that you've tweaked.

  32. So how long and what resources would win7 take? by Anonymous Coward · · Score: 1

    I know nothing about this sort of programming/compiling. :(

  33. Windows by file_reaper · · Score: 2

    I wonder how long a full compile of that takes...

  34. Why? by wisnoskij · · Score: 2

    Unless the entire program is in 1 gigantic 8 billion billion billion line file why would it need that many resources or even be able to use 16 GB of RAM?
    Assuming it is like a normal program would it not just be a large collection of relatively small files that are compiled one after the other (theoretically number of CPUs + 1 threads running at a time with that many files being compiled concurrently being the optimal solution)?
    And I just do not see how you could ever use up 16 GB at any one time.

    --
    Troll is not a replacement for I disagree.
    1. Re:Why? by JackAxe · · Score: 1

      Because every byte needs a bite of an icecream sandwich. :)

    2. Re:Why? by Anonymous Coward · · Score: 0

      ... Because if you don't have enough RAM to cache all the intermediate files the HDD will be the bottleneck -- that's why it says "16GB RAM recommended, more preferred, anything less will measurably benefit from using an SSD."

    3. Re:Why? by Anonymous Coward · · Score: 0

      No, the compiling itself is trivial. It is the linking that is eating resources, and that is hindered by the many small file paradigm.

    4. Re:Why? by Anonymous Coward · · Score: 0

      Linking. Pulling all of those relatively small files into one cohesive unit either requires a large lookup table in memory, or many many passes over lots of small files on disk.

    5. Re:Why? by Anonymous Coward · · Score: 0

      The more ram you have, the more you can avoid disk seeks which are slow.

    6. Re:Why? by Anonymous Coward · · Score: 0

      there are many more steps than compiling; you have optimizing and linking which are huge culprits and who knows what they may have enabled

    7. Re:Why? by Anonymous Coward · · Score: 0

      I think they move the whole source tree into RAM, and then work on that.

    8. Re:Why? by Darinbob · · Score: 1

      I have found that linkers are the biggest memory culprits in builds. This is especially true with very large static links. Even more so if you're using a lot of templates with C++. The GNU linker can be very bad at this.

    9. Re:Why? by Anonymous Coward · · Score: 0

      global program optimization -

      load up all the .o files at once, and trace all the code, and reroute them accordingly, to produce a globally optimized binary.

      takes alot of memory, especially for big/complex libraries (like an entire UI SDK and JVM-alike)

    10. Re:Why? by Anonymous Coward · · Score: 0

      template meta programming?

    11. Re:Why? by n7ytd · · Score: 1

      Unless the entire program is in 1 gigantic 8 billion billion billion line file why would it need that many resources or even be able to use 16 GB of RAM?
      Assuming it is like a normal program would it not just be a large collection of relatively small files that are compiled one after the other (theoretically number of CPUs + 1 threads running at a time with that many files being compiled concurrently being the optimal solution)?
      And I just do not see how you could ever use up 16 GB at any one time.

      That's the magic tingle of Android you're feeling...

  35. A good reason to look at D instead of C++ by Anonymous Coward · · Score: 0

    The D programming language compiles much faster than C++. It was designed to be easier to lex & parse. Maybe despite all the cool new features of the language (nice threading model, super-duper generic programming, optional garbage collection), something mundane as compilation speed will be the "killer feature" that gets people to migrate to D?

    1. Re:A good reason to look at D instead of C++ by Guy+Harris · · Score: 2

      The D programming language compiles much faster than C++. It was designed to be easier to lex & parse

      So how much of the compile time for C/C++ code is spent processing the characters in the source code and how much is spent processing the intermediate representation and turning it into machine code? If the answer is "most of the time is spent doing the latter", then "designed to be easier to lex and parse" doesn't help much.

      (And how much of Android is C/C++ and how much of it is in their Java dialect? How much of that time is spent translating C/C++ to machine code and how much of it is spent translating Java to Dalvik bytecode?)

  36. If memory were still expensive... by JackAxe · · Score: 3, Insightful

    This article would be shocking, but considering that 16 GB of memory -- especially the dual-channel DDR3 used for the i5 and consumer i7's -- is so cheap, less than $100, this article doesn't have any shock value. It's just informative. It's letting us know the 'recommended' memory and giving more nerds an excuse to add more RAM. That is the NERDS that don't already have 24 gigs for their virtual machines. :P

    1. Re:If memory were still expensive... by AHuxley · · Score: 1
      --
      Domestic spying is now "Benign Information Gathering"
    2. Re:If memory were still expensive... by Anonymous Coward · · Score: 0

      Well, that or an excuse for us poor Nerds to finally break down and get an SSD for our measly 12gig systems :D

    3. Re:If memory were still expensive... by Guy+Harris · · Score: 1

      http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx#physical_memory_limits_windows_7 No Windows 7 Home Premium OEM 16 GB cheap box for dev soon :)

      What's your definition of "cheap"? Yeah, Microsoft charges USD 200 for Windows 7 Home Premium retail, but HP's selling a 16GB system for $1,269.99 with Windows 7 Home Premium.

      Hell, if we don't require Windows, even the company everybody likes to beat up for making horrible overpriced machines will sell you a 16GB Core i5 iMac for USD 2100 (1TB disk rather than the 750GB disk on the HP, but a 2.7GHz quad-core Core i5 rather than a Core i7-2600 quad-core "up to 3.8GHz" with Turbo-Hydramatic, err, sorry, Turbo-Boost).

    4. Re:If memory were still expensive... by Anonymous Coward · · Score: 0

      Who actually uses Home versions and doesn't warez Ultimate or Enterprise?

    5. Re:If memory were still expensive... by Anonymous Coward · · Score: 0

      No it is shocking, prices of RAM do not change that. Saying it doesn't matter because of RAM prices is saying it doesn't matter you car slurps through 2 gallons of gasonline a mile because gasoline is only 2 cents a gallon (assuming gasonline would be cheap thus). The only thing that changes is that it makes it affordable...

      I have a 12G workstation running gentoo (you know, that distro that compiles everything from scratch. well almost everything, I always grab the binary for libreoffice). Anyways, I run a 10G tmpfs for /var/tmp/portage run multiple jobs at once (-j 5) and never had issues.

      Perhaps worth noting that I'm actually using (and thus consuming RAM) at those points too, meaning the 10G for tmpfs is far from available all the time. Did I mention the 10G is tmpfs? That means the compilers etc. still need RAM as well...

      Really curious why I can compile say, firefox (especially the new releases are shitty inefficiently considering resources on gentoo, something with linking issues I forgot... it needs to keep too much crap around during build anyways), X, kde, gcc, etc w/o much issues and a 'stupid' (trimmed down/slim/hopefully non-bloated) phone OS requires many multiples for it.

    6. Re:If memory were still expensive... by Agyani · · Score: 1

      ...people would think of using it wisely and on a 2GB laptop Firefox would not have sat with 900M

    7. Re:If memory were still expensive... by Darinbob · · Score: 1

      Cheap at home. But if you are at work and have a fixed budget it can be unaffordable.

    8. Re:If memory were still expensive... by Anonymous Coward · · Score: 0

      While I agree that really isn't a huge hardware expense, I still have to ask why? I'd love for someone to correct me but it seems like this is just complete and utter bloat of everything. This is an OS for devices running on 600MHz ARM processors with 512MB of RAM. Do we *need* that many things compiled in the "OS" that can't be installed as free apps? Does there *need* to be that much code to run a phone?

      I ask this in all sincerity. When I was doing my university studies, we compiled kernels and worked on architecture and homebrew projects on Pentium 4 machines with 512MB to 1GB of ram. What has changed in so few years to require 16-32x the amount of RAM and a huge step up in processing power?

    9. Re:If memory were still expensive... by Anonymous Coward · · Score: 0

      That amount of RAM isn't strictly necessary, just recommended. I do wonder if the amount of RAM is related to the number of core, as it would make sense that compiling on 2 cores would take twice the RAM as one core, and the recommended machine had 8 cores, so that is 2GB per core.

      It does seem excessive though, my desktop only has 4 GBs and 2 cores, and I don't intend to make it more than a quad-core with 8 GB when I upgrade.

  37. Precompiled headers by Anonymous Coward · · Score: 0

    Do they use precompiled headers? I've seen many open source projects neglecting or doing it poorly. It can make wonders.

  38. Re:Of Cou by badboy_tw2002 · · Score: 1

    You're completely wrong of course.. Rtfa and be a class act and admit your mistake. Otherwise you're just a common troll.

  39. Better than closed source by Anonymous Coward · · Score: 0

    No one will have the hardware to compile the source code.

    Do no evil?

    1. Re:Better than closed source by Guy+Harris · · Score: 1

      No one will have the hardware to compile the source code.

      Do no evil?

      As far as I'm concerned, demanding that all free software be simple enough that anybody could buy a machine capable of compiling it in a reasonable time isn't exactly evil, but it's massively assholic. "Free" doesn't mean "simple enough that a cheap machine can compile it in a reasonable amount of time".

      And, in any case, I wouldn't go so far as to say "no one will have the hardware to compile the source code".

  40. Just like doing an emerge world on Gentoo by dido · · Score: 1

    Note that this is the entire system, so building Ice Cream Sandwich from source is just like rebuilding an entire Linux distribution from scratch from the ground up, from the kernel down to the user tools and the windowing system, etc. If you've ever used Gentoo, this should sound familiar. I wonder if some of the tools that Gentoo users are familiar with to help speed along compilation, such as distcc, could help with this.

    --
    Qu'on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.
  41. Preprocessing gone wrong? by Frans+Faase · · Score: 1

    Is this a case of preprocessing gone wrong? Sometimes preprocessing can be a monster because it blows up each .c file into a monster file due to (almost) every .h file being included, which lead to long compile times. This is especially the case when you have large numbers of .c files. Preprocessing was invented as a hack in the time that memory too small for the whole source to be compiled in one time. But when applied to large systems, it causes the compile time to increase, because every piece of code in a .h files is compiled over and over again. I think that it is one of those hacks (short-cuts) that has gone wrong, because it is due to legacy very difficult to get rid of. The D language would be a good alternative, but translating all C code to equivalent D code is impossible. And I guess that in some case, such as operating systems deployed at multiple platforms, you do need conditional compiling, and I am not sure if that can be implemented with D.

    1. Re:Preprocessing gone wrong? by sgt+scrub · · Score: 1

      You can link to C code in D. The same is true with Go.

      --
      Having to work for a living is the root of all evil.
  42. no way by Anonymous Coward · · Score: 0

    That's complete bullshit. The numbers cited in the artical are from a file in the prebuilt directory describing who long it takes Google to build only the toolchain (gcc and stuff) .

  43. Java bloated? by Anonymous Coward · · Score: 0

    16G just to *compile*?

    I'm gonna slap the next java dude who even thinks of looking crosswise at a C++ programmer.

  44. 8-way parallel build? by peppepz · · Score: 1
    I guess this is just for doing a parallel build, isn't it? Building it with less parallelism will probably require less RAM (and understandably take longer).

    I am aware of GCC eating gigabytes when doing some kind of optimisations; this already used to happen some time ago, so I'm not surprised that running 8 copies of GCC in parallel might make some pages hit the swap on a non-ninja workstation.

    *If* this is the problem, then I don't see it as a immediate menace to the openness of Android. I remember when compiling the Linux kernel took hours on my Pentium 2. Compiling GCC or Qt still takes half a day on my Pentium IV. I don't expect anything different from a user-oriented machine.

    1. Re:8-way parallel build? by Daniel+Phillips · · Score: 1

      I remember when compiling the Linux kernel took hours on my Pentium 2.

      Interesting. It never took longer than about 20 minutes for me, usually building Linus's defaults.

      --
      Have you got your LWN subscription yet?
    2. Re:8-way parallel build? by peppepz · · Score: 1
      I used to build everything as a module, even stuff I would never need. The PC was a 266 MHz klamath P2 with 64 MB of RAM. And I kept it for a long time, even when most people had upgraded to Pentium IIIs or Pentium IVs. Perhaps I remember the experience of compiling P4-era kernels on a P2 machine.

      I do remember that building the kernel wasn't particularly long, in comparison to building Qt or bootstrapping GCC (with all languages).

  45. SB Notebook processors support more than 8GB by Sycraft-fu · · Score: 1

    They have the same memory controller as the desktop units. Now if your notebook only has 2 slots, as is common, then 8GB is all you can get cheaply since 8GB chips are high priced and you'd need 2 of them for 16GB.

    1. Re:SB Notebook processors support more than 8GB by peppepz · · Score: 1
      I just checked the official ark page for my SB processor and in fact now it says that 16 GB are supported ("depending on memory type"). It has been updated, it just said 8 GB before. Well, good news, thanks.

      (16 GB is still the maximum amount of memory supported so I still think it's a big deal somehow ;) ).

  46. ./ summaries.. by Anonymous Coward · · Score: 0

    Have they always been this bad and I've just never realised? The ammount of plainly wrong summaries on here is far too high these days. Please editors, do something about this.

  47. Next thing you know.... by Anonymous Coward · · Score: 0

    I can envision the future. Developing for the free and open Android platform will only be possible on Google's developer server farms, after you have pledged your firstborn, registered all your personal data up to and including your great grandmother's maiden name, and ceded all rights to every byte of your sources to the company that does no evil. But it will be totally free...

  48. 14GIG ram DISK by cheekyboy · · Score: 0

    and they compile the source in ram.

    Seriously, if caches worked that great, gcc would precache all needed includes and .cpps in ram, then compile, with the harddisk not even raising a watt.

    gcc is dumb, its a per file compiler, not a heres my project tree, go figure it out dumbass.

    relying on scripts such as make to farm out multiple gcc execs is so 1970s.

    Come on GCC, process real project files for once.

    It seriously needs rethink of architecture.

    Cya in 2020 when they have done it, 5 years after MS in 2015.

    --
    Liberty freedom are no1, not dicks in suits.
    1. Re:14GIG ram DISK by t2t10 · · Score: 1

      Come on GCC, process real project files for once.

      Sorry, but C/C++ isn't designed for "project files" or the kinds of build systems that MS has been trying to shoehorn those languages into. That is a problem with C/C++ (and a real and serious one at that). But you can't fix it in the compiler or IDE without breaking the language. The next C++ language standard will hopefully address it.

      Cya in 2020 when they have done it, 5 years after MS in 2015.

      Microsoft... proudly popularizing dumb ideas since 1980.

    2. Re:14GIG ram DISK by TheRaven64 · · Score: 1

      Uh, C and C++ are per-file languages. That said, GCC (and clang) do support precompiled headers, which seem to be what you are rambling about. If you have a project header, you can pre-parse it and automatically add it to the start of every source file pretty trivially.

      --
      I am TheRaven on Soylent News
  49. It isn't the deployed norm by Sycraft-fu · · Score: 1

    But my point is it really could be. The main reason it isn't is lack of need. 4GB is fine for most things, particularly since many things are still 32-bit. However the fact remains that you can now stick 16GB on a standard desktop board, and do so cheaply. That is what makes it a "mainstream desktop" amount of RAM. You don't have to buy a special system with high end parts to be able to get it, nor do you have to spend much on the RAM itself. Anyone who has a modern (meaning Sandy Bridge) chip can have 16GB easily if they wish.

    Compare this to 32GB or 64GB. 32GB IS attainable on standard hardware, but is exceedingly expensive. It would be about $800-1000. That is for $150 boards with $200 processors. As such, out of range in any reasonable sense. It is a very high end thing to have.

    64GB is even more high end. At this point, no desktop component works (until the SB-E series comes out). You have to buy workstation/server class boards and Xeon processors. Right there you are talking a ton more money. You also have to use registered memory, which costs more. This is very much a high end only situation.

    That is why I maintain it isn't that high end anymore. When you can knock it on to a regular board, the kind of thing you get in cheap Dell or Lenovo systems, and when the cost is minimal, just two games, it really isn't high end. It is perfectly attainable for regular users, if there's a need.

    1. Re:It isn't the deployed norm by webheaded · · Score: 1

      I'm not entirely sure you could fit that onto a Dell board but perhaps. Of course, those 8gb memory sticks are probably rather expensive. Most of those damn OEM boards give you like 1 PCI slot and maybe 2 memory slots. I mean I get your point. I still think you are equating easily attainable with it being the standard which I think is off but really that is just semantics now. Perhaps it is not super high end anymore, but it is still more than most people spend. Then again...man...I see $100 for a pack of Corsair memory for 16gb. Really makes me wish my board was DDR3. :(

      --
      "Those who would sacrifice essential liberties for a little temporary safety deserve neither liberty nor safety." - BenF
    2. Re:It isn't the deployed norm by Darinbob · · Score: 1

      A lot of corporations have roughly a 5 year replacement cycle for computers, even in R&D. Sometimes if the company isn't flush in cash they will have a lot of even older computers around still doing vital jobs. What is affordable in a new home computer today may not be affordable in the corporate world. People have to work within budgets.

    3. Re:It isn't the deployed norm by petermgreen · · Score: 1

      You also have to use registered memory, which costs more

      While 4G registered ECC modules are more expensive than 4GB desktop (unregistered NON-ecc) modules the opposite is true for 8GB modules. 8GB desktop modules are arround $200 each while 8GB registered ECC modules are arround $100 each.

      What is really annoying is that afaict NO LGA1155 processors (not even the xeons) support registered memory, and 8GB unregistered ECC modules seem virtually non-existent.

      64GB is even more high end. At this point, no desktop component works (until the SB-E series comes out). You have to buy workstation/server class boards and Xeon processors. Right there you are talking a ton more money. You also have to use registered memory, which costs more. This is very much a high end only situation.

      It really depends on what your priorities are. You can get a CPU+MB+64GB of ram for arround $1300 ($800 for memory, $250 for CPU, $250 for MB) by going socket G34 but you end up with a CPU that will be shitty at low thread count tasks.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  50. But I have an iPhone.. by Anonymous Coward · · Score: 0

    How much memory do I need to recompile iOS?

  51. Re:Of Cou by CubicleView · · Score: 1

    I won't argue what he will or won't be if he doesn't kowtow to you, but your post is far more trollish.

  52. 16GB of RAM? 0.o by Kaldesh · · Score: 1

    So.... I can develop for Android ICS. Now! Just to learn Java! *coughs*

  53. Not compiling the OS by sgt+scrub · · Score: 1

    If you built the kernel, all libraries, X, gnome, and all default applications for gnome in parallel you could see a comparison. So you should. That is what they are doing. They are not compiling the OS. They are compiling the entire AOSP.

    --
    Having to work for a living is the root of all evil.
  54. Moderation by space_jake · · Score: 1

    Do it too fast and you'll get an ice cream headache.

  55. It worked for Connectix by tepples · · Score: 1

    yea if you want the overhead of compression / decompression on top of virtual memory.

    At least in the Mac OS 7 days, replacing some hard disk accesses with LZ compression/decompression operations was a net win. This is why Connectix introduced RAM Doubler, the first compressed virtual memory manager for a home computer. How has this tradeoff changed meaningfully since then?

    if you were IN CHARGE what would you want? your devs sissy slapping cause everything is in (compressed) swap or 100 bucks in ram?

    The motherboard of the PC I'm typing this on doesn't have slots for 100 bucks in RAM. So I'd need a new motherboard, a new CPU, and possibly a new copy of some operating system whose license is tied to the motherboard. This might run a bit more than $100. Or by "IN CHARGE" did you mean "money is no object"?

  56. Show me your work! by EETech1 · · Score: 1

    Can I see the math? Even rounding up to 30 minutes wall time on 8 CPUs would only get you a maximum of 4 hours CPU time. Unless I'm missing something?

    1. Re:Show me your work! by canajin56 · · Score: 2

      Hyperthreading! With 8 physical cores, the OS sees 16 logical cores. 16 threads can be running at once. Though technically only 8 are running because there aren't extra copies of the adders, multipliers, etc, whenever one is waiting on memory, or stalled because a branch miss-prediction emptied the pipeline, etc. then the other thread can run instantly. Normally it's stupid to context switch due to a branch error or cache miss, since probably that will be resolved before you can finish the very expensive context switch operation. Having two sets of registers and such allows for instant switching between which of the two logical cores is being handled by the physical core, so any time either thread is waiting on memory, the other thread can get some work done. And whenever it's stalled on something that actually would require a context switch normally, it can be handed off to the other one while that switch is occurring. It's not nearly as good as having 16 physical cores, but usually you get about 30% more CPU time squeezed in be doing this. 4 hours * 1.30 = 5.2 hours. Seems consistent to me.

      --
      ASCII stupid question, get a stupid ANSI
    2. Re:Show me your work! by compro01 · · Score: 1

      The Xeon E5620 CPU they specify does hyperthreading (8 cores + 8 virtual cores). Hyperthreading really shines on compilation, so that's probably where the extra CPU time comes from.

      --
      upon the advice of my lawyer, i have no sig at this time
    3. Re:Show me your work! by EETech1 · · Score: 1

      Thanks for the reply. I guess I was going off the assumption that 1 hour of wall time == 1 hour of 1 CPUs time @ 100% utilization. While hyperthreading may allow the CPU to achieve higher throughput than without it, it seems odd that it could allow for 130% utilization.

      Is that 1.3X factor commonly used when converting CPU time to wall time on a hyperthreading setup?

      Will the CPU time calculations in your system monitor of choice reflect this difference when compared on similar CPUs with and without hyperthreading?

      With everything else that is going on behind the scenes to shuffle data around, and keep the system running (OS) it is amazing that every single computing resource available would spend 130% of its time compiling! Does the CPU time calculation assume (or calculate) some overhead for the OS and everything else (task switches, IO, waiting) it has to do so that CPU time is more an approximation of what should be left available for applications instead of the raw percentage of the actual clock cycles used?

      Thanks again!

  57. Not all machines in use were built this year by tepples · · Score: 1

    If one builds a highly memory-constrained machine on purpose

    Not all machines in use were built this year. An existing PC motherboard designed to take 32-bit CPUs can't be upgraded to 4 GB, let alone 16 GB.

    (only installing 1GB RAM for a Android build machine, for example)

    Then I guess that kills the project to make Android self-hosting ;-)

  58. Grow a pair by Anonymous Coward · · Score: 0

    'In almost every case, there's only one reason for leaving APIs undocumented: We're not sure that what we have now is the best solution, and we think we might have to improve it, and we're not prepared to make those commitments to testing and preservation. We're not claiming that they're "Private" or "Secret" — How could they be, when anyone in the world can discover them? We're also not claiming they're forbidden: If you use them, your code will compile and probably run.'"

    ... and clearly tell people DO NOT USE them if they wont take technical measures to prevent it. They are inviting trouble with this attitude.

  59. Good news! by ArAgost · · Score: 1

    Does this mean they'll be releasing the source code?

  60. So you could use by Quila · · Score: 1

    A Core 2 Duo with 4 GB RAM, but you'll be waiting forever.

    Just like with games, there's minimum specs that technically will work, just nobody's going to be happy with it. This is recommended specs, what the average developer could be happy with.

  61. likely has to do with page cache by Chirs · · Score: 1

    Noting the comment that anything less than 16GB would benefit from an SSD, I suspect the issue is that there are many small files and so the seek latency of spinning disks are what causes the pain.

    It should work just fine, might take twice as long though. (Which is still not bad, our whole system takes many hours to build because we're basically building up a whole distro for multiple architectures and machine types.)

  62. Gingerbread builds in less than 30 min for me by Technomancer · · Score: 1

    I build Gingerbread for single device (CM7.1 to be specific) pretty often and it takes 20+ minutes to build.I use quad core Phenom 955, 8GB RAM and SSD.
    Somehow I doubt ICS will need considerably more time to build.
    I know people are building Android in reasonable time on lesser spec machines.
    This is probably a spec of shared build server they use at Google.

  63. My bet is on disk cache by Anonymous Coward · · Score: 0

    Having just knocked together a "cheap" machine with 16GB of RAM, I can see i hardly ever use any of it for applications as such, but my machine sure uses every byte of it (nearly) as disk cache. By Cheap, I mean basic graphics, mid range CPU, reasonable HDD size and speed (no high end stuff - just a nicely balanced dev/vm box)

    I'm guessing that the "16GB RAM recommended, more preferred, anything less will measurably benefit from using an SSD" line is saying "if you can't cache it all, you're gonna need an SSD". As it churns through the build, a heap of (read only) files will be accessed over and over, and if you can keep that in RAM, things go massively faster.

  64. Totally agree, mod parent up! by Anonymous Coward · · Score: 0

    Yes, I believe it's time Android had an official package management architecture + repository of some sort.

  65. Not so surprising by Anonymous Coward · · Score: 0

    Open Source code for big projects is big and messy - no surprises there.
    It's how it gets on to agile end-user devices, like smart phones that is interesting - and open source solutions have NO answer to that: most of smartphone manufacturers are busy at researching, developing and deploying fast and efficient run-time engines, often proprietary (no surprise there either - R&D costs real money) - open source stuff coming down the pipe (whether delivered by web pages or on device) just aren't efficient delivery mechanisms. Smartphones for example get their agility through highly efficient, binary and proprietary code running on limited hardware.
    If people think that running such bloated code on the PC is the vision of tomorrow - dream on

  66. BEAST! by Oren+Krishman · · Score: 1

    So basically they need a BEAST