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

High RAM usage when 10,000 entities are loaded. #441

Open
ELginas opened this issue Jul 3, 2021 · 4 comments
Open

High RAM usage when 10,000 entities are loaded. #441

ELginas opened this issue Jul 3, 2021 · 4 comments

Comments

@ELginas
Copy link

ELginas commented Jul 3, 2021

Description

Feather uses way too much RAM for handling entities. When spawning 10 000 piglin brutes 1 in between each other, game uses 2 GB+ RAM and usage changes rapidly. RAM spike only happens when you are connected to the server.

Reproduction Steps

  1. Modify query_entities plugin so that piglin brutes spawn every 1 block instead of every 12 blocks.
  2. Add modified query_entities plugin
  3. Launch feather server
  4. Login to feather server and see RAM go up A LOT

What You Expected to Happen

I expected maybe increased CPU usage when joining server with a lot of entities and I also expected RAM to go up slightly because of loaded chunks.

What Actually Happened

After I joined the server CPU usage went up by 20% and RAM usage went up by ~2 GB and fluctuated uncontrollably (by about ~400 MB every second).

Screenshots and Logs

Your Environment

  • Operating System: Windows 10
  • Operating System Version: 21H1
  • Feather Version: latest

Additional Context

System RAM: 8 GB
Minecraft client: Lunar
View distance: 8 chunks (but Lunar tends to load chunks more slowly to maintain good FPS)

When no one is on the server, CPU usage stays around ~20% and RAM usage is ~6 MB.
Also when I joined server, my CPU reached 100% and server printed Tick took too long once in a while and my RAM stayed around ~95% usage.

@ambeeeeee ambeeeeee changed the title Insanely large RAM usage when spawning a lot of entities High RAM usage when 10,000 entities are loaded. Jul 3, 2021
@ambeeeeee
Copy link
Contributor

ambeeeeee commented Jul 4, 2021

Can't reproduce, this might be an issue with debug mode or something. (Or maybe I did something wrong hehe)

image

Ignore CPU usage that's just because I have a garbage CPU right now.

Memory Usage Information (Generated with VMMap

As shown by the above, it only got to 100-80 MB of memory use.

@ELginas
Copy link
Author

ELginas commented Jul 4, 2021

I tried with Vanilla 1.16.4 client, RAM and CPU still rises by a lot, but RAM usage is lower because client is having hard time loading chunks and handling entities. Also, did you join the server once you started the server? Added plugin for testing.
query-entities.zip

@caelunshun
Copy link
Member

I tried with Vanilla 1.16.4 client, RAM and CPU still rises by a lot, but RAM usage is lower because client is having hard time loading chunks and handling entities. Also, did you join the server once you started the server? Added plugin for testing.
query-entities.zip

Are you measuring the RAM usage of the server itself or on your whole system? It makes sense for the client to use that much RAM with 10,000 entities, and the "fluctuating" pattern sounds like the Java GC.

@ELginas
Copy link
Author

ELginas commented Jul 4, 2021

No, I'm talking about the Feather server. Of course client will have awful time near 10,000 entities😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants