Miss RAM, Total ram is bigger than Used ram + Free ram by 1.5 gb












0















I have two OS on my pc. I installed Ubuntu 18.04 alongside with Windows 10. Total ram is 3.94 gb.



On Ubuntu my total ram is bigger than sum of free ram and used ram by 1,5 gb. And buff/cache is 1.5gb.



Is it normal, and it is just how linux works and if i will need more memory it will take from buff/cache? if not how to solve this problem?



$ watch -n 5 free -m
Every 5,0s: free -m gleb: Sat Jul 21 14:34:49 2018

total used free shared buff/cache available
Mem: 3851 2048 214 343 1588 1184
Swap: 2047 0 2047


$ vmstat -s | head -10
gleb@gleb:~$ vmstat -s | head -10
3943920 K total memory
2102300 K used memory
2350048 K active memory
984768 K inactive memory
209772 K free memory
38824 K buffer memory
1593024 K swap cache
2097148 K total swap
0 K used swap
2097148 K free swap


$ cat /proc/meminfo | head -10
MemTotal: 3943920 kB
MemFree: 181792 kB
MemAvailable: 1126248 kB
Buffers: 32236 kB
Cached: 1463972 kB
SwapCached: 0 kB
Active: 2340464 kB
Inactive: 1021944 kB
Active(anon): 1691844 kB
Inactive(anon): 588964 kB

$ sudo lshw
description: Notebook
product: 80SM (LENOVO_MT_80SM_BU_idea_FM_Lenovo ideapad 310-15ISK)
vendor: LENOVO
version: Lenovo ideapad 310-15ISK
serial: PF0L15FM
width: 64 bits
...
-memory
description: System Memory
physical id: 26
slot: System board or motherboard
size: 4GiB
-bank:0
description: SODIMM DDR4 Synchronous 2133 MHz (0,5 ns)
product: M471A5244BB0-CPB
vendor: Samsung
physical id: 0
serial: 00000000
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 2133MHz (0.5ns)









share|improve this question

























  • Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

    – muru
    Jul 21 '18 at 11:30











  • edited, thought that it is easier to read information from screenshot.

    – Geba
    Jul 21 '18 at 11:39











  • Relevant: linuxatemyram.com

    – Byte Commander
    Jul 21 '18 at 11:46






  • 3





    Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

    – muru
    Jul 21 '18 at 11:47






  • 1





    And askubuntu.com/questions/223759/…

    – muru
    Jul 21 '18 at 11:56
















0















I have two OS on my pc. I installed Ubuntu 18.04 alongside with Windows 10. Total ram is 3.94 gb.



On Ubuntu my total ram is bigger than sum of free ram and used ram by 1,5 gb. And buff/cache is 1.5gb.



Is it normal, and it is just how linux works and if i will need more memory it will take from buff/cache? if not how to solve this problem?



$ watch -n 5 free -m
Every 5,0s: free -m gleb: Sat Jul 21 14:34:49 2018

total used free shared buff/cache available
Mem: 3851 2048 214 343 1588 1184
Swap: 2047 0 2047


$ vmstat -s | head -10
gleb@gleb:~$ vmstat -s | head -10
3943920 K total memory
2102300 K used memory
2350048 K active memory
984768 K inactive memory
209772 K free memory
38824 K buffer memory
1593024 K swap cache
2097148 K total swap
0 K used swap
2097148 K free swap


$ cat /proc/meminfo | head -10
MemTotal: 3943920 kB
MemFree: 181792 kB
MemAvailable: 1126248 kB
Buffers: 32236 kB
Cached: 1463972 kB
SwapCached: 0 kB
Active: 2340464 kB
Inactive: 1021944 kB
Active(anon): 1691844 kB
Inactive(anon): 588964 kB

$ sudo lshw
description: Notebook
product: 80SM (LENOVO_MT_80SM_BU_idea_FM_Lenovo ideapad 310-15ISK)
vendor: LENOVO
version: Lenovo ideapad 310-15ISK
serial: PF0L15FM
width: 64 bits
...
-memory
description: System Memory
physical id: 26
slot: System board or motherboard
size: 4GiB
-bank:0
description: SODIMM DDR4 Synchronous 2133 MHz (0,5 ns)
product: M471A5244BB0-CPB
vendor: Samsung
physical id: 0
serial: 00000000
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 2133MHz (0.5ns)









share|improve this question

























  • Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

    – muru
    Jul 21 '18 at 11:30











  • edited, thought that it is easier to read information from screenshot.

    – Geba
    Jul 21 '18 at 11:39











  • Relevant: linuxatemyram.com

    – Byte Commander
    Jul 21 '18 at 11:46






  • 3





    Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

    – muru
    Jul 21 '18 at 11:47






  • 1





    And askubuntu.com/questions/223759/…

    – muru
    Jul 21 '18 at 11:56














0












0








0








I have two OS on my pc. I installed Ubuntu 18.04 alongside with Windows 10. Total ram is 3.94 gb.



On Ubuntu my total ram is bigger than sum of free ram and used ram by 1,5 gb. And buff/cache is 1.5gb.



Is it normal, and it is just how linux works and if i will need more memory it will take from buff/cache? if not how to solve this problem?



$ watch -n 5 free -m
Every 5,0s: free -m gleb: Sat Jul 21 14:34:49 2018

total used free shared buff/cache available
Mem: 3851 2048 214 343 1588 1184
Swap: 2047 0 2047


$ vmstat -s | head -10
gleb@gleb:~$ vmstat -s | head -10
3943920 K total memory
2102300 K used memory
2350048 K active memory
984768 K inactive memory
209772 K free memory
38824 K buffer memory
1593024 K swap cache
2097148 K total swap
0 K used swap
2097148 K free swap


