Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance for standalone docker build (clean app) #76591

Open
nothumbee opened this issue Feb 27, 2025 · 0 comments
Open

Poor performance for standalone docker build (clean app) #76591

nothumbee opened this issue Feb 27, 2025 · 0 comments
Labels
Performance Anything with regards to Next.js performance.

Comments

@nothumbee
Copy link

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/confident-keller-vg6d7s?workspaceId=ws_BPKX6UvVodga6dWUAkdape

To Reproduce

Observed Behavior

  • A single visit to the index page (static - just text) causes the server load to spike to ~20% CPU and RAM usage, as observed using htop (mainly process next-server)
  • Multiple page refreshes (F5) further increase the load significantly.

Steps to Reproduce

  1. Start the application in docker container.
  2. Open the index page in a browser.
  3. Observe system resource usage in htop (noting ~20% CPU/RAM spike).
  4. Continuously refresh the page (press F5 multiple times).
  5. Notice a significant increase in load.

Current vs. Expected behavior

Expected Behavior

  • The server should handle a single page visit efficiently with minimal resource consumption.
  • Load should not spike significantly on multiple refreshes.

Image

Provide environment information

- **Architecture:** x86_64  
- **Operating System:** Ubuntu 24.04 (AWS)  
- **Kernel Version:** `6.8.0-1018-aws #20-Ubuntu SMP Thu Oct 10 18:14:42 UTC 2024`  
- **CPU:**  
  - **Vendor:** AMD (AuthenticAMD)  
  - **Model:** AMD EPYC 7571 (2.2 GHz)  
  - **Cores:** 1 socket, 1 core per socket, 2 threads per core  
- **Memory & Caches:**  
  - **L1d Cache:** 32 KiB  
  - **L1i Cache:** 64 KiB  
  - **L2 Cache:** 512 KiB  
  - **L3 Cache:** 8 MiB  
- **Virtualization:** KVM (Full)  
- **Node.js Version:** `18-alpine3.16`, `18-alpine`  
- **Tested Next.js Versions:**  
  - `13.3.4`  
  - `^13.5.9`  
  - `^14.1.0`  
  - `^15.1.0`
  - both app and pages routers

Which area(s) are affected? (Select all that apply)

Performance

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

Additional Notes

  • Issue was tested on multiple Next.js versions with similar results.
  • Happens both in Pages Router and App Router.

Image

@github-actions github-actions bot added the Performance Anything with regards to Next.js performance. label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Anything with regards to Next.js performance.
Projects
None yet
Development

No branches or pull requests

1 participant