default Ubuntu gc_thresh settings for Linux are too small

Bug #2060001 reported by Raoni Timo de Castro Cambiaghi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-images
Fix Released
Undecided
Ryan Hill

Bug Description

See https://bugs.launchpad.net/charm-nova-compute/+bug/1780348

Launching an AL2023 AMI (ami-076a0ed69ea125460 in us-east-1):

A newer release of "Amazon Linux" is available.
  Version 2023.4.20240319:
Run "/usr/bin/dnf check-release-update" for full release and version update info
   , #_
   ~\_ ####_ Amazon Linux 2023
  ~~ \_#####\
  ~~ \###|
  ~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023
   ~~ V~' '->
    ~~~ /
      ~~._. _/
         _/ _/
       _/m/'
[ec2-user@ip-172-31-32-92 ~]$ sudo -i
[root@ip-172-31-32-92 ~]# sysctl net.ipv4.neigh.default.gc_thresh2
net.ipv4.neigh.default.gc_thresh2 = 15360
[root@ip-172-31-32-92 ~]# sysctl net.ipv4.neigh.default.gc_thresh3
net.ipv4.neigh.default.gc_thresh3 = 16384

We can check the ARP table size are considerably larger than a standard Ubuntu server.

This has implications, specially when using Ubuntu EKS AMIs: https://cloud-images.ubuntu.com/docs/aws/eks/

I've tried:
 - ami-0cd59ecaf368e5ccf / ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20240228
 - ami-0757bdb3268077f9f / ubuntu-eks/k8s_1.29/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240325

And got default values both times.

Revision history for this message
Raoni Timo de Castro Cambiaghi (raonitimo) wrote :

Maybe this config from bottlerocket can provide some other good values to adjust for a cloud environment: https://github.com/bottlerocket-os/bottlerocket/blob/develop/packages/release/release-sysctl.conf

Ryan Hill (rthill91)
Changed in cloud-images:
assignee: nobody → Ryan Hill (rthill91)
status: New → In Progress
Revision history for this message
Ryan Hill (rthill91) wrote :

Your results are accurate, we do not (currently) modify the values of gc_thresh*. The Amazon Linux values seem reasonable, I'll get these values updated as soon as a change can be verified/tested/etc.

Revision history for this message
Ryan Hill (rthill91) wrote :

A fix has been committed and should be available in the next release

Changed in cloud-images:
status: In Progress → Fix Committed
Revision history for this message
Raoni Timo de Castro Cambiaghi (raonitimo) wrote :

Hey Ryan, thanks for pushing this fix.

Have you considered also adding at least some of these:

https://github.com/bottlerocket-os/bottlerocket/blob/develop/packages/release/release-sysctl.conf

Thanks!

Revision history for this message
Ryan Hill (rthill91) wrote :

I've taken a look at some of the configurations linked, and while we're not opposed to them we don't want to arbitrarily take someones config and make it Ubuntu's default. If there are any in particular that you feel are notable gaps or that you would specifically like to see implemented in Ubuntu, please open separate bugs for them with rationale (current limitation, benefit of the change, etc).

Thanks again for the bug report!

Revision history for this message
Ryan Hill (rthill91) wrote :

New releases with the changes are out and anything on ec2 with a serial of 20240416 or later should have the new gc_thresh values.

In us-east-1 ami-0bed530a0a87d7595 and ami-0f934d23a336c092d were specifically verified.

Changed in cloud-images:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.