$ cat /proc/meminfo | head -10
MemTotal: 3943920 kB
MemFree: 181792 kB
MemAvailable: 1126248 kB
Buffers: 32236 kB
Cached: 1463972 kB
SwapCached: 0 kB
Active: 2340464 kB
Inactive: 1021944 kB
Active(anon): 1691844 kB
Inactive(anon): 588964 kB

$ sudo lshw
description: Notebook
product: 80SM (LENOVO_MT_80SM_BU_idea_FM_Lenovo ideapad 310-15ISK)
vendor: LENOVO
version: Lenovo ideapad 310-15ISK
serial: PF0L15FM
width: 64 bits
...
-memory
description: System Memory
physical id: 26
slot: System board or motherboard
size: 4GiB
-bank:0
description: SODIMM DDR4 Synchronous 2133 MHz (0,5 ns)
product: M471A5244BB0-CPB
vendor: Samsung
physical id: 0
serial: 00000000
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 2133MHz (0.5ns)









share|improve this question
















I have two OS on my pc. I installed Ubuntu 18.04 alongside with Windows 10. Total ram is 3.94 gb.



On Ubuntu my total ram is bigger than sum of free ram and used ram by 1,5 gb. And buff/cache is 1.5gb.



Is it normal, and it is just how linux works and if i will need more memory it will take from buff/cache? if not how to solve this problem?



$ watch -n 5 free -m
Every 5,0s: free -m gleb: Sat Jul 21 14:34:49 2018

total used free shared buff/cache available
Mem: 3851 2048 214 343 1588 1184
Swap: 2047 0 2047


$ vmstat -s | head -10
gleb@gleb:~$ vmstat -s | head -10
3943920 K total memory
2102300 K used memory
2350048 K active memory
984768 K inactive memory
209772 K free memory
38824 K buffer memory
1593024 K swap cache
2097148 K total swap
0 K used swap
2097148 K free swap


$ cat /proc/meminfo | head -10
MemTotal: 3943920 kB
MemFree: 181792 kB
MemAvailable: 1126248 kB
Buffers: 32236 kB
Cached: 1463972 kB
SwapCached: 0 kB
Active: 2340464 kB
Inactive: 1021944 kB
Active(anon): 1691844 kB
Inactive(anon): 588964 kB

$ sudo lshw
description: Notebook
product: 80SM (LENOVO_MT_80SM_BU_idea_FM_Lenovo ideapad 310-15ISK)
vendor: LENOVO
version: Lenovo ideapad 310-15ISK
serial: PF0L15FM
width: 64 bits
...
-memory
description: System Memory
physical id: 26
slot: System board or motherboard
size: 4GiB
-bank:0
description: SODIMM DDR4 Synchronous 2133 MHz (0,5 ns)
product: M471A5244BB0-CPB
vendor: Samsung
physical id: 0
serial: 00000000
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 2133MHz (0.5ns)






dual-boot ram memory-usage cache






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 21 '18 at 12:09









abu_bua

3,41481227




3,41481227










asked Jul 21 '18 at 11:28









GebaGeba

12




12













  • Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

    – muru
    Jul 21 '18 at 11:30











  • edited, thought that it is easier to read information from screenshot.

    – Geba
    Jul 21 '18 at 11:39











  • Relevant: linuxatemyram.com

    – Byte Commander
    Jul 21 '18 at 11:46






  • 3





    Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

    – muru
    Jul 21 '18 at 11:47






  • 1





    And askubuntu.com/questions/223759/…

    – muru
    Jul 21 '18 at 11:56



















  • Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

    – muru
    Jul 21 '18 at 11:30











  • edited, thought that it is easier to read information from screenshot.

    – Geba
    Jul 21 '18 at 11:39











  • Relevant: linuxatemyram.com

    – Byte Commander
    Jul 21 '18 at 11:46






  • 3





    Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

    – muru
    Jul 21 '18 at 11:47






  • 1





    And askubuntu.com/questions/223759/…

    – muru
    Jul 21 '18 at 11:56

















Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

– muru
Jul 21 '18 at 11:30





Please don't post screenshots of text. Copy the text here and apply code formatting. askubuntu.com/editing-help#code

– muru
Jul 21 '18 at 11:30













edited, thought that it is easier to read information from screenshot.

– Geba
Jul 21 '18 at 11:39





edited, thought that it is easier to read information from screenshot.

– Geba
Jul 21 '18 at 11:39













Relevant: linuxatemyram.com

– Byte Commander
Jul 21 '18 at 11:46





Relevant: linuxatemyram.com

– Byte Commander
Jul 21 '18 at 11:46




3




3





Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

– muru
Jul 21 '18 at 11:47





Possible duplicate of What do the changes in `free` output from 14.04 to 16.04 mean?

– muru
Jul 21 '18 at 11:47




1




1





And askubuntu.com/questions/223759/…

– muru
Jul 21 '18 at 11:56





And askubuntu.com/questions/223759/…

– muru
Jul 21 '18 at 11:56










1 Answer
1






active

oldest

votes


















0














The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:



The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.



During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.



By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.



In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.



As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1058113%2fmiss-ram-total-ram-is-bigger-than-used-ram-free-ram-by-1-5-gb%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:



    The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.



    During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.



    By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.



    In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.



    As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.






    share|improve this answer




























      0














      The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:



      The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.



      During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.



      By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.



      In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.



      As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.






      share|improve this answer


























        0












        0








        0







        The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:



        The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.



        During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.



        By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.



        In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.



        As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.






        share|improve this answer













        The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:



        The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.



        During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.



        By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.



        In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.



        As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 29 at 8:14









        Mikko RantalainenMikko Rantalainen

        592515




        592515






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1058113%2fmiss-ram-total-ram-is-bigger-than-used-ram-free-ram-by-1-5-gb%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