You are not logged in.

#1 2015-06-22 04:38:26

kox
Member
Registered: 2015-05-01
Posts: 146

Missing RAM memory

              total        used        free      shared  buff/cache   available
Mem:           3955        1271        2083          38         600        2431

I have 4GB of RAM, but I can use only 3.3GB of it. I noticed it always when usage exceeds 3.3GB parts of memory are going to swap. I though this was about swapiness, but then I ran free -m . I disabled mounting /tmp as tmpfs  yesterday, but it didn't change much overall.

Why free != available and why used+available != total ?

I think I had this problem only on Arch linux, which I run for almost 2 months after switiching from Debian. I don't recall having such issue on Debian, but I'm not sure 100%.

Offline

#2 2015-06-22 04:45:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Missing RAM memory

Is your video system stealing memory?   I suggest you spend a bit of time studying your journal.  There is a barking bunch of information in there about memory allocation and use.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-06-22 05:18:40

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

This is the only memory related info I've found

Jun 22 06:17:52 localhost kernel: AGP: Checking aperture...
Jun 22 06:17:52 localhost kernel: AGP: No AGP bridge found
Jun 22 06:17:52 localhost kernel: AGP: Node 0: aperture [bus addr 0x00000000-0x01ffffff] (32MB)
Jun 22 06:17:52 localhost kernel: AGP: Your BIOS doesn't leave a aperture memory hole
Jun 22 06:17:52 localhost kernel: AGP: Please enable the IOMMU option in the BIOS setup
Jun 22 06:17:52 localhost kernel: AGP: This costs you 64MB of RAM
Jun 22 06:17:52 localhost kernel: AGP: Mapping aperture over RAM [mem 0xc4000000-0xc7ffffff] (65536KB)



 Memory: 3979204K/4192376K available (5629K kernel code, 840K rwdata, 1784K rodata, 1160K init, 1152K bss, 
Jun 22 06:17:52 localhost kernel: SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1



Jun 22 06:17:53 localhost kernel: <6>[fglrx] Maximum main memory to use for locked dma buffers: 3793 MBytes.
Jun 22 06:17:53 localhost kernel: <6>[fglrx]   vendor: 1002 device: 944a count: 1
Jun 22 06:17:53 localhost kernel: <6>[fglrx] ioport: bar 4, base 0xd000, size: 0x100
Jun 22 06:17:53 localhost kernel: <6>[fglrx] Kernel PAT support is enabled
Jun 22 06:17:53 localhost kernel: <6>[fglrx] module loaded - fglrx 8.97.2 [Nov 16 2012] with 1 minors

But it's only 64MB. I'm missing almost 400MB as of now  and it's available memory.
Now avaiable+used adds up to 3586MB, which is over 100MB less then when I wrote this post. And total free is 3030MB now! This is madness, I cannot use almost 25% of memory.

              total        used        free      shared  buff/cache   available
Mem:           3955        1811        1219         146         924        1775

Last edited by kox (2015-06-22 05:21:05)

Offline

#4 2015-06-22 05:27:24

dockland
Member
From: Sweden
Registered: 2015-06-06
Posts: 861

Re: Missing RAM memory

kox wrote:

This is the only memory related info I've found

Jun 22 06:17:52 localhost kernel: AGP: Checking aperture...
Jun 22 06:17:52 localhost kernel: AGP: No AGP bridge found
Jun 22 06:17:52 localhost kernel: AGP: Node 0: aperture [bus addr 0x00000000-0x01ffffff] (32MB)
Jun 22 06:17:52 localhost kernel: AGP: Your BIOS doesn't leave a aperture memory hole
Jun 22 06:17:52 localhost kernel: AGP: Please enable the IOMMU option in the BIOS setup
Jun 22 06:17:52 localhost kernel: AGP: This costs you 64MB of RAM
Jun 22 06:17:52 localhost kernel: AGP: Mapping aperture over RAM [mem 0xc4000000-0xc7ffffff] (65536KB)



 Memory: 3979204K/4192376K available (5629K kernel code, 840K rwdata, 1784K rodata, 1160K init, 1152K bss, 
Jun 22 06:17:52 localhost kernel: SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1



Jun 22 06:17:53 localhost kernel: <6>[fglrx] Maximum main memory to use for locked dma buffers: 3793 MBytes.
Jun 22 06:17:53 localhost kernel: <6>[fglrx]   vendor: 1002 device: 944a count: 1
Jun 22 06:17:53 localhost kernel: <6>[fglrx] ioport: bar 4, base 0xd000, size: 0x100
Jun 22 06:17:53 localhost kernel: <6>[fglrx] Kernel PAT support is enabled
Jun 22 06:17:53 localhost kernel: <6>[fglrx] module loaded - fglrx 8.97.2 [Nov 16 2012] with 1 minors

But it's only 64MB. I'm missing almost 400MB as of now  and it's available memory.
Now avaiable+used adds up to 3586MB, which is over 100MB less then when I wrote this post. And total free is 3030MB now! This is madness, I cannot use almost 25% of memory.

              total        used        free      shared  buff/cache   available
Mem:           3955        1811        1219         146         924        1775

I presume you have the 64-bit version of Arch installed and not 32-bit?


I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.

Offline

#5 2015-06-22 05:30:06

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

That is correct.

Offline

#6 2015-06-22 05:58:37

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: Missing RAM memory

did you check your bios directly. I'm missing 90 megabytes

Last edited by bleach (2015-06-22 06:06:03)

Offline

#7 2015-06-22 15:03:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Missing RAM memory

Nothing like:

ewaller@odin ~ [1]1003 %dmesg | grep stolen 
[    0.000000] Reserving Intel graphics stolen memory at 0xbc000000-0xbfffffff
[   12.018598] agpgart-intel 0000:00:00.0: detected 65536K stolen memory
ewaller@odin ~ 1004 %

or

ewaller@turing ~ 1001 %dmesg | grep stolen
[    0.000000] Reserving Intel graphics stolen memory at 0x9da00000-0x9f9fffff
ewaller@turing ~ 1002 %

?

Last edited by ewaller (2015-06-22 15:05:22)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2015-06-22 18:33:52

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

No nothing like it. I viewed the whole log. I don't know maybe this is some useful information, I don't understand much of it. I guess these are addresses of allocated memory, from start to end? Can I somehow count the block size based on addresses? Does reserved mean that it's "stolen" RAM?

[root@new-host maciek]# dmesg | grep mem
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e4000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000cfe7ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000cfe80000-0x00000000cfe97fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000cfe98000-0x00000000cfebffff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000cfec0000-0x00000000cfefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ffe00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000012fffffff] usable
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] e820: update [mem 0xd0000000-0xffffffff] usable ==> reserved
[    0.000000] found SMP MP-table at [mem 0x000ff780-0x000ff78f] mapped at [ffff8800000ff780]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Base memory trampoline at [ffff880000099000] 99000 size 24576
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000]  [mem 0x00000000-0x000fffff] page 4k
[    0.000000] init_memory_mapping: [mem 0x12fe00000-0x12fffffff]
[    0.000000]  [mem 0x12fe00000-0x12fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x120000000-0x12fdfffff]
[    0.000000]  [mem 0x120000000-0x12fdfffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x100000000-0x11fffffff]
[    0.000000]  [mem 0x100000000-0x11fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x00100000-0xcfe7ffff]
[    0.000000]  [mem 0x00100000-0x001fffff] page 4k
[    0.000000]  [mem 0x00200000-0x3fffffff] page 2M
[    0.000000]  [mem 0x40000000-0xbfffffff] page 1G
[    0.000000]  [mem 0xc0000000-0xcfdfffff] page 2M
[    0.000000]  [mem 0xcfe00000-0xcfe7ffff] page 4k
[    0.000000] RAMDISK: [mem 0x37980000-0x37cb7fff]
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000012fffffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x12fffa000-0x12fffdfff]
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000012fffffff]
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x00000000cfe7ffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x000000012fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000012fffffff]
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA32 zone: 13242 pages used for memmap
[    0.000000]   Normal zone: 3072 pages used for memmap
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000e3fff]
[    0.000000] PM: Registered nosave memory: [mem 0x000e4000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xcfe80000-0xcfe97fff]
[    0.000000] PM: Registered nosave memory: [mem 0xcfe98000-0xcfebffff]
[    0.000000] PM: Registered nosave memory: [mem 0xcfec0000-0xcfefffff]
[    0.000000] PM: Registered nosave memory: [mem 0xcff00000-0xffdfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xffe00000-0xffffffff]
[    0.000000] e820: [mem 0xcff00000-0xffdfffff] available for PCI devices
[    0.000000] AGP: Your BIOS doesn't leave a aperture memory hole
[    0.000000] AGP: Mapping aperture over RAM [mem 0xc4000000-0xc7ffffff] (65536KB)
[    0.000000] PM: Registered nosave memory: [mem 0xc4000000-0xc7ffffff]
[    0.015241] Initializing cgroup subsys memory
[    0.015360] Freeing SMP alternatives memory: 20K (ffffffff819f6000 - ffffffff819fb000)
[    0.233627] PM: Registering ACPI NVS region [mem 0xcfe98000-0xcfebffff] (163840 bytes)
[    0.262887] Fam 10h mmconf [mem 0xe0000000-0xefffffff]
[    0.262899] bus: 00 [mem 0x000a0000-0x000bffff]
[    0.262900] bus: 00 [mem 0xd0000000-0xdfffffff]
[    0.262901] bus: 00 [mem 0xf0000000-0xffffffff]
[    0.262902] bus: 00 [mem 0x130000000-0xfcffffffff]
[    0.263010] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.363467] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.364471] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
[    0.369446] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.369448] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff window]
[    0.369450] pci_bus 0000:00: root bus resource [mem 0xcff00000-0xdfffffff window]
[    0.369451] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfebfffff window]
[    0.369838] pci 0000:00:11.0: reg 0x24: [mem 0xfeaffc00-0xfeafffff]
[    0.369957] pci 0000:00:12.0: reg 0x10: [mem 0xfeafe000-0xfeafefff]
[    0.370080] pci 0000:00:12.1: reg 0x10: [mem 0xfeafd000-0xfeafdfff]
[    0.370211] pci 0000:00:12.2: reg 0x10: [mem 0xfeaff800-0xfeaff8ff]
[    0.370372] pci 0000:00:13.0: reg 0x10: [mem 0xfeafc000-0xfeafcfff]
[    0.370494] pci 0000:00:13.1: reg 0x10: [mem 0xfeafb000-0xfeafbfff]
[    0.370625] pci 0000:00:13.2: reg 0x10: [mem 0xfeaff400-0xfeaff4ff]
[    0.371084] pci 0000:00:14.2: reg 0x10: [mem 0xfeaf4000-0xfeaf7fff 64bit]
[    0.371421] pci 0000:00:14.5: reg 0x10: [mem 0xfeafa000-0xfeafafff]
[    0.371842] pci 0000:01:00.0: reg 0x10: [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.371851] pci 0000:01:00.0: reg 0x18: [mem 0xfebe0000-0xfebeffff 64bit]
[    0.371868] pci 0000:01:00.0: reg 0x30: [mem 0xfebc0000-0xfebdffff pref]
[    0.371947] pci 0000:01:00.1: reg 0x10: [mem 0xfebf8000-0xfebfbfff 64bit]
[    0.376375] pci 0000:00:02.0:   bridge window [mem 0xfeb00000-0xfebfffff]
[    0.376378] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.376476] pci 0000:02:00.0: reg 0x18: [mem 0xfdfff000-0xfdffffff 64bit pref]
[    0.376488] pci 0000:02:00.0: reg 0x20: [mem 0xfdff8000-0xfdffbfff 64bit pref]
[    0.383055] pci 0000:00:04.0:   bridge window [mem 0xfdf00000-0xfdffffff 64bit pref]
[    0.383147] pci 0000:00:14.4:   bridge window [mem 0x000a0000-0x000bffff window] (subtractive decode)
[    0.383148] pci 0000:00:14.4:   bridge window [mem 0x000d0000-0x000dffff window] (subtractive decode)
[    0.383150] pci 0000:00:14.4:   bridge window [mem 0xcff00000-0xdfffffff window] (subtractive decode)
[    0.383152] pci 0000:00:14.4:   bridge window [mem 0xf0000000-0xfebfffff window] (subtractive decode)
[    0.384127] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.392493] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff]
[    0.392494] e820: reserve RAM buffer [mem 0xcfe80000-0xcfffffff]
[    0.399978] system 00:05: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.399981] system 00:05: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.400177] system 00:06: [mem 0xcff00000-0xcfffffff] has been reserved
[    0.400179] system 00:06: [mem 0xffb80000-0xffbfffff] has been reserved
[    0.400181] system 00:06: [mem 0xfec10000-0xfec1001f] has been reserved
[    0.400183] system 00:06: [mem 0xfed40000-0xfed44fff] has been reserved
[    0.400357] system 00:08: [mem 0xe0000000-0xefffffff] has been reserved
[    0.400552] system 00:09: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.400554] system 00:09: [mem 0x000c0000-0x000cffff] could not be reserved
[    0.400556] system 00:09: [mem 0x000e0000-0x000fffff] could not be reserved
[    0.400558] system 00:09: [mem 0x00100000-0xcfefffff] could not be reserved
[    0.400559] system 00:09: [mem 0xfec00000-0xffffffff] could not be reserved
[    0.407113] pci 0000:00:02.0:   bridge window [mem 0xfeb00000-0xfebfffff]
[    0.407115] pci 0000:00:02.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.407123] pci 0000:00:04.0:   bridge window [mem 0xfdf00000-0xfdffffff 64bit pref]
[    0.407141] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.407142] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000dffff window]
[    0.407144] pci_bus 0000:00: resource 8 [mem 0xcff00000-0xdfffffff window]
[    0.407146] pci_bus 0000:00: resource 9 [mem 0xf0000000-0xfebfffff window]
[    0.407149] pci_bus 0000:01: resource 1 [mem 0xfeb00000-0xfebfffff]
[    0.407151] pci_bus 0000:01: resource 2 [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.407154] pci_bus 0000:02: resource 2 [mem 0xfdf00000-0xfdffffff 64bit pref]
[    0.407159] pci_bus 0000:03: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.407161] pci_bus 0000:03: resource 7 [mem 0x000d0000-0x000dffff window]
[    0.407162] pci_bus 0000:03: resource 8 [mem 0xcff00000-0xdfffffff window]
[    0.407164] pci_bus 0000:03: resource 9 [mem 0xf0000000-0xfebfffff window]
[    0.879785] Freeing initrd memory: 3296K (ffff880037980000 - ffff880037cb8000)
[    0.883480] Scanning for low memory corruption every 60 seconds
[    0.935967] Freeing unused kernel memory: 1160K (ffffffff818d4000 - ffffffff819f6000)
[    0.936177] Freeing unused kernel memory: 504K (ffff880001582000 - ffff880001600000)
[    0.936270] Freeing unused kernel memory: 264K (ffff8800017be000 - ffff880001800000)
[    0.958035] ehci-pci 0000:00:12.2: irq 17, io mem 0xfeaff800
[    0.965982] ehci-pci 0000:00:13.2: irq 19, io mem 0xfeaff400
[    0.975941] ohci-pci 0000:00:12.0: irq 16, io mem 0xfeafe000
[    1.033287] ohci-pci 0000:00:12.1: irq 16, io mem 0xfeafd000
[    1.090030] ohci-pci 0000:00:13.0: irq 18, io mem 0xfeafc000
[    1.146761] ohci-pci 0000:00:13.1: irq 18, io mem 0xfeafb000
[    1.203505] ohci-pci 0000:00:14.5: irq 18, io mem 0xfeafa000
[   12.514640] <6>[fglrx] Maximum main memory to use for locked dma buffers: 3793 MBytes.

