Bawnorton / AllTheTrims

Allows any item to be an armour trim material and makes all armour trimmable.
MIT License
5 stars 1 forks source link

High memory and CPU usage #35

Closed zc1108aaa closed 2 months ago

zc1108aaa commented 2 months ago

H4$EVYR9XK7NGO19YU3G)HD 0 39ST(UJ103WMQJC66 {~PNI Only add 400, full Do not add to restore normal operation ARN2O8_{A9~)WY13W9H%UNC latest0.log

1 small mod, Compared to 100 large mods 100 times lag

Bawnorton commented 2 months ago

Use a profiler like spark to properly view cpu and memory usage from mc

zc1108aaa commented 2 months ago

Not added 7CJCS NVX6 OL@H(CKU%)S add to EPJA~N09CE(48SS`@@KWV5J No response in a few minutes I also deleted these mods image

Bawnorton commented 2 months ago

can you send the spark report created by running: /spark profiler start --timeout 30

zc1108aaa commented 2 months ago

Not addedimage

Bawnorton commented 2 months ago

the link, not a screenshot

zc1108aaa commented 2 months ago

aa1f8f8c1943e8c21da0ac6fe4345cec_0c294638f64eda1192d39021059d0e7b_auth_key=1724700951-7447888212-1532056735-6ae64785a5819651c2078d8cb9fe13a5

zc1108aaa commented 2 months ago

https://spark.lucko.me/LJJIyDVEmV

Bawnorton commented 2 months ago

aa1f8f8c1943e8c21da0ac6fe4345cec_0c294638f64eda1192d39021059d0e7b_auth_key=1724700951-7447888212-1532056735-6ae64785a5819651c2078d8cb9fe13a5

can you send this file

zc1108aaa commented 2 months ago

image

Bawnorton commented 2 months ago

ok, go to https://spark.lucko.me and upload the report, then share the link

zc1108aaa commented 2 months ago

increase https://spark.lucko.me/jqCXp0Ty7l

Bawnorton commented 2 months ago

Had a look through, nothing indicates all the trims as the cause, notably it's not even recorded as impacting performance at all. Your main culprits are villager pathfinding, that's taking up a large amount of resources and slow memory reading, which I am going to assume is a result of you assigning 100000m to the process. Assigning an excessive amount of memory to a process means that when the garbage collector triggers it has to clean up a lot of memory. Your gc is triggering every 10s and taking 3.1s to clear, that's 3.1s where nothing can happen so you're gonna get bad lag spikes.

Not enough memory: Garbage collector triggers too often => stuttering Too much memory: Garbage collector triggers rarely but takes a few seconds to clear => large lag spikes

also look into optimised gc jvm args