> 1 GB RAM on a 32-bit system

By: JasonB (no.delete@this.spam.com), May 13, 2007 6:37 pm
Room: Moderated Discussions
Linus Torvalds (torvalds@osdl.org) on 5/13/07 wrote:
---------------------------
>So Linux defaults to giving user space 3GB, and just 1GB
>for the kernel. That's basically the "user space is more
>important in the end" version. I think WinXP does a 2:2GB
>split.

That's the default, you can tell it to do a 3:1GB split using the /3GB boot switch. The developers of the application also need to flag it as being capable of using more then 2GB of virtual address space (i.e. they didn't do anything silly like assume pointers were equivalent to 32 bit signed integers) by setting the /LARGEADDRESSAWARE linker flag. (The flag can actually be set in the executable by anybody using a simple tool that comes with Visual C++ but only the developers would know whether it's safe or not.)

Executables with /LARGEADDRESSAWARE set can use 4GB of RAM under 64 bit Windows, which is nice.

>It also needs to map in PCI memory-mapped stuff etc, so in
>practice, it's actually less than that.

Especially when you have video cards with 512MB of RAM in notebooks these days!

>>So, in practical terms, is there benefit from using
>>64-bit OS on a machine with, lets say, 2-3 GB RAM ?
>
>Absolutely. No question what-so-ever. If you have 2GB
>of RAM on a 64-bit architecture, you can access it all
>easily in the kernel, and none of it is limited to just
>some special use. And a single big process can also use
>it effectively at the same time, so a database can
>actually have it all mapped without having to play
>windowing games in user space either.

I agree 100%, even if you are using 32 bit applications! Under 32 bit XP, our software will start having problems allocating more memory once its total footprint exceeds 1.2-1.5GB (the actual amount varies, I believe due to the degree of virtual addess space fragmentation).

That exact same 32 bit software will happily use well over 2GB of RAM on the same PC under XP x64 or 64 bit Vista. I haven't done any testing to confirm this, but I also get the feeling that the performance is significantly higher as well -- memory allocations start to take a long time when the OS is struggling to cram things into a 2GB virtual address space.

It's important to note that the working set can be only a tiny fraction of the total address space that the application is using. When you have large address spaces you can start memory-mapping big files (so you can let the MMU hardware determine which bit of data you're using rather than trying to guess and pull it in manually in software) and do all sorts of other nice tricks that simplify code. The total footprint can be far in excess of the physical memory in the system without any slowdown, as long as the working set remains below the physical memory limit.