That would make sense, if the system was 32bit, but the default Arch iso is 64bit, isnt it, so there would be no way I installed 32 bit. But just to make sure, how can I check if the system is 64-bit?

Last edited by kox (2015-06-22 18:38:43)

Offline

#9 2015-06-22 18:40:41

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Missing RAM memory

What does "uname -a" show?

Offline

#10 2015-06-22 18:41:18

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

So it is 64bit - x86_64 GNU/Linux

Is it worth trying disabling graphics drivers module to check if graphics steal RAM?

Last edited by kox (2015-06-22 18:43:14)

Offline

#11 2015-06-22 18:42:36

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Missing RAM memory

kox wrote:

So it is 64bit - x86_64 GNU/Linux

That's not what lucke asked -- please show the entire output from "uname -a"

Offline

#12 2015-06-22 18:43:45

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

Linux new-host.home 4.0.5-1-ARCH #1 SMP PREEMPT Sat Jun 6 18:37:49 CEST 2015 x86_64 GNU/Linux

Offline

#13 2015-06-22 19:02:00

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Missing RAM memory

Well, free shows almost 4G.

total = used + free + buff/cache
available = free + parts of buff/cache that can be dropped ("sync; echo 3 >> /proc/sys/vm/drop_caches" to drop all caches)

Swap is there to be used, so don't be surprised it is used. Change the swappiness to 0 to make the kernel least likely to use swap.

