One thing that came up when discussing with SMB as an obvious "uses mem
more in a kernel" are the structures needed per POSSIBLE cpu.

Comparing the system that I downgraded I found from [1]:

With the -kvm kernel before:
kernel: setup_percpu: NR_CPUS:64 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
kernel: rcu:         RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.

With the -generic kernel:
kernel: setup_percpu: NR_CPUS:8192 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
kernel: rcu:         RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=1.


So let us try the new 6.3 generic kernel, but with kernel parameter
  maxcpus=1 possible_cpus=1 nr_cpus=1
^^ this might be too hard, but ok for testing

That gives me:
kernel: setup_percpu: NR_CPUS:8192 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1

But sadly, the memory does not look much better:
root@m-new:~# cat /proc/meminfo 
MemTotal:         956176 kB
MemFree:          640960 kB
MemAvailable:     664816 kB

Was a good idea, but sadly that wasn't it.
And the initial NR_CPUS is a compile time parameter which we can not tune down 
:-/

[1]:
https://github.com/torvalds/linux/blob/master/arch/x86/kernel/setup_percpu.c#L122

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2032933

Title:
  Mantic (23.10) minimal images increase in memory consumption, port
  usage and processes running

Status in cloud-images:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  The Mantic (Ubuntu 23.10) images are undergoing some big changes prior
  to 23.10 release in October.

  This is a devel release so this is the perfect time to be making these
  changes but we are noticing some changes that were not expected.

  This bug is to track the unexpected changes and discuss/resolve these.

  The changes that have been made to mantic minimal:

  * Move to the linux-generic kernel from the linux-kvm kernel
    * This also involved removal of the virtio-blk driver, which is the default 
for QEMU and OpenStack, but this is being restored in an upcoming 6.5 mantic 
kernel and is being trakced @ 
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2030745
  * Move to using minimal-cloud seed - see 
https://ubuntu-archive-team.ubuntu.com/seeds/ubuntu.mantic/cloud-minimal
  * No longer installing Recommends packages
  * No initramfs fallback for boot - only initramfsless boot

  The latest mantic minimal images are available @ http://cloud-
  images.ubuntu.com/minimal/daily/mantic/ and are also available in the
  public clouds.

  A package name manifest diff can be seen @
  https://pastebin.ubuntu.com/p/rRd6STnNmK/

  We have had reports of higher memory usage on an idle system, higher
  number of ports open on an idle system and higher number of process
  running on a idle system.

  To help with debugging I have built and uploaded the following images
  and package manifests to
  https://people.canonical.com/~philroche/20230824-manticl-minimal-
  LP2032933/

  * 
20230618-before-kernel-change-before-seed-change-mantic-minimal-cloudimg-amd64
    * Before kernel change and before seed change
  * 
20230824-after-kernel-change-before-seed-change-mantic-minimal-cloudimg-amd64
    * After kernel change and before seed change
  * 
20230821.1-after-kernel-change-after-seed-change-mantic-minimal-cloudimg-amd64
    * After kernel change and after seed change

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2032933/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to