/srv/irclogs.ubuntu.com/2018/03/02/#ubuntu-server.txt

=== tafa2- is now known as tafa2
=== zzz is now known as xxx
=== xxx is now known as xxxzzz
=== xxxzzz is now known as xxxyzzz
m15kHi guys. Should ufw dhcp-pd work out of the box?13:01
Sirclehttps://pastebin.mozilla.org/907894513:06
SircleIs there anything wrong with this syntax. I am trying to allow one ip and block all but its blocking all ips (including the one I whitelisted) https://pastebin.mozilla.org/907894513:06
zulcoreycb:  ping neutron-vpnaas could use a rebuild in the cloud-archive https://pastebin.com/hL9b25q714:43
jamespagezul: neutron-vpn-agent has gone15:06
jamespageas in the vpn bits run as an extension to the neutron-l3-agent in queens15:10
zulargh...ok15:27
sdezielI have a bunch of QEMU VMs with small RAM allocations (256M or less) but the VM's kernel seems to be missing ~20M leading to only ~236M visible/usable. Any way to find where the rest is gone?21:41
sdeziel"journalctl -kocat | grep Memory" gives me: Memory: 227764K/261624K available (8530K kernel code, 1309K rwdata, 3992K rodata, 1508K init, 1316K bss, 33860K reserved, 0K cma-reserved)21:42
sdeziel261624K is pretty close to what the VM is given 262144K21:43
naccsdeziel: says 33M reserved?21:43
sdezielnacc: yeah, any way to influence this? Or learn what it's for?21:44
sdezielis that a safety stash to be used only when under memory pressure?21:44
naccsdeziel: can you `cat /proc/meminfo` to a pastebin?21:44
sdezielhttps://paste.ubuntu.com/p/7mPvT9hf96/21:45
nacclol which give sa different number :)21:45
sdezielmy 236M visible from "free -m" is exactly the MemTotal21:45
naccsdeziel: you've got about 20 M of reclaimable slab memory21:46
sdezielI know that long ago there was a thing like reserved memory for DMA/ISA21:46
naccwhich is relatively high for a small footprint system21:46
sdezielSReclaimable >21:46
naccsdeziel: yeah21:47
nacci believe you can force that to reclaim by drop_caches21:47
* sdeziel wonders how to reclaim21:47
naccsdeziel: try echo 3 > /proc/sys/vm/drop_caches21:48
sdezielbrought it down to ~8M21:48
sdezielthe that is poking at something that's not MemTotal AFAICT21:48
naccsdeziel: err, duh, you're right21:48
naccsdeziel: can you pastebin the full dmesg?21:49
sdezielI experimented with an even smaller VM (192M assigned) and was also missing 20M21:49
sdezielhttps://paste.ubuntu.com/p/8ysM3kGX4t/21:50
naccsdeziel: i used to know this really well, but i'm a few years rusty now :/21:52
naccsdeziel: trying to remember21:52
sdezielnacc: hehe, nothing urgent, I'm only trying to reclaim as much as I can to keep my super old VM server from running out of RAM21:54
naccsdeziel: iirc, that memory is kernel pages21:54
naccsdeziel: and i think that means you used something like 20M of bootmem or so21:55
naccwhcih can't be freed normally21:55
sdezielI wonder what that means: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved21:55
sdezielhmm, bootmem you say21:55
naccsdeziel: that's my recollection, the kernel's bootsrap memory21:56
naccsdeziel: that's referring to the e820 map in firmware21:56
naccyour bios tells the kerenl physically what addresses are allowed, etc21:56
sdezielOK21:57
TJ-sdeziel: the kernel protects the first 64KB of memory from use, and actively scans it for corruption (to detect writes to the NULL page21:57
sdezielTJ-: vm.mmap_min_addr right ?21:57
sdezielTJ-: I tried shrinking it from 65536 -> 2048 and didn't get anything back21:58
sdezielI also booted the linux-image-kvm flavor and got much less RAM taken away from me21:58
TJ-sdeziel: I don't think so, no, the e820 0-0xFFF is reserving the first 4096 byte page for safety21:59
sdezielthe problem with the kvm flavor is that it's a wildly different beast21:59
naccTJ-: oh you're right, i didn't read which message that was properly22:01
sdezielTJ-: OK but if it's for safety purposes, shouldn't the kernel see it (and count it in MemTotal)?22:02
sdeziel"dmesg | grep BIOS-e820" shows 5 ranges as reserved22:05
naccsdeziel: right those are bios reserved, and then the kernel removes a bit more22:06
TJ-sdeziel: no, because those reserved areas are often 'ROM' - e.g. system BIOS and option ROMs, or PCI device mappings22:06
sdezielhmm22:08
TJ-sdeziel: see e.g. "sudo less /proc/iomem"22:08
sdeziel"000c0000-000c0dff : Video ROM" => the VM only has a serial console22:10
TJ-sdeziel: but the VM seabios presumably has a default e820 reservation for a standard VGA framebuffer22:11
sdezielTJ-: I don't know that area at all but I would think that such mapping wouldn't remove RAM visible for the kernel22:14
TJ-In the dmesg Memory line you referenced, the 'reserved' is:  (physpages - totalram_pages - totalcma_pages) << (PAGE_SHIFT - 10),22:19
sdezielnot sure where totalram_pages comes from though22:24
sdezielI'm just lacking too much basic knowledge I guess I should start reading https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt22:26
sdezielhuh, this ^ not related at all22:28
TJ-no, that's about device-tree bindings22:31
sdezielTJ-: yeah, I noticed. While I look around for documentation of the e820 memory mapping hints, do you know how I could minimize the amount of reserved memory?22:33
sdezielTJ-: something to tweak with QEMU/seabios?22:33
TJ-sdeziel: did you pastebin the entire dmesg ?22:34
sdezielTJ-: https://paste.ubuntu.com/p/8ysM3kGX4t/22:35
TJ-sdeziel: and what's in /proc/iomem22:36
sdezielqemu as invoked by libvirt: https://paste.ubuntu.com/p/FX8RtzN5wK/22:36
sdezielTJ-: iomem: https://paste.ubuntu.com/p/NV45Nk9bjm/22:37
hehehehehe23:02
heheheany new exciting news?23:02
dpb1yes23:03
hehehecool23:04
sdezielTJ-: nacc: thanks for the useful information23:52
naccsdeziel: yw, hopefully you were able to figure stuff out?23:53
sdezielnacc: not yet but I have some pointers now at least23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!