You says it starts swapping "when usage exceeds 3.3GB". Is it 3.3G used or 3.3G of used + buff/cache?

Offline

#14 2015-06-22 19:17:54

CodyFagley
Member
From: Laramie, Wyoming
Registered: 2015-06-18
Posts: 29

Re: Missing RAM memory

When I do the math, I am getting 3950 - 3990 M, which is pretty dang close to 4G.  I wouldn't sweat over times when you have ~50 MB lost.


AMD FX8350 | 2 TB HDD | 8 GB Ram | Nvidia GTX-750 | Gigabyte GA-970A-DS3 Mobo | CoduxArch OS

Offline

#15 2015-06-22 19:19:01

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

It's 3.3GB in gnome system monitor and it is like a max. When I set swapiness to 0, I got a total freeze when it approached 3.3GB , like setting it to 0 causes to not use swap at all. Also swap is very slow and my system really slows down while memory goes to swap.

Dropping caches helped a little, thank you. And thanks for explaining total memory.

[root@new-host maciek]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3955        2614         215         185        1125         937
Swap:          4055           0        4055
[root@new-host maciek]# sync; echo 3 >> /proc/sys/vm/drop_caches
[root@new-host maciek]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3955        2615         808         185         531         950

But what I'm supposed to drop the cache every now and then?  Why is the system letting to steal memory just like that, what is this cache for?

