MikeM97 Posted July 8, 2015 Share Posted July 8, 2015 Why does its 64 bits version shows 3,9 GB of RAM instead of 4 (as I have on Windows)? Link to comment Share on other sites More sharing options...
Skiver Veteran Posted July 8, 2015 Veteran Share Posted July 8, 2015 I think you need to explain a little more. You've download a 3.9 (ISO I assume?) which is 3.9GB however you were expecting 4 because of? I'm not sure where Windows comes into this? Link to comment Share on other sites More sharing options...
B.Jay Posted July 8, 2015 Share Posted July 8, 2015 The amount of system RAM you've been presented with depends on the program you use... 3.9GB when there are 4GB installed is about right. The kernel actually reserves a chunk of your RAM for itself, so that usually gets subtracted from the "available memory" (that's the value you see there, most likely). That being said ... if you want to make sure all your installed RAM was actually correctly accounted for: - Open a Terminal - Type "free -m" - In the first line ("Mem:"), the first value under the "total" column should actually reflect your 40xxKB RAM (and keep in mind that this can also slightly differ depending on your BIOS/UEFI firmware). This is actually the value and result you should trust - most programs will most likely only give you the value for the available memory (after subtracting the kernel reserved space and other stuff reserved for the system). EDIT: On a additional note: If you have some kind of onboard graphics that takes a chunk of your system memory as its graphics RAM - that will also be subtracted from the "available memory". The "available memory" value is actually the thing that matters to programs when they want to allocate memory - so displaying the available memory versus the installed memory (like Windows does in the System control panel) is, per se, the right thing to do to tell the user how much RAM he has left to mess with. If Windows would be frank, you would see even less available memory as Windows easily eats up 700MB+ after booting it up (plain Windows, no additional crap autostarting). However, one can argue about the "which value is the right one to display to the user" till kingdom come. Link to comment Share on other sites More sharing options...
MikeM97 Posted July 8, 2015 Author Share Posted July 8, 2015 3950 1785 2164 93 213 868 -/+ buffers/cache: 703 3246 Swap: 0 0 0 ubuntu@ubuntu:~$ In Windows,instead of 3950 I'd have 4096. Link to comment Share on other sites More sharing options...
B.Jay Posted July 8, 2015 Share Posted July 8, 2015 Still, the value is about right for 4GB total memory. The kernel needs a chunk of the RAM to run in - like it or not. Also .. "0" swap? I would actually re-install WITH a dedicated swap partition (either make it a bit larger than your RAM, like 4.2GB, or go RAM*2). You could also add and use a swapfile, though "Hibernate"/"Suspend to RAM"/"Suspend to HDD" will _not_ work with a swapfile (or a swap partition that is too small). Edit: OH WAIT: I totally missed the "Live" in the topic title. @.@ Okay, no swap is therefore completely fine - and the live system will also "eat up" a bit more memory due to the kernel not being able to free up the memory for the "initial ramdisk" because the live system needs actually to be hooked into there. Link to comment Share on other sites More sharing options...
MikeM97 Posted July 8, 2015 Author Share Posted July 8, 2015 So,can't I do anything about it? (to increase it to 4?) Link to comment Share on other sites More sharing options...
B.Jay Posted July 8, 2015 Share Posted July 8, 2015 See the edit in post #5 above ... the live system needs a little bit of extra RAM for the initrd into which the live-system hooks into. On a real installation you will see a bit more free memory (should be above 4000) as the kernel can free up that space once the boot sequence leaves the initrd and carries on booting from the root filesystem on the hard drive. Link to comment Share on other sites More sharing options...
exotoxic Posted July 8, 2015 Share Posted July 8, 2015 Windows doesn't have exactly 4GB either (even if properties shows it does) Link to comment Share on other sites More sharing options...
MikeM97 Posted July 8, 2015 Author Share Posted July 8, 2015 See the edit in post #5 above ... the live system needs a little bit of extra RAM for the initrd into which the live-system hooks into. On a real installation you will see a bit more free memory (should be above 4000) as the kernel can free up that space once the boot sequence leaves the initrd and carries on booting from the root filesystem on the hard drive. OK,I'll be back with an update. Installed as main OS,just Ubuntu. Still 3,9. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted July 8, 2015 Veteran Share Posted July 8, 2015 Still, the value is about right for 4GB total memory. The kernel needs a chunk of the RAM to run in - like it or not. Also .. "0" swap? I would actually re-install WITH a dedicated swap partition (either make it a bit larger than your RAM, like 4.2GB, or go RAM*2). You could also add and use a swapfile, though "Hibernate"/"Suspend to RAM"/"Suspend to HDD" will _not_ work with a swapfile (or a swap partition that is too small). Edit: OH WAIT: I totally missed the "Live" in the topic title. @.@ Okay, no swap is therefore completely fine - and the live system will also "eat up" a bit more memory due to the kernel not being able to free up the memory for the "initial ramdisk" because the live system needs actually to be hooked into there. Ubuntu will auto disable swap if you have over 3gb of Ram also its a live system also to the question It's a "how you count it" issue, similar to what you find with hard disk drives. You undoubtedly have more than 4,000,000,000 bytes of memory. Do Alt-F2 "kinfocenter" without the quote marks, and click "memory" to check it. Divide that by 1024 and that's how many kilobytes you have. Divide the number of kilobytes by 1024 and that's how many megabytes you have. Divide the number of megabytes by 1024 and that's how many gigabytes you have -- and probably the number that you're seeing due to being a live system the system itself will be there in ram too MikeM97 1 Share Link to comment Share on other sites More sharing options...
n_K Posted July 8, 2015 Share Posted July 8, 2015 Ubuntu will auto disable swap if you have over 3gb of Ram also its a live system Doubtful (in terms of an installed OS not a live OS), if you don't have a swap and your system gets close to 3GB of RAM usage (if you only had 3GB) then you'd suddenly see programs vanishing or X11 would crash. Also remember that you will not ever have 4096MB of memory - BIOS takes some memory and if you have an onboard video card that will also take additional memory. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted July 8, 2015 Veteran Share Posted July 8, 2015 Doubtful (in terms of an installed OS not a live OS), if you don't have a swap and your system gets close to 3GB of RAM usage (if you only had 3GB) then you'd suddenly see programs vanishing or X11 would crash. Also remember that you will not ever have 4096MB of memory - BIOS takes some memory and if you have an onboard video card that will also take additional memory. yes i know how swap works and what its for what i said was that if you have more than 3gb of ram Ubuntu WILL NOT create a swap partition automatically Link to comment Share on other sites More sharing options...
n_K Posted July 8, 2015 Share Posted July 8, 2015 yes i know how swap works and what its for what i said was that if you have more than 3gb of ram Ubuntu WILL NOT create a swap partition automatically I guess for the majority of people using ubuntu if all they're doing is web/email/music then it doesn't matter, but for anything more... I'm surprised ubuntu would do that, it's one of the most stupid ideas I've seen. Heck, even windows won't let you get away without virtual memory, you can set it to 0 and it'll ignore you and create a minimum size pagefile regardless. Link to comment Share on other sites More sharing options...
simplezz Posted July 8, 2015 Share Posted July 8, 2015 I guess for the majority of people using ubuntu if all they're doing is web/email/music then it doesn't matter, but for anything more... I'm surprised ubuntu would do that, it's one of the most stupid ideas I've seen. Heck, even windows won't let you get away without virtual memory, you can set it to 0 and it'll ignore you and create a minimum size pagefile regardless. It's not stupid at all. Creating a swap partition (virtual memory) is a complete waste of time for people with lots of memory. The only reason Windows wants you to have one is because for some bizarre reason some applications expect one or something along those lines. You can still remove it though. I did. The fact of the matter is, once you run out of memory, you should free some up, not rely on a really slow disk based buffer that slows the system to a crawl. Even swapping non-active applications in and out of memory is a waste of resources. It's so inefficient & antiquated, wastes diskspace, and degrades performance. Modern systems simply don't need it. I do programming, some graphical gimp stuff, run VM's, play games, etc, and I've never needed it once. It's a relic from an age when memory was in short supply and you'd regularly hit the limit with only a few apps running. Now that more and more people are running SSD's, it's an even worse idea (limited write cycles). Link to comment Share on other sites More sharing options...
n_K Posted July 9, 2015 Share Posted July 9, 2015 It's not stupid at all. Creating a swap partition (virtual memory) is a complete waste of time for people with lots of memory. The only reason Windows wants you to have one is because for some bizarre reason some applications expect one or something along those lines. You can still remove it though. I did. The fact of the matter is, once you run out of memory, you should free some up, not rely on a really slow disk based buffer that slows the system to a crawl. Even swapping non-active applications in and out of memory is a waste of resources. It's so inefficient & antiquated, wastes diskspace, and degrades performance. Modern systems simply don't need it. I do programming, some graphical gimp stuff, run VM's, play games, etc, and I've never needed it once. It's a relic from an age when memory was in short supply and you'd regularly hit the limit with only a few apps running. Now that more and more people are running SSD's, it's an even worse idea (limited write cycles). You can't disable it in windows, if you try it informs you that it will create a 'temporary pagefile' regardless if you want it or not, believe me I've tried. It is daft, let's not pretend web browsers clear up all their memory - they most certainly don't. It's much better than it used to be, but it's not 100%, so slowly your PC will be eating and holding back RAM that actually isn't in use. Other programs do that too, swapping helps out with this because the data in the memory won't be touched, it gets flushed out to disk, swap usage goes up, and it stays there. However, in your system the RAM gets fragmented with garbage that won't be freed up. If you use VMs without a swap then either you have a lot of RAM or you've got very little idea about a system should operate. Even ESXi uses swapping. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted July 9, 2015 Veteran Share Posted July 9, 2015 I give my VM's swap as most of them are sitting with very little ram, i think the biggest one is 2gb Link to comment Share on other sites More sharing options...
MikeM97 Posted July 9, 2015 Author Share Posted July 9, 2015 Thank you all for the answers. Link to comment Share on other sites More sharing options...
simplezz Posted July 9, 2015 Share Posted July 9, 2015 You can't disable it in windows, if you try it informs you that it will create a 'temporary pagefile' regardless if you want it or not, believe me I've tried. It didn't do that to me on XP/Win 8. I disabled the page file/swap permanantly with no side effects (except better overall performance and more diskspace). It is daft, let's not pretend web browsers clear up all their memory - they most certainly don't. It's much better than it used to be, but it's not 100%, so slowly your PC will be eating and holding back RAM that actually isn't in use. I can't speak to Windows' memory model, but under Linux, each process' address space is isolated. Once it ends, all the memory allocated by it is freed as well. That's why writing code to free one-time-allocated heap memory at the end of the program is technically superfluous (although not necessary bad practise). Memory can only leak (not being freed when an object is destroyed or when a pointer is overwritten and the address is lost for example) within a program, not outside of it. I've yet to see a running browser process leaking gigabytes of memory. But even if it did, it would either crash when it ran out, or you'd kill it and download an update to fix the problem. I see no justification for employing a performance degrading swap partition unless you're working with a low memory device where you regularly expect to hit the upper limit. In fact, I even run my browser completely in memory (aur/profile-sync-daemon), including cache and profile to get the best performance and reduce wear and tear on my ssd. With eight gigs of ram, I rarely get near the limit. Other programs do that too, swapping helps out with this because the data in the memory won't be touched, it gets flushed out to disk, swap usage goes up, and it stays there. However, in your system the RAM gets fragmented with garbage that won't be freed up. I'd rather temporarily waste some ram (while the program is running) than slow my system to a crawl and thrash my disk with an overactive swap partition. If you use VMs without a swap then either you have a lot of RAM or you've got very little idea about a system should operate. Even ESXi uses swapping. I only have eight gigs, but it's more than enough for my needs. The VM's I run don't need much ram either, so I don't allocate them very much usually. That being said, if I needed to, I could always create a swap inside the VM for it. The fact is, if you're constantly running out of ram and hitting the swap, you'd be better off buying more ram than consistently degrading performance. Link to comment Share on other sites More sharing options...
n_K Posted July 9, 2015 Share Posted July 9, 2015 It didn't do that to me on XP/Win 8. I disabled the page file/swap permanantly with no side effects (except better overall performance and more diskspace). I can't speak to Windows' memory model, but under Linux, each process' address space is isolated. Once it ends, all the memory allocated by it is freed as well. That's why writing code to free one-time-allocated heap memory at the end of the program is technically superfluous (although not necessary bad practise). Memory can only leak (not being freed when an object is destroyed or when a pointer is overwritten and the address is lost for example) within a program, not outside of it. I've yet to see a running browser process leaking gigabytes of memory. But even if it did, it would either crash when it ran out, or you'd kill it and download an update to fix the problem. I see no justification for employing a performance degrading swap partition unless you're working with a low memory device where you regularly expect to hit the upper limit. In fact, I even run my browser completely in memory (aur/profile-sync-daemon), including cache and profile to get the best performance and reduce wear and tear on my ssd. With eight gigs of ram, I rarely get near the limit. I'd rather temporarily waste some ram (while the program is running) than slow my system to a crawl and thrash my disk with an overactive swap partition. I only have eight gigs, but it's more than enough for my needs. The VM's I run don't need much ram either, so I don't allocate them very much usually. That being said, if I needed to, I could always create a swap inside the VM for it. The fact is, if you're constantly running out of ram and hitting the swap, you'd be better off buying more ram than consistently degrading performance. I'll grab a screenshot of windows 7 next time I boot up without my mechanical drive and get the 'windows created a temporary pagefile' message for you. Not always is all the memory released, using shared objects and not freeing them will leave them dangling. There are kernel parameters that change the swapiness of a swap partition to solve that issue. Link to comment Share on other sites More sharing options...
Recommended Posts