As soon as we can assume that all of our customers who want to deal with large data sets are going to be running on a 64 bit OS, we can clean up a lot of code, simplifying a lot of things. This is good for end-users because not only will the code run faster, but it is also less likely to be buggy, and because we will have to spend less time debugging we can spend more time adding new features or further performance enhancements.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Rock/Tukwila rumorsmas2007/05/05 12:59 PM
  Rock/Tukwila rumorsDavid Kanter2007/05/05 02:33 PM
    Rock/Tukwila rumorsDean Kent2007/05/05 03:35 PM
      K8 vs Win64 timelineanonymous2007/05/05 06:19 PM
        Yes, I misremembered...Dean Kent2007/05/05 10:03 PM
    RockDaniel Biz√≥2007/05/06 02:34 AM
      RockDean Kent2007/05/06 07:11 AM
    Rock/Tukwila rumorsJoe2007/05/06 11:24 AM
      Rock/Tukwila rumorsDean Kent2007/05/06 11:49 AM
      Rock/Tukwila rumorsLinus Torvalds2007/05/06 12:09 PM
      Rock/Tukwila rumorsanon2007/05/07 01:32 AM
        Rock/Tukwila rumorsRakesh Malik2007/05/07 09:36 AM
          Rock/Tukwila rumorsMichael S2007/05/07 10:06 AM
          Rock/Tukwila rumorsanon2007/05/07 09:48 PM
            Rock/Tukwila rumorsRakesh Malik2007/05/08 06:45 AM
              Rock/Tukwila rumorsanon2007/05/08 05:30 PM
                Wow. (nt)Brannon2007/05/08 06:16 PM
                Rock/Tukwila rumorsrwessel2007/05/08 09:48 PM
                  Rock/Tukwila rumorsJS2007/05/08 10:07 PM
                    Rock/Tukwila rumorsJS2007/05/09 06:44 AM
                Rock/Tukwila rumorsRakesh Malik2007/05/09 05:35 AM
                  Much ado about xMichael S2007/05/09 09:39 AM
                    Call it x86-64Linus Torvalds2007/05/09 10:27 AM
                      (i)AMD64Michael S2007/05/09 12:16 PM
                        (i)AMD64Linus Torvalds2007/05/09 12:29 PM
                          (i)AMD64Groo2007/05/09 04:45 PM
                          TIFNAAanonymous2007/05/09 05:49 PM
                            Inspired by FYR Macedonia? (NT)Michael S2007/05/09 11:21 PM
                              More likely...rwessel2007/05/10 12:39 AM
                            TIFNAAGabriele Svelto2007/05/09 11:57 PM
                          (i)AMD64James2007/05/10 02:27 AM
                        i86Dean Kent2007/05/09 12:30 PM
                        (i)AMD64Max2007/05/09 01:28 PM
                          wide86? long86?hobold2007/05/10 05:05 AM
                            x87 perhaps, it is one more. :) (NT)Groo2007/05/10 05:50 AM
                              x86+Dean Kent2007/05/10 08:44 AM
                                Does it really matter?Doug Siebert2007/05/10 09:10 AM
                                  let's stay with x86-64 for now, pleaseMarcin Niewiadomski2007/05/10 11:50 AM
                                    let's stay with x86-64 for now, pleaseDean Kent2007/05/11 06:11 AM
                                      let's stay with x86-64 for now, pleaserwessel2007/05/11 02:46 PM
                                        let's stay with x86-64 for now, pleaseDean Kent2007/05/11 06:03 PM
                                          let's stay with x86-64 for now, pleaseMichael S2007/05/12 10:49 AM
                                            let's stay with x86-64 for now, pleaseDean Kent2007/05/12 01:05 PM
                                              let's stay with x86-64 for now, pleaseMichael S2007/05/12 01:25 PM
                                                let's stay with x86-64 for now, pleaseDean Kent2007/05/12 03:39 PM
                                                  let's stay with x86-64 for now, pleaseJasonB2007/05/13 07:43 AM
                                                    client consolidationMichael S2007/05/13 08:37 AM
                                                  let's stay with x86-64 for now, pleaseTzvetan Mikov2007/05/13 03:44 PM
                                                let's stay with x86-64 for now, pleaserwessel2007/05/14 02:42 PM
                                      What's your point?Doug Siebert2007/05/11 02:56 PM
                                        What's your point?Linus Torvalds2007/05/11 04:15 PM
                                          What's your point?Doug Siebert2007/05/13 03:11 PM
                                            What's your point?Dean Kent2007/05/13 07:04 PM
                                              What's your point?JasonB2007/05/14 02:06 AM
                                                What's your point?Dean Kent2007/05/14 07:20 AM
                                                  What's your point?JasonB2007/05/14 04:35 PM
                                                  What's your point?JasonB2007/05/14 07:35 PM
                                                    What's your point?Dean Kent2007/05/14 08:12 PM
                                        What's your point?Dean Kent2007/05/11 06:06 PM
                                        What's your point?Stephen H2007/05/13 01:55 AM
                                          Why didn't MS take advantage of PAE?David W. Hess2007/05/13 08:37 AM
                                            PAE sucks (Why didn't MS take advantage of PAE?)Linus Torvalds2007/05/13 10:20 AM
                                              PAE sucks (Why didn't MS take advantage of PAE?)Dean Kent2007/05/13 10:49 AM
                                              PAE sucks (Why didn't MS take advantage of PAE?)David W. Hess2007/05/13 12:37 PM
                                              > 1 GB RAM on a 32-bit systemTzvetan Mikov2007/05/13 01:44 PM
                                                > 1 GB RAM on a 32-bit systemS. Rao2007/05/13 03:00 PM
                                                  > 1 GB RAM on a 32-bit systemTzvetan Mikov2007/05/13 05:32 PM
                                                    > 1 GB RAM on a 32-bit systemS. Rao2007/05/14 12:19 AM
                                                > 1 GB RAM on a 32-bit systemLinus Torvalds2007/05/13 03:46 PM
                                                  > 1 GB RAM on a 32-bit systemTzvetan Mikov2007/05/13 05:23 PM
                                                  > 1 GB RAM on a 32-bit systemJasonB2007/05/13 06:37 PM
                                                    Windows manages memory differentlyTzvetan Mikov2007/05/13 08:31 PM
                                                      Windows manages memory differentlyJasonB2007/05/14 01:50 AM
                                                        Windows manages memory differentlyTzvetan Mikov2007/05/14 08:56 AM
                                                          Windows manages memory differentlyrwessel2007/05/14 03:40 PM
                                                            Windows manages memory differentlyDavid W. Hess2007/05/14 04:07 PM
                                                              Windows manages memory differentlyrwessel2007/05/14 04:51 PM
                                                            Windows manages memory differentlyTzvetan Mikov2007/05/14 05:40 PM
                                                              Windows manages memory differentlyrwessel2007/05/14 06:09 PM
                                                      Windows manages memory differentlyHoward Chu2007/05/14 11:17 AM
                                                        Windows manages memory differentlyJukka Larja2007/05/14 11:30 AM
                                                        Windows manages memory differentlyTzvetan Mikov2007/05/14 01:54 PM
                                                          Windows manages memory differentlyHoward Chu2007/05/15 03:35 AM
                                                            Windows manages memory differentlyGroo2007/05/15 07:34 AM
                                                      Anyone know what OS X (10.4, Intel, desktop) does?Matt Sayler2007/05/15 06:23 AM
                                                        Anyone know what OS X (10.4, Intel, desktop) does?Wes Felter2007/05/15 08:37 AM
                                                        Anyone know what OS X (10.4, Intel, desktop) does?Anonymous2007/05/15 10:49 AM
                                                        Anyone know what OS X (10.4, Intel, desktop) does?anon22007/05/15 07:13 PM
                                              PAE sucks (Why didn't MS take advantage of PAE?)Paul2007/05/13 03:40 PM
                                                PAE sucks (Why didn't MS take advantage of PAE?)Peter Arremann2007/05/13 05:38 PM
                                                  PAE sucks (Why didn't MS take advantage of PAE?)Henrik S2007/05/14 03:31 AM
                                              The fragility of your argumentslacker2007/05/13 03:56 PM
                                                The fragility of your argumentnick2007/05/13 05:42 PM
                                                The fragility of your argumentHoward Chu2007/05/14 02:52 AM
                                                  The fragility of your argumentDean Kent2007/05/14 09:19 AM
                                                The fragility of your argumentanon22007/05/14 08:26 AM
                                                  The fragility of your argumentTzvetan Mikov2007/05/14 09:01 AM
                                                  The fragility of your argumentDean Kent2007/05/14 09:16 AM
                                                    The fragility of your argumentLinus Torvalds2007/05/14 11:57 AM
                                                      The fragility of your argumentJasonB2007/05/14 04:48 PM
                                                        The fragility of your argumentDean Kent2007/05/14 07:36 PM
                                                          The fragility of your argumentRicardo B2007/05/16 02:40 AM
                                                            The fragility of your argumentDean Kent2007/05/16 03:32 AM
                                                              The fragility of your argumentRicardo B2007/05/16 06:41 AM
                                                                PSRicardo B2007/05/16 06:50 AM
                                                                The fragility of your argumentDean Kent2007/05/16 09:07 AM
                                                                  Modern web browsingS. Rao2007/05/16 09:16 AM
                                                                    Aha!Dean Kent2007/05/16 09:27 AM
                                                                      Aha!Dean Kent2007/05/16 09:32 AM
                                                                        Aha!S. Rao2007/05/16 10:34 AM
                                                                  The fragility of your argumentRicardo B2007/05/16 10:00 AM
                                                      The fragility of your argumentVincent Diepeveen2007/05/16 10:10 AM
                                                        The fragility of your argumentPaul2007/05/16 03:01 PM
                                                          The fragility of your argumentVincent Diepeveen2007/05/17 03:05 AM
                                                    The fragility of your argumentanon22007/05/15 01:35 AM
                                                    Splits vs page allocations?Matt Sayler2007/05/15 07:33 AM
                                          What's your point?Michael S2007/05/13 08:55 AM
                                            What's your point?anonymous2007/05/13 11:08 AM
                                              What's your point?Michael S2007/05/13 11:31 AM
                                      let's stay with x86-64 for now, pleaseJasonB2007/05/13 07:16 AM
                                x864 =) (NT)some12007/05/15 03:03 AM
    Rock/Tukwila rumorsIntelUser20002007/05/06 02:27 PM
  Rock/Tukwila rumorsm2007/05/13 08:05 AM
  Rock/Tukwila rumorsmas2007/05/15 09:40 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell green?