And what about 531MB of cache that can't be dropped?  I used to run Windows XP with 512MB RAM a few years ago, and now I have to reserve 530MB  just for a cache. Obviously there has to be a way to disable it completely,

Offline

#16 2015-06-22 19:22:20

CodyFagley
Member
From: Laramie, Wyoming
Registered: 2015-06-18
Posts: 29

Re: Missing RAM memory

Usually Memory Cache is a good thing.  It will speed up certain processes by already having the memory allocated for it.  Additionally, it will automatically release the cache memory to make room for new memory if that is needed.  You have a lot of free memory, so there is no reason for your computer to release the cached memory back to you.

:EDIT: 

Some of your memory in cache could be linked to your internet browser.  Chrome / Chromium, for example, is known for using high amounts of memory while in use, and it also likes to cache stuff so that pages load faster.

Last edited by CodyFagley (2015-06-22 19:28:37)


AMD FX8350 | 2 TB HDD | 8 GB Ram | Nvidia GTX-750 | Gigabyte GA-970A-DS3 Mobo | CoduxArch OS

Offline

#17 2015-06-22 19:44:42

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

Yes, I use chromium,  I know it's pretty resource heavy. I get it now. So it's like the real used memory is used + cache and hence system monitor is a bad way to check memory usage.  But I don't have much of free memory.  3GB used is common.  And when it approaches 3.3GB memory is full, because of cache and cache isn't freed. Maybe I should write a script to clear the cache every minute if used memory exceeds 3GB.

