modelengine has a huge memory leak with basic entities, I had the issue with my own non vanilla custom entities using the api then I tested with plain vanilla ones
my meg config https://hastebin.ianhon.com/e322
here is the test, spawning 1000 pigs then just wait couple minutes and you're up + 2 go of ram currently the plugin can't be used in production leaking like that, with 1k entities I fill my 11go of ram in less than 45 minutes
pigs.add(p.getLocation().getWorld().spawn(p.getLocation(), Pig.class, pig -> { pig.setInvulnerable(true); ModelEngineAPI.createModeledEntity(pig).addModel(ModelEngineAPI.createActiveModel(finalModel), true); }));
also it's not new I had this issue for a long time I just investigated that just now