Idea:
Expand/modularize the /nukeentities and /countentities commands like this: /nukeentities <radius> <type> <name>
For instance: "/nukeentities 50 item minecraft:dirt"
Question:
I have a problem at my server that causes my client (well... anyone at the server actually) a lot of fps drops.
Whenever I am in a gui (inventory, game menu, chat, etc.) I have a low entity count (0-100) and decent framerate.
Whenever I close the gui, my entity count suddenly skyrockets to 500-600 and my fps drops to 0-4.
I have tried your /nukeentities command and it succeeded in removing all "normal entities." The "ghost entities," as I like to call them, however, do not seem to disappear. I can not even find these entities with Opis. They seem to only show in the client F3 menu.
I am running my QubeSpace 0.3.0 modpack with +- 150 mods. I have already ruled out both Optifine and Fastcraft as possible causes.
Any ideas as to what may be causing this/how I can fix this?
hmm
a rambling reply of thoughts:
how about /nukeitems <radius>|all <namelist>
example:
/nukeitems all cobble dirt minecraft:arrows
where item name defaults to a mod name of minecraft: if it exists. otherwise you would have to specify the mod name themodid:theitemname
.
hmmm. The change in entity count confuses me. not the number but the idea that it changes when you enter or leave a gui.
using /entitycount 99999 should count every entity that is active on your server when the command is run. I say active because Minecraft keeps chunks active based on where players are and the "view distance" setting. And chunk loaders as well... chunks that are further away from you are not kept active. Perhaps opening the gui is shortening your view distance or perhaps just the updating of those chunks while you are in the interface. This is just a wild guess. The gui issue has me very very curious.
the lowest count of floating items that I have experienced lag from was about 740 arrows that were not despawning. every other instance I have seen lag from too many items was well over that number. The server computer's speed and ram will affect how many items will slow you down as well. A slower computer would be affected by smaller numbers such as the 500 to 600 items that you refer to. I am just thinking aloud here trying to visualize and understand the problem. I do believe you completely.
One thing ive experienced is that setting the client side view distance to about 6 or 7 helps in many cases to prevent too many chunks from being loaded or even transferred to the client every time they move.
Changes to a server where it slows down with increased item numbers are usually where a chunk or chunks are newly made active by a player going near them. The change being that the offending area is newly loaded and now newly slow. Usually i can find the area by doing /entitycount with different radius numbers to locate the rough distance to the area. This assumes one problem area. Then I move and try it again untill i find it. On my servers i do not worry if the entityItems are less than 500 server wide.
Those "ghost entities" are interesting I like your name for them. The latest version of Entity LagFix has the /listother command to help identify those and a /nukeother command to clear them. Remeber to use a large radius such as 5 9s (99999) to cover all the loaded areas of the server. Those 2 commands are specifically for this situation. See the first post in this thread for details on each command. ask me any questions about them as well. The examples in the first post are all from real events on my servers lol. This tool was created from the need for it. lol
In-game machines (TileEntities) such as a pump for monster essence into a tank with way too many speed upgrades can totally bog your system down as well. For this type of lag source I use Opis to find where all the cpu time is going and teleport myself to the problem location and it neatly highlights the offending device in a red box for me. Some times on this teleport I am near the device and cannot see it. I then have to uncover the area to find the highlited box. Just a thought.
The "ghost entities," as I like to call them, however, do not seem to disappear.
Is it possible they are being removed then instantly replaced by a mod?
I can do a /entitycount 99999 then do a /nukemobs 99999 then an immediate /entitycount 99999 and almost all the mobs I removed are instantly replaced by minecraft. lol It did remove the mobs completely but the game made more. Just a thought.
My next thought on this is to try to identify what mod the items are coming from. Perhaps use the /listother 99999 while the server is laggy from the items.
I am not at all familiar with QubeSpace. Do you have a link to it? I am happy to brainstorm or try things to help you though.
Talk to me.
-Andre
PS: VERY IMPORTANT! read the section in post number one where it says "be careful". This is very important!
Thank you for the swift reply.
There are a few things that may not have been clear from my previous post:
1. The server/world I play on is fairly young, so not a lot of terrain has been generated. Everything is roughly within a thousand blocks from spawn and I used 9999 as the radius in all my LagFix commands so that should cover everything.
2. I already used Opis and the entity type with the most instances was the sheep (+-60 pieces) then I killed all of them with your nuke.
3. The /entitycount command could not find more than Opis could. (no others either)
4. Changing my viewing distance did not help.
5. My computer is a laptop that is not "bad." I would not call it super powerful either though. It is capable of running most ftb modpacks with +-15 fps without Optifine. I haven't tested with Optifine.
Tile entities could cause lag, however there aren't a lot of them yet and they are not counted as entities, right? Are particles counted as entities?
I guess if I do not get an answer somewhere (I have asked this at various places) soon, I will have to find out which mod is causing it by the traditional proces of elimination, which would take a long time on 150 mods.
Oh and, QubeSpace is my own modpack
Regards,
Robijnvogel
As for a swift reply you are welcome but actually you just got lucky with the timing lol.
60 sheep cannot be a problem. 600 maybe. Consider how many mobs are in the world when its running fine. /entitycount 9999 to see how many. Farm animals use about the same processing power as a skeleton or zombie.
viewing distance of 6 is good for testing till you have it working well. This will prevent another lag problem while testing yours.
if neither Opis nor LagFix has found a problem then it is likely that entities and tileEntities are not the cause of the lag. It is still probably either 1 mod or interaction between 2 mods causing the lag.
It very well may be that your computer simply cannot handle the processing speed needed for the game with that many mods. Do you have a friend with a fast machine and lots of ram to let you test it on?
You should definately, absolutely, assign at LEAST (no less than) 4 gigs of ram (try 6 gigs) to the server process and the same for the client. I have friends that cannot join our server because their computer doesnt have that much ram to run the game. One cannot even load the game and another's game runs so slow you cant even play. With that number of mods in the modpack its a need for that much ram allocation, not a want. Here is a line to start one of my servers:
The Xms and Xmx parameters above define the ram allocated to the server.
The FTBServer-1.7.10-1448.jar is the main jar file that starts the server.
The -Dfml.queryResult=confirm helps my server recover after a crash with some world damage. I have automatic backups if worst comes to worst.
The -XX:PermSize=256m seems to be important with large modpacks but is still a mystery to me *grin* I suppose I could look it up. lol
The -XX:ParallelGCThreads=2 defines how many process threads to run it with or so I am lead to believe. I would set this to the number of processor cores in your computer or leave it at 2.
This is just for your info and may be too much info for now.
Almost every laptop I have tried (several) have not been able to handle minecraft due to graphics card limitations, lack of ram, or simply processing speed.
My next thought is how much ram do you have allocated to the server and to the client each? This is usually 1 or 2 java parameters that define it.
Another thought is are you running both the server and the client on the laptop together? I have bogged one of my computers down by running 3 servers and a client together but that was an 8 core processor with lots of ram. Yes there were lots of mods in them.
Another thought is can you monitor ramand cpu usage on your computer and see if its nearly maxed out with it all running?
I strongly suspect that Optifine will make things worse for now lol. I suggest solving this before adding that.
Particles are generated client side and are likely a graphics performace issue. but there may be an entity in the world generating them.
One other thought came to mind. With much testing in the past I have come to the conclusion that the Minecraft servers with large modpacks need shut down and restarted preferably 2 times a day but can possibly can be ok restarting 1 time a day. Minecraft servers become very unstable if you do not restart them very regularly.
Yep the process of testing which mod by removing and testing is VERY tedius. Painfully so.
QubeSpace is yours. Cool! Do you have a link to a page for it or is it still in development?
-Andre
PS: /limitanimals is probably better than /nukeentities for sheep and other farm animals.
Hi i'm french, it's possible to delete a specify entities because on my server i have a probleme with a entities (Server thread/ERROR [FML]: A
TileEntity type
codechicken.multipart.handler.MultipartSaveLoad$TileNBTContainer has
throw an exception trying to write state. It will not persist. Report
this to the mod author)
when i delete MultipartSaveLoad$TileNBTContainer with /nukeentitytiles 5 it's ok but i delete other tileentity in the radius.
I want just delete one of type of entity.
Thank's for your work.
is it possible to delete specific entities? not yet. It is a good idea. I have seen several circumstances where this would be useful.
I could add a command to list the short names of all entities and tile entities in a radius. Then a command that would let you specify a radius and the short name of the entity. This could work. I am thinking /listnames and /listtilenames and /nukename and /nuketilename as the commands. Suggestions are welcome.
Due to my life I cannot work on this in the near future but I will commit to doing this at some point in time.
-Andre
PS: I am also thinking of adding a config file to allow you to rename any of the commands in this mod. I did it before in spawn commands teleport mod.
in long: multiple life and medical situations and even recently a dead video card have delayed me. I enjoy and intend to continue with this and other mods but for the moment i am unable. I hope soon but life seems to be interfering right now. I will even put this out for Minecraft 1.8.9 and up as MinecraftForge is updated as well. but for the moment I am on hold and a massive slow-down.
-Andre
PS: if you are desparate this is open-source with the source code included inside the jar file.
hmm
a rambling reply of thoughts:
how about /nukeitems <radius>|all <namelist>
example:
/nukeitems all cobble dirt minecraft:arrows
where item name defaults to a mod name of minecraft: if it exists. otherwise you would have to specify the mod name themodid:theitemname
.
hmmm. The change in entity count confuses me. not the number but the idea that it changes when you enter or leave a gui.
using /entitycount 99999 should count every entity that is active on your server when the command is run. I say active because Minecraft keeps chunks active based on where players are and the "view distance" setting. And chunk loaders as well... chunks that are further away from you are not kept active. Perhaps opening the gui is shortening your view distance or perhaps just the updating of those chunks while you are in the interface. This is just a wild guess. The gui issue has me very very curious.
the lowest count of floating items that I have experienced lag from was about 740 arrows that were not despawning. every other instance I have seen lag from too many items was well over that number. The server computer's speed and ram will affect how many items will slow you down as well. A slower computer would be affected by smaller numbers such as the 500 to 600 items that you refer to. I am just thinking aloud here trying to visualize and understand the problem. I do believe you completely.
One thing ive experienced is that setting the client side view distance to about 6 or 7 helps in many cases to prevent too many chunks from being loaded or even transferred to the client every time they move.
Changes to a server where it slows down with increased item numbers are usually where a chunk or chunks are newly made active by a player going near them. The change being that the offending area is newly loaded and now newly slow. Usually i can find the area by doing /entitycount with different radius numbers to locate the rough distance to the area. This assumes one problem area. Then I move and try it again untill i find it. On my servers i do not worry if the entityItems are less than 500 server wide.
Those "ghost entities" are interesting I like your name for them. The latest version of Entity LagFix has the /listother command to help identify those and a /nukeother command to clear them. Remeber to use a large radius such as 5 9s (99999) to cover all the loaded areas of the server. Those 2 commands are specifically for this situation. See the first post in this thread for details on each command. ask me any questions about them as well. The examples in the first post are all from real events on my servers lol. This tool was created from the need for it. lol
In-game machines (TileEntities) such as a pump for monster essence into a tank with way too many speed upgrades can totally bog your system down as well. For this type of lag source I use Opis to find where all the cpu time is going and teleport myself to the problem location and it neatly highlights the offending device in a red box for me. Some times on this teleport I am near the device and cannot see it. I then have to uncover the area to find the highlited box. Just a thought.
Is it possible they are being removed then instantly replaced by a mod?
I can do a /entitycount 99999 then do a /nukemobs 99999 then an immediate /entitycount 99999 and almost all the mobs I removed are instantly replaced by minecraft. lol It did remove the mobs completely but the game made more. Just a thought.
My next thought on this is to try to identify what mod the items are coming from. Perhaps use the /listother 99999 while the server is laggy from the items.
I am not at all familiar with QubeSpace. Do you have a link to it? I am happy to brainstorm or try things to help you though.
Talk to me.
-Andre
PS: VERY IMPORTANT! read the section in post number one where it says "be careful". This is very important!
my published mods
As for a swift reply you are welcome but actually you just got lucky with the timing lol.
60 sheep cannot be a problem. 600 maybe. Consider how many mobs are in the world when its running fine. /entitycount 9999 to see how many. Farm animals use about the same processing power as a skeleton or zombie.
viewing distance of 6 is good for testing till you have it working well. This will prevent another lag problem while testing yours.
if neither Opis nor LagFix has found a problem then it is likely that entities and tileEntities are not the cause of the lag. It is still probably either 1 mod or interaction between 2 mods causing the lag.
It very well may be that your computer simply cannot handle the processing speed needed for the game with that many mods. Do you have a friend with a fast machine and lots of ram to let you test it on?
You should definately, absolutely, assign at LEAST (no less than) 4 gigs of ram (try 6 gigs) to the server process and the same for the client. I have friends that cannot join our server because their computer doesnt have that much ram to run the game. One cannot even load the game and another's game runs so slow you cant even play. With that number of mods in the modpack its a need for that much ram allocation, not a want. Here is a line to start one of my servers:
The Xms and Xmx parameters above define the ram allocated to the server.
The FTBServer-1.7.10-1448.jar is the main jar file that starts the server.
The -Dfml.queryResult=confirm helps my server recover after a crash with some world damage. I have automatic backups if worst comes to worst.
The -XX:PermSize=256m seems to be important with large modpacks but is still a mystery to me *grin* I suppose I could look it up. lol
The -XX:ParallelGCThreads=2 defines how many process threads to run it with or so I am lead to believe. I would set this to the number of processor cores in your computer or leave it at 2.
This is just for your info and may be too much info for now.
Almost every laptop I have tried (several) have not been able to handle minecraft due to graphics card limitations, lack of ram, or simply processing speed.
My next thought is how much ram do you have allocated to the server and to the client each? This is usually 1 or 2 java parameters that define it.
Another thought is are you running both the server and the client on the laptop together? I have bogged one of my computers down by running 3 servers and a client together but that was an 8 core processor with lots of ram. Yes there were lots of mods in them.
Another thought is can you monitor ram and cpu usage on your computer and see if its nearly maxed out with it all running?
I strongly suspect that Optifine will make things worse for now lol. I suggest solving this before adding that.
Particles are generated client side and are likely a graphics performace issue. but there may be an entity in the world generating them.
One other thought came to mind. With much testing in the past I have come to the conclusion that the Minecraft servers with large modpacks need shut down and restarted preferably 2 times a day but can possibly can be ok restarting 1 time a day. Minecraft servers become very unstable if you do not restart them very regularly.
Yep the process of testing which mod by removing and testing is VERY tedius. Painfully so.
QubeSpace is yours. Cool! Do you have a link to a page for it or is it still in development?
-Andre
PS: /limitanimals is probably better than /nukeentities for sheep and other farm animals.
my published mods
is it possible to delete specific entities? not yet. It is a good idea. I have seen several circumstances where this would be useful.
I could add a command to list the short names of all entities and tile entities in a radius. Then a command that would let you specify a radius and the short name of the entity. This could work. I am thinking /listnames and /listtilenames and /nukename and /nuketilename as the commands. Suggestions are welcome.
Due to my life I cannot work on this in the near future but I will commit to doing this at some point in time.
-Andre
PS: I am also thinking of adding a config file to allow you to rename any of the commands in this mod. I did it before in spawn commands teleport mod.
my published mods
in short yes but its still i n the plan.
in long: multiple life and medical situations and even recently a dead video card have delayed me. I enjoy and intend to continue with this and other mods but for the moment i am unable. I hope soon but life seems to be interfering right now. I will even put this out for Minecraft 1.8.9 and up as MinecraftForge is updated as well. but for the moment I am on hold and a massive slow-down.
-Andre
PS: if you are desparate this is open-source with the source code included inside the jar file.
my published mods
Is the source on github?
this mod "Entity LagFix" is now out for up to Minecraft 1.8 but will be updated to 1.8.9 and 1.9 "eventually"
the source is not on git hub yet but is currently fully included in its jar file. This is open source.
my published mods
is this Mod still available?