Offline

#18 2015-06-22 19:46:34

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Missing RAM memory

What's the output of "cat /proc/meminfo" and "df -h"?

Offline

#19 2015-06-22 20:02:07

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

[root@new-host maciek]# cat /proc/meminfo
MemTotal:        4050400 kB
MemFree:         2705848 kB
MemAvailable:    2815872 kB
Buffers:            9808 kB
Cached:           296456 kB
SwapCached:            0 kB
Active:           900300 kB
Inactive:         250820 kB
Active(anon):     844964 kB
Inactive(anon):    35592 kB
Active(file):      55336 kB
Inactive(file):   215228 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4153340 kB
SwapFree:        4153340 kB
Dirty:              3392 kB
Writeback:             0 kB
AnonPages:        844708 kB
Mapped:           287580 kB
Shmem:             35712 kB
Slab:              38564 kB
SReclaimable:      16776 kB
SUnreclaim:        21788 kB
KernelStack:        6048 kB
PageTables:        22188 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     6178540 kB
Committed_AS:    3298488 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      318020 kB
VmallocChunk:   34359418260 kB
HardwareCorrupted:     0 kB
AnonHugePages:    145408 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      143872 kB
DirectMap2M:     3000320 kB
DirectMap1G:     1048576 kB
[root@new-host maciek]# df -h
Filesystem      Size  Used Avail Use% Mounted on
dev             1.9G     0  1.9G   0% /dev
run             2.0G  692K  2.0G   1% /run
/dev/sda12       24G  6.7G   17G  30% /
tmpfs           2.0G   34M  1.9G   2% /dev/shm
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda10       15G  3.0G   11G  22% /srv
/dev/sda7       347G  143G  187G  44% /home
tmpfs           396M   12K  396M   1% /run/user/1000

