| 이해도 | 초보자 |
|---|---|
| 게임버전 (JE) | 1.20.1 |
| 게임버전 (BE) | 관련없음 |
tps 올릴수 있는 최적화 모드 몇개도 추가해보고 그랬는데도 계속 그래서
찾아보니 스파크라는게 있더군요 돌려봤는데 아무리 봐도 모르겠어 가지고
구글링 하다가 답이 없어서 글 남깁니다 ㅜ 도와주세여
평균 동접자는7~8명 모드가 107개 정도 들어있습니다
https://spark.lucko.me/nIecTNXRiz
아래는 서버 프로파일링 입니다
| 이해도 | 초보자 |
|---|---|
| 게임버전 (JE) | 1.20.1 |
| 게임버전 (BE) | 관련없음 |
tps 올릴수 있는 최적화 모드 몇개도 추가해보고 그랬는데도 계속 그래서
찾아보니 스파크라는게 있더군요 돌려봤는데 아무리 봐도 모르겠어 가지고
구글링 하다가 답이 없어서 글 남깁니다 ㅜ 도와주세여
평균 동접자는7~8명 모드가 107개 정도 들어있습니다
https://spark.lucko.me/nIecTNXRiz
아래는 서버 프로파일링 입니다
Sidite
2026.01.19데이터팩의 function이 가장 크게 먹습니다.(57%. 그중 nbt={}가 45%) 그 다음은 스켈레톤(13%)을 먹습니다.
다만 function은 spark에 잘 잡히진 않습니다.
/perf 명령어로 실행하고 10초 기다리면 (서버 디렉토리)/debug/profiling이 생깁니다. 가장 최근에 생성된 파일을 업로드하세요.
4e008e
2026.01.19감사합니다 서버 프로파일링 업데이트 했습니다 excute 명령어가 많이 실행 되는걸 확인했는데 꼭 빼야 해결이 되는걸까요 ?
Sidite
29 일 전weather라는 네임스페이스를 가진 데이터팩이 문제로 보입니다. 검색해도 못찾는거 보니 아마도 직접 만든것 같군요...
과도한 nbt={} 사용, 과도한 @e 사용, 과도한 data 사용 등이 문제가 겹쳐져 심각한 tps 저하가 발생했습니다.
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air run effect give @s minecraft:regeneration 2 3 true
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ minecraft:cobblestone if block ~ ~2 ~ air run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~ ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~ ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air run effect give @s minecraft:regeneration 2 3 true
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~ ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ minecraft:cobblestone if block ~ ~2 ~ air run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~ ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ minecraft:cobblestone run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air run tp @s ~ ~0.2
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~1 ~ spore:infested_netherrack run tp @s ~ ~0.2 ~
execute as @e[type=#spore:fungus_entities,nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] at @s if block ~ ~2 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
빨간색 글자에서 조건을 반복적으로 확인하기에 렉이 n배로 더 걸립니다. 따라서 개체를 다시한번 검사하는 대신에...
execute as @e[type=#spore:fungus_entities] at @s[nbt={Motion:[0.0d,0.0d,0.0d],OnGround:0b}] run function weather:fungus_entities
fungus_entities.mcfunction
execute if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air run effect give @s minecraft:regeneration 2 3 true
execute if block ~ ~3 ~ spore:infested_netherrack if block ~ ~2 ~ air at @s run tp @s ~ ~0.2 ~
execute if block ~ ~2 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
execute if block ~ ~2 ~ spore:infested_netherrack at @s run tp @s ~ ~0.2 ~
execute if block ~ ~1 ~ spore:infested_netherrack run effect give @s minecraft:regeneration 2 3 true
execute if block ~ ~1 ~ spore:infested_netherrack at @s run tp @s ~ ~0.2 ~
execute if block ~ ~ ~ spore:infested_netherrack at @s run tp @s ~ ~0.2 ~
execute if block ~ ~ ~ spore:infested_netherrack at @s run tp @s ~ ~0.2 ~
execute if block ~ ~3 ~ minecraft:cobblestone if block ~ ~2 ~ air at @s run tp @s ~ ~0.2 ~
execute if block ~ ~2 ~ minecraft:cobblestone at @s run tp @s ~ ~0.2 ~
execute if block ~ ~1 ~ minecraft:cobblestone at @s run tp @s ~ ~0.2 ~
execute if block ~ ~ ~ minecraft:cobblestone at @s run tp @s ~ ~0.2 ~
execute if block ~ ~ ~ minecraft:cobblestone at @s run tp @s ~ ~0.2 ~
데이터팩을 이런식으로 만들면 @e 호출 최소화, nbt={} 최소화를 하여 최적화를 진행 할 수 있게 됩니다. 다시보니 중복 조건이 있어서 한번 더 최적화를 했습니다.
이것 말고도 다른것도 있으나 직접 중복 조건을 찾는게 더 빠르실겁니다.