Note that I've run it after dropping cache and I haven't had much stuff opened.

Offline

#20 2015-06-22 20:14:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Missing RAM memory

My friend had a problem with Chromium eating a lot of memory, inducing (heavy) swapping and making the PC nearly hang. She tried limiting Chromium with cgroups. Then she moved to Firefox.

Light swapping shouldn't really kill performance. Heavy swapping might make your system unresponsive. But then again, there are reports of such problems as yours on x86_64, I guess.

You could monitor the operation of the PC with "dstat -cdnmgs --top-io --top-bio --top-cpu --top-mem" - especially the moment it runs out of memory. You could limit Chromium with cgroups so it wouldn't eat all memory. You could enable Magic SysRq and use Alt+SysRq+f to invoke an OOM killer when you run out of memory.

Offline

#21 2015-06-22 20:57:25

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

I didn't know about these shortcuts, they will come in handy. Thanks. 

Maybe I will play with cgroups. Moving back to firefox is not an option for me, chromium is much faster, at least on my system.  I will also try increasing swapiness, maybe it won't affect performance that much.

I thought that mounting /tmp as tmpfs was stealing my RAM and I disabled it. Now I don't know if I should enable it.  It doesn't take that much memory, does it?

Offline

#22 2015-06-22 21:02:52

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Missing RAM memory

It depends on how much you have in /tmp - usually it isn't much. tmpfs stuff can be swapped out.

One more idea: zswap might help (or zram, but that doesn't use on-disk swap at all).

Offline

#23 2015-06-22 21:08:31

CodyFagley
Member
From: Laramie, Wyoming
Registered: 2015-06-18
Posts: 29

Re: Missing RAM memory

Something to keep in mind:  Chromium is only much faster BECAUSE it uses memory the way it does. 

I think this link will provide a good read that will show you why chrome eating up your memory isn't necessarily a bad thing.

http://lifehacker.com/why-chrome-uses-s … 1702537477

Free ram is useless ram

Last edited by CodyFagley (2015-06-22 21:11:20)


AMD FX8350 | 2 TB HDD | 8 GB Ram | Nvidia GTX-750 | Gigabyte GA-970A-DS3 Mobo | CoduxArch OS

Offline

#24 2015-06-22 21:49:38

kox
Member
Registered: 2015-05-01
Posts: 146

Re: Missing RAM memory

@lucke I will try it. I also read about video swap. I have 1GB in my graphics card and I doubt I need that  much to keep Gnome Shell running.

@CodyFagley That was an interesting read. I was wondering some time ago whether it's possible to auto kill inactive tabs and this article mentions an extension to just do that. That should greatly reduce memory usage, I often leave a lot of tabs just to go back to them after some time. I also came upon this article http://www.howtogeek.com/128130/htg-exp … m-is-full/ 
I used think that the less RAM used the better.

Offline

#25 2015-06-23 16:01:53

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 395

Re: Missing RAM memory

The simplest answer is that OP has exactly the amount of RAM that the manufacturer installed. See, this is an old, old story about binary math, peripheral manufacturers, and sales puffery. Hell, even Bill Gates got it wrong in a 1990s Computer Bowl Quiz question, "How many bytes are there in a megabyte?"

Bill G's wrong answer: 1,000,000 bytes
Correct answer: 1,048,576 (or 1,024 x 1,024) bytes

If you apply the proper math--something hardware manufacturers do NOT do--you will see that this is the case here. They want you to believe the higher number.

Basically, you gotta be older'n dirt, like me, to understand the history of the question: "When is a gigabyte not a gigabyte?" smile

~cheers

P.S. See my sig for an example

Last edited by c00ter (2015-06-23 16:21:14)


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

Board footer

Powered by FluxBB