mod LAG impact comparison [closed]

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison

by Festus1965 » Post

joe7575 wrote:
Sat May 07, 2022 12:01
If you do this for typical mod use cases, you will get real results...
sorry : /profiler is builtin minetest ... if someone want to tell this is failed measure ... argue to devs !

This are real results, but from another perspective, everyone can easy do, with whatever hardware is used,
as on the base of then future base hardware and only starting engine and MTG the admin can then easy calculate up.

If testing on htop CPU core Thread impact is also real results, and would be calculated up same way,
as in both cases the new admin has to get his basic load, if it is in % to /profiler base 100% or to the base of Core %. At the end I think the result is same, with maybe more accurate with my load, as it does not measure the engine base load ? ... that might NOT rise and so maybe false the load expected.

If someone want to do that system, feel free. I think results are very similar.


Yes,
small PC as I use for games testing, 2 Core 1400 - as I did,

and first I look for absolute useless actions on empty server (just MTG) nothing build, no login
as most of all server ARE empty most time, and they all use also low budget hardware, where this first impression is important for their success and not giving up yo early - I remember the both Raspberrry server tuning, setting.

and also yes, every mod also can have a different impact on a working, real server - but from that situation I have profiler results since 3 years.

Today I found even older comments in this direction - I am not the first one, pointing on this.
burli wrote:
Thu Apr 14, 2016 21:04
Hi, I want to know which type of mod has an impact to the fps, to the server, to both or has no effect

For example mobs, mapgens, mods like ambience, plantlife...
CraigyDavi wrote:
Wed Mar 05, 2014 16:31
Has anyone got any more ideas for reducing server lag?
This is what I have tried already:
- /clearobjects
- Server performance settings
- Choosing lag-free mods
I have also tried a few other smaller things such as limiting amount of players who can join.
ErrorNull wrote:
Wed Dec 21, 2016 15:41
when importing into minetest_game, the wieldlight functionality of the 3d torched mod was left out. my guess is because it adds some lag, though the lag issue has been improved so much already.
sofar wrote:
Sat Feb 04, 2017 09:33
Similar to the flowerpot, I've made a new item frame that does not use entities. It should make it possible for multiplayer servers to use item frames without adding lag or much extra loading time, while still offering a large amount of item frame possibilities.
lopper wrote:
Sat Jun 03, 2017 15:54
I might be able to help you out I think I could look at your source code and try to make a build with better performance.
but it might be in a few weeks because of my schedule. But I will 100% look into this. Anybody got any comments please do ask and comment, I want to see if anybody else has the same issue with the BottleNecking in MineTest.
Hume2 wrote:
Thu Dec 12, 2019 17:41
I don't understand what is happening there. For each step, there is a fixed list of actions which need to be done. It's coded in serverenvironment.cpp. It is:
  • Increment game time
  • Handle players
  • Manage active block list
  • Mess around in active blocks
  • Step script environment (run global on_step())
  • Step active objects
  • Manage active objects
  • Manage particle spawner expiration
Last edited by Festus1965 on Wed May 11, 2022 21:22, edited 9 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
BuckarooBanzay
Member
Posts: 435
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: mod LAG impact comparison

by BuckarooBanzay » Post

*gasp* the void game uses 100% "cpu"!
i didn't even do anything :O

Code: Select all

 instrumentation                                         |    min µs |    max µs |    avg µs | min % | max % | avg %
-------------------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
 ??:                                                     |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
  - on_joinplayer[1] ..................................  |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
-------------------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
 total:                                                  |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
/s
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: mod LAG impact comparison

by Festus1965 » Post

BuckarooBanzay wrote:
Sat May 07, 2022 20:45
*gasp* the void game uses 100% "cpu"!
i didn't even do anything :O

Code: Select all

 instrumentation                                         |    min µs |    max µs |    avg µs | min % | max % | avg %
-------------------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
 ??:                                                     |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
  - on_joinplayer[1] ..................................  |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
-------------------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
 total:                                                  |       195 |       195 |       195 | 100.0 | 100.0 | 100.0
/s
I would say: It used 100% of the minetest game based CPU usage. I am sure the CPU was not itself at 100%.
Yes, I still don't know what mod (?) that is.

But you might be right here, as if that was the ONLY one mod running, then is has 100% of all usage.
What is so difficult to understand or wonder there?
That is the basic about % percent of a sum.

When my server is the only energy sytem running in my house, it will be the user of also 100% of my energy usage,
and if I start my PC, the usage of the server will be same (near as of reactivate power change)
but now 100% is the sum of both usages, where the server itself will NOT have 100% then ... as they share this new 100% on a higher level.


Example:
* server takes 70 Watt alone:
= server has 100% of all energy usage in my room if no any other electric unit is switched on !

* I open 2 fan to blow hot air out : fans using both each 35 Watt sum 70 Watt
= the room now use 140 Watt, what is now new 100% of combined usage
where ...
now the server, still same 70 Watt now uses 'only' the share of 50%
and the both fans have another 70 Watt usage = 50% of all
here mean the Fans doubled or +100 the load of energy in my room

* so if I start now my server, the all over usage in my room rise to 285 Watt
= 285 Watt minus before 140 Watt = another 145 Watt more usage and this 285 Watt are new 100%
here now:
the gaming PC leads with 145 Watt = 50.8 % (as would be shown in /profiler)
the server MT with still same 70 Watt now seam to have 'only' 24.6 % but the impact, power is still same
and also the fans still use 70 Watt together, and also shown by 24.6 %, also use the same Watt as before.

So two option here:
* without the fans my Ga0ming PC would have higher % in lower Watt sum, or rise from 70 to 215 Watt = tripple
* but with the fans the same plus on energy using is doubling it.

So simple, when realizing two things:
* 100% is the sum of all measured, but
* the same mod like player_api measured before without and after with another mod had in both cases the same amount of CPU usage,
that just looks smaller with another mod measured.

As example with server 70 Watt ... always same, just its % together with more energy using units changes.



And so the most important funny conclusion at the end:
If the mod gamer_api would not use so much useless CPU time,
the impact of other mods (work for nothing) would be much higher then even.

btw : I still can't report issue with server crash bug in atm ... have fun admins and thank 'him' for cut me out.
Last edited by Festus1965 on Sun May 08, 2022 03:44, edited 2 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - what_is_this_wow

by Festus1965 » Post

retested with video ...

clear data out from minetest /profiler, = official builtin measure system of minetest itself

old version under
* engine 5.5.0 and mtg 5.5.0
* with globalstep used 66.6 % of all CPU time on empty world, no gamer inside

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
---------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
what_is_this_owo:                              |         1 |       309 |        88 |   1.6 |  92.1 |  66.6
  - globalstep[1] ...........................  |         1 |       309 |        88 |   0.3 |  92.1 |  66.4
  - /witowo .................................  |        24 |        36 |        29 |  21.5 |  46.6 |  33.3
  - on_joinplayer[1] ........................  |        56 |        56 |        56 |   8.4 |   8.4 |   8.4
new version without globalstep used 0.5 % of all CPU time on same empty server world, no gamer

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
---------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------
what_is_this_owo:                              |         0 |       173 |         0 |   0.0 |  93.5 |   0.5
  - on_punchnode[1] .........................  |        21 |       173 |        67 |  60.0 |  93.5 |  78.7
  - on_joinplayer[1] ........................  |        54 |        62 |        58 |   1.4 |   6.3 |   3.9
  - /witowo .................................  |         3 |        30 |        16 |  15.8 |  68.2 |  42.0

the results below in video are now taken with:
* engine 5.6.0-dev (07.05.2022)
* mtgame 5.6.0-dev (07.05.2022)

* empty :
** player_api : 91.9 %

* globalstep version : avg 88 µs
** what_is_this_owo : 64.0 % (this is tripple old CPU usage, or add 200% load)
** player_api : 30.5 %

* non globalstep, not used: avg 0 µs
** player_api : 91.0 %
** what_is_this_owo : 0/0 % (right, no usage = no impact, perfect)

* non globalstep, but mod used:
** player_api : 88,8 %
** what_is_this_owo : 3.8 % (right, some usage = some impact, logic ok)

Video about the hole measurement, short time run
Last edited by Festus1965 on Tue May 10, 2022 23:53, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - wielded_light / 3d_armor_light

by Festus1965 » Post

yes,
gamer want it ... I learn years go mining with 99 torch, and wood to rebuild, but ...

tested on newer 5.6.0-dev, with also MTG 5.6.0-dev
empty test before show no difference in results

wielded_light (1646439/13.10.2021)
3d_armor_light (3806ce8/20.07.2021)

/profiler:"
* player_api : 76.2 %
* wielded light 17 %

then test with plus
* player_api 71.7 %
* wielded_light 20.4 %
* 3d_armor_light 0.0 %


again : this is step testing without real using, mean useless lag impact, just as of installed !

I test this combination also on my server AsiaThailand,
wielded_light WILL be highest usage after pipeworks+technic+technic_aluminum is off next.
= I am interested in a tuning on that one.
Last edited by Festus1965 on Tue May 10, 2022 23:52, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: mod LAG impact comparison

by LMD » Post

what_is_this_owo takes 88 avg µs (per step) in an empty world. Do you know what microseconds are?

Your server step is probably 0.045 or 0.09 (around 20 / 10 steps per second, slightly higher to account for lag). Let's assume the former. Now let's compute the actual, absolute percentage of the server step used what_is_this_owo in an empty world:

Code: Select all

> 88e-6/0.45*100
0.019555555555556
That's right. Not 66%. Zero point zero two percent. Let that sink in. Zero point two promille (!) of absolute CPU usage (raw estimate) with a fast-paced globalstep; it would only be zero point one promille if the globalstep was normal-paced.

Let me repeat: 66% of a couple µs mean nothing.
My stuff: Projects - Mods - Website

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: mod LAG impact comparison

by Festus1965 » Post

LMD wrote:
Sun May 08, 2022 07:21
Let me repeat: 66% of a couple µs mean nothing.
I see your point, but even this nothing is registered by /profiler.
And when I would take your microseconds compare to the microseconds of player_api and compare them ?
Where we are then again ? I guess back to 66% compare to also nothing from player_api and the rest of MTG.

And at the end you wanna tell me that /profiler is ... wrong.
Tell that to the devs ... it is build in, Point

But nothing or not, is is measured, and compare to the even lower impact of mtg itself with player_api it shows, it want more time that player_api. And that is double of it, or in the new 100% this 66%.

There is no discussion if it is very low, % does not depend on less or much, it compares two numbers.
If you have 66 Euro of 100 Euro, or 66.000 Euro of 100.000 Euro - both is 66% of the other.
Same in Time, wages or length ... mass whatever.

And /profiler is measure that ... relationship.

Do not blame me, blame the devs if you don't like the result of /profiler.


And as long you are NOT also measure on the same way the microsecons of mtg itself impact in ms s... your way is only half, as I compare 2 TWO situations, that is in % to the basic one ... you only argue with one result, without bring the other time usage, that would be basic 100%.

You are arguing like this mod is only 6 Eurocent and nothing against my 66 Euro, but your forget to tell me maybe or measure how much Eurocent is MTG alone ... I guess 2 Eurocent.
... or based on this:

Code: Select all

> 88e-6/0.45*100
0.019555555555556
there might be 0.006518 used by MTG without this mod, I calculate fast over.
And as long this result is not included in your answer ... nothing worth, as I don't talk about absolut, I talk about relationship of minimum TWO values !

Now I have it:
you are arguing like a seller: "My orange juice is only 6 Cent!" not telling me also that just around the corner another sell the same also for 2 Cent.
Mean : no two values = no comparison, no %
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - discussion

by Festus1965 » Post

LMD wrote:
Sun May 08, 2022 07:21
Let me repeat: 66% of a couple µs mean nothing.
or I try another way:

Imagine I have a car and measure the gasoline usage just with me as driver, same distance, same speed, wind ... and get a average gasoline usage per distance.

Now I install a top carrier for cycle (but without cycle yet) and go go the same driver, street, distance, etc ...

I had this pack with bicycle and surfing board and know the impact.

I have now two values: the avg gasoline without and with the carrier.
Maybe without was 6 ltr/100 and with the carrier 7 ltr/100 km - that are two values and allow me to calculate the % the avg as rising (7-6)/6 = 16.66 % more


Maybe you realize now, that you are in the situation and ONLY tell me, yes just 1 ltr per 100 km more ... but I still miss the base 100%, mean the same measure from MTG.
But that 1 ltr more is different, if the base as just 2 lit oder already 100 ltr.


And now as my base is always the same mtg usage,
admins can even go further and add different mods in the list, as if base is same 100% then rising % could be added also.
I am able to create a php page with mtg and ask for a value if have (maybe % of one CPU) and depending on what mods the user adds with marking, it will automatic show the estimated % usage in this case with that mod choices. Nice ha ?
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: mod LAG impact comparison - discussion

by LMD » Post

Festus1965 wrote:
Mon May 09, 2022 06:51
LMD wrote:
Sun May 08, 2022 07:21
Let me repeat: 66% of a couple µs mean nothing.
Maybe you realize now, that you are in the situation and ONLY tell me, yes just 1 ltr per 100 km more ... but I still miss the base 100%, mean the same measure from MTG.
I literally told you what the "base 100%" are! And they are a couple microseconds (comparable to something like 0.001 litres in your car example).
My stuff: Projects - Mods - Website

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: mod LAG impact comparison - discussion

by Festus1965 » Post

LMD wrote:
Mon May 09, 2022 09:41
I literally told you what the "base 100%" are! And they are a couple microseconds (comparable to something like 0.001 liters in your car example).
I guess I saw it now ... ok, thanks.

But as I am in the moment not able to reproduce this results, I can't use this calculations.

But anyway I go ahead. /profiler is builtin and the base for me.
And when /profiler - official in minetest - tell me that result, I have to take that, as long I have no other way that I can follow or, as said, reproduce.

And after found at /status get ... this max_lagEstimate ... in code ... I have nothing else then /profiler. :-)
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - microseconds

by Festus1965 » Post

interesting examples

and as microseconds are also shown in the /profiler save files, I take a look:

first the one with original globalstep what_is_this_wow result:
* what_is_this_wow : min 2 max 259, avg 33
compare to all other (as then MTG):
* mtg ... : only avg ... : 6 + 1 + 86 + 1 + 0 + 0 + 1 + 1 + 0 + 0 = 96

funny, down in the sum /profiler show : avg 63 to all
but taking this avg 63, and the 33 from the mod we still have over 52% part of mod what_is_this_owo at new combined impact at global step version.

taking the following test I ded new then with non globalstep version:
* what_is_that_owo : avg 1 microsecond
* all together shown : 58 microseconds
then with new version there is only part of 1.7 % - near what you are arguing.

Could it be that our discussion was about non globalstep compare to with globalstep ? (new version1.5 % against old 66 %, or here 52,3 %)

old globalstep:

Code: Select all

instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
new, no globalstep:
Last edited by Festus1965 on Tue May 10, 2022 15:41, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - poshud, again

by Festus1965 » Post

poshud

nice tool, seam to be more accurate and informative then /status as show the range between min and max, as actual

/profiler again, sure ...

poshud: | 3 | 114 | 12 | 0.1 | 96.5 | 51.9
- globalstep[1] ..................................... | 3 | 114 | 12 | 0.1 | 96.5 | 51.9

against total:
total: | 4 | 10145 | 28 | 100.0 | 100.0 | 100.0

with one example, main part of mtg:
player_api: | 1 | 104 | 10 | 0.2 | 90.0 | 43.4
- globalstep[1] ..................................... | 1 | 104 | 10 | 0.0 | 90.0 | 43.4
- on_joinplayer[2] .................................. | 21 | 21 | 21 | 0.2 | 0.2 | 0.2
- on_joinplayer[1] .................................. | 1 | 1 | 1 | 0.0 | 0.0 | 0.0


with the avg % poshud I mark as doubling basic mtg impact, as 51.9 % of new combined usage, or load + ~100%

taking the average microseconds:
* poshud : 12
* all : 28
it looks not so hard as 12 from 28 are then just part of all new with 42% base on avg microseconds
but anyway, the impact is also seen here in microseconds, and also clear so see
(I may have to be able to look more into profiler next 2 years ...)

compare to the similar globalstep player_api with avg 10 to poshud 12 I am again at 54 % ore even 120 % rise.


the OTHER thing that might be able to extract out of real, here then max microseconds is what mod would be most likely be responsible for peaks !
out of this profiler with MTG and only postool:
* sfinv: with 9704 max microseconds
* default : 1903
* fire : 174
* env_sound : 122
* poshud : 114
* player_api and binoculars each : 104

the more looking into it, the more I see
* looking into real microseconds is NOT changing the result from % on avg usage much,
* but it might also be possible then to find out two different lag maker:
** average, as looking yet with avg %, or now also avg microseconds
** lag peak responsible mods ...

.... to be continued ...

I wanna take a new /profiler anyway from my running server and check for this new view,
I mean lag peaker ... as shown in two examples now that avg microsecons and avg % is not that different from each other ...
but also have to mention, that this both new /profiler exports with poshud are short testings with about 10 minutes.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - example AsiaThailand

by Festus1965 » Post

example AsiaThailand with also some 'stange' basic settings
BUT no break as of slow IO in memory and/or disc !

run 10 hours taken:

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
 total:                                        |        23 |    272572 |      2035 | 100.0 | 100.0 | 100.0

Code: Select all

 technic:                                      |         2 |     33987 |       483 |   0.0 |  99.1 |  31.9
 pipeworks:                                    |         0 |     61832 |       608 |   0.0 |  98.6 |  24.6
... do I have to remember that around spawn an most gamer don't use that anymore ?
 mobs_monster:                                 |         0 |     33220 |       146 |   0.0 |  98.3 |   7.8
 wielded_light:                                |         0 |     42710 |       139 |   0.0 |  97.1 |   5.6
 unified_inventory:                            |         0 |     36463 |        62 |   0.0 |  97.9 |   4.2
 player_api:                                   |         0 |     34438 |        60 |   0.0 |  97.1 |   3.9
  (player_api : can be taken as mtg itself 100 % base as oi it's dominance in MTG - 90%)
 poshud:                                       |         2 |     28424 |        45 |   0.0 |  97.4 |   3.2
 mobs_animal:                                  |         0 |     30178 |        56 |   0.0 |  97.8 |   3.0
 default:                                      |         0 |     42630 |        72 |   0.0 |  65.4 |   2.4
 mobs_humans:                                  |         0 |     34340 |        40 |   0.0 |  96.0 |   2.2
 mobs_fish:                                    |         0 |     31949 |        31 |   0.0 |  91.6 |   1.6
 spacesuit:                                    |         0 |     31018 |        21 |   0.0 |  96.3 |   0.8
 areas:                                        |         0 |     66457 |        11 |   0.0 |  93.4 |   0.7
 fire:                                         |         0 |     30509 |        20 |   0.0 |  92.2 |   0.6
 mobs_jellyfish:                               |         0 |     29511 |        11 |   0.0 |  95.6 |   0.6
 protector:                                    |         0 |      8277 |        16 |   0.0 |  89.1 |   0.5
 postool:                                      |         1 |      1215 |         6 |   0.0 |  48.9 |   0.5
 mobs_bat:                                     |         0 |      3897 |         9 |   0.0 |  75.1 |   0.4
 techage:                                      |         0 |     28698 |         5 |   0.0 |  66.6 |   0.4
 3d_armor:                                     |         0 |     23638 |         6 |   0.0 |  87.2 |   0.4
sort decending by avg microseconds: top 12 ?

Code: Select all

 pipeworks:                                    	0	61832	608	   0.0 	  98.6 	  24.6
 technic:                                      	2	33987	483	   0.0 	  99.1 	  31.9
 mobs_monster:                                 	0	33220	146	   0.0 	  98.3 	   7.8
 wielded_light:                                	0	42710	139	   0.0 	  97.1 	   5.6
 default:                                      	0	42630	72	   0.0 	  65.4 	   2.4
 unified_inventory:                            	0	36463	62	   0.0 	  97.9 	   4.2
 player_api:                                   	0	34438	60	   0.0 	  97.1 	   3.9
 mobs_animal:                                  	0	30178	56	   0.0 	  97.8 	   3.0
 basic_robot:                                  	0	28874	51	   0.0 	  92.9 	   1.2
 poshud:                                 	2	28424	45	   0.0 	  97.4 	   3.2
 stats:                                     	0	246298	44	   0.0 	  99.9 	   0.2
 mobs_humans:                                	0	34340	40	   0.0 	  96.0 	   2.2
sort decending by peak:

Code: Select all

 biome_lib:                                            	0	265185	6	   0.0 	  99.6 	   0.2
 stats:                                              	0	246298	44	   0.0 	  99.9 	   0.2
 nether:                                           	0	179631	0	   0.0 	  77.2 	   0.0
 xp_redo:                                        	0	113598	12	   0.0 	  98.9 	   0.6
 unified_inventory_plus:                         	0	95301	5	   0.0 	  99.4 	   0.0
 node_changer:                                     	0	83017	2	   0.0 	  98.7 	   0.0
 technic_worldgen:                                 	0	69517	1	   0.0 	  98.1 	   0.0
 areas:                                            	0	66457	11	   0.0 	  93.4 	   0.7
 moretrees:                                          	0	63487	0	   0.0 	  98.4 	   0.0
 signs_lib:                                       	0	61876	2	   0.0 	  99.3 	   0.0
 pipeworks:                                           	0	61832	608	   0.0 	  98.6 	  24.6
 farming:                                         	0	54071	9	   0.0 	  98.3 	   0.1

start with pipeworks+technic:

Code: Select all

 total:                                        |        23 |    272572 |      2035 | 100.0 | 100.0 | 100.0

Code: Select all

 technic:                                      |         2 |     33987 |       483 |   0.0 |  99.1 |  31.9
 pipeworks:                                    |         0 |     61832 |       608 |   0.0 |  98.6 |  24.6
by avg % they (still, as most unused) take : 31.9 + 24.6 = 56.5 % of all
by avg microseconds : 483 + 608 = 1091 is 53.6 % from 2035 sum in microseconds (as I told % is universal)
... so when they are off, like Sundays now ... the average lag of server should be half down
(what difficult to see with this max_lagEstimate ... thing)
... but fore sure, I don't have this effects from other server at 20 gamer even with 40 gamer at me: disappear build nodes, or coming back nodes after dig ...


looking further to reduce lag on my server sure I have to look the then Top 10 with mods ahead
short how it looks without pipeworks+technic - to see how % rise as of lower sum:

Code: Select all

instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
 total:                                        |        18 |    297151 |      1858 | 100.0 | 100.0 | 100.0
with top ...

Code: Select all

 mobs_monster:                                 |         0 |     55971 |       290 |   0.0 |  99.5 |  18.7
 mobs_animal:                                  |         0 |     27819 |       228 |   0.0 |  99.2 |  12.9
 wielded_light:                                |         0 |     75604 |       290 |   0.0 |  97.9 |  12.7
 unified_inventory:                            |         0 |     55421 |       108 |   0.0 |  98.3 |   9.6
 player_api:                                   |         0 |     25756 |       107 |   0.0 |  98.3 |   8.9
 poshud:                                       |         2 |     26898 |        82 |   0.0 |  97.8 |   7.4
 mobs_humans:                                  |         0 |     23437 |        80 |   0.0 |  97.7 |   5.3
 default:                                      |         0 |     73337 |       106 |   0.0 |  85.0 |   5.0
 mobs_fish:                                    |         0 |     20445 |        44 |   0.0 |  97.2 |   3.3
 mobs_jellyfish:                               |         0 |     17295 |        26 |   0.0 |  95.0 |   1.6 
 spacesuit:                                    |         0 |     27275 |        54 |   0.0 |  97.9 |   1.5
 areas:                                        |         0 |     95805 |        27 |   0.0 |  97.3 |   1.2
 fire:                                         |         0 |     27025 |        56 |   0.0 |  96.3 |   1.2
 techage:                                      |         0 |     49376 |         9 |   0.0 |  97.8 |   0.8 
as see here with player_api and postool: they are still similar avg impact, as they was also in only compare MTG to poshud !
That show also here, it is possible to estimate the end lag with this % compare.

mobs_redo also fulfill the test on empty server = keep silent,
but sure USED mobs_xxx are higher, as not empty server and clear to understand, and adjustable then also

wielded_light and unified_inventory
I will test then soon also on empty server, but estimate from this results and player_api will be:
* wielded_light : 30% higher than player_api, or about 55%+ from sum
* unified_inventory : very similar to it, mean share the 45% in sum


Sorting this also in peak usage:

Code: Select all

 areas:                                           	0	95805	27	   0.0 	  97.3 	   1.2
 wielded_light:                                  	0	75604	290	   0.0 	  97.9 	  12.7
 default:                                        	0	73337	106	   0.0 	  85.0 	   5.0
 mobs_monster:                                    	0	55971	290	   0.0 	  99.5 	  18.7
 unified_inventory:                                 	0	55421	108	   0.0 	  98.3 	   9.6
 techage:                                        	0	49376	9	   0.0 	  97.8 	   0.8
 mobs_animal:                                       	0	27819	228	   0.0 	  99.2 	  12.9
 spacesuit:                                            	0	27275	54	   0.0 	  97.9 	   1.5
 fire:                                               	0	27025	56	   0.0 	  96.3 	   1.2
 poshud:                                         	2	26898	82	   0.0 	  97.8 	   7.4
 player_api:                                          	0	25756	107	   0.0 	  98.3 	   8.9
 mobs_humans:                                     	0	23437	80	   0.0 	  97.7 	   5.3
 mobs_fish:                                           	0	20445	44	   0.0 	  97.2 	   3.3
 mobs_jellyfish:                                      	0	17295	26	   0.0 	  95.0 	   1.6 
I might have to take a look into top 3 as something makes those take maybe even just one time a huge amount.
Could be just the start of game ... and responsible tor this first seconds high lag - then ok.

The extract with still pipeworks and technic show in the following positions 3ff the near exact ranks then from top without this mods.
It is quit sure that this can be used ... better then estimated max_lag

and also the difference in absolute avg microseconds manual calculated % is not far from the given in profiler export also.
To take the given and also near correct avg % direct is just faster.


Those mods with:
* high average impact (avg microseconds or avg %) need more code improvement
* high peak impact might need better storage, cache or also code improvement

as a fast hint from my experience as Oracle database manager


At the end every mod could be catheterized on impact in:
* server start, load (just after empty or full server started, login, take /profiler save ?)
* empty (server / no gamer ) ... much useless work - this here
* high impact some time (peaking, if different of higher than at server start)
* avg impact on used server, mean high usage when 'used' (difficult ... maybe what is not high at empty)
Last edited by Festus1965 on Tue May 10, 2022 15:39, edited 3 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - unified_inventory

by Festus1965 » Post

unified_inventory

source :
https://github.com/minetest-mods/unified_inventory
04b2edc/06.06.2020

sure there is a more actual version, but this issue must have happen after my used version, as the full restart on AsiaThailand for ALL takes about 2:30 m:ss, so not sure if I should touch that already.
Mrbid wrote: @mrbid mrbid mentioned this pull request on Feb 24
Slow to start server, gets slower the more nodes it has to index. 9+ minutes added to my server start
could be he has a LOT of mods with nodes, or/and a very slow hardware ...

My last start sequence saved: 19.02.2022
15:39:11: [1.Mod] woodcutting
... load 170 marked mod = changed init.lua with report at terminal (mod name, version, date)
15:40:40: ACTION ... after show Minetest
= 1:29 even only + 10 sec waiting sh for restart, 10 sec about mt get ready for login


after 10 hours run empty server, only 2 login player sneak after 1 hour, and before finish to get /profiler save':

Code: Select all

instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
player_api:                                   |         0 |       213 |         2 |   0.0 | 100.0 |  67.0

Code: Select all

unified_inventory:                            |         0 |      3033 |         0 |   0.0 | 100.0 |  18.5
fast :
the mod unified_inventory is much better in 'silent' mode then thought, mean not making too much lag when not needed. Just 18 % on empty server.
The peak is similar to on_joinplayer, so action related.
Last edited by Festus1965 on Tue May 10, 2022 22:27, edited 7 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - wielded_light

by Festus1965 » Post

wielded_light

source: https://github.com/minetest-mods/wielded_light
1646439/13.10.2021

Code: Select all

instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %

Code: Select all

player_api:                                   |         0 |       246 |         3 |   0.0 | 100.0 |  56.4
  - globalstep[1] ..........................  |         1 |       246 |         3 |   0.1 | 100.0 |  56.5
  - on_joinplayer[2] .......................  |        19 |        19 |        19 |   0.7 |   0.7 |   0.7
  - on_joinplayer[1] .......................  |         1 |         1 |         1 |   0.0 |   0.0 |   0.0

 wielded_light:                               |         0 |       320 |         1 |   0.0 | 100.0 |  30.4
  - globalstep[1] ..........................  |         1 |       320 |         1 |   0.1 | 100.0 |  30.8
as before tested
now 30%, or + 43 % load up - run about 12 hours to 99% no gamer in, no light in a gamer hand
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - playeranim

by Festus1965 » Post

playeranim

source : https://github.com/minetest-mods/playeranim
(e0acae8/10.04.2022)

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
---------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------

 player_api:                                   |         0 |       201 |         2 |   0.0 | 100.0 |  65.2
  - globalstep[1] ...........................  |         1 |       201 |         2 |   0.1 | 100.0 |  65.7
  - on_leaveplayer[1] .......................  |         1 |         1 |         1 |   3.0 |   3.0 |   3.0
  - on_joinplayer[2] ........................  |        18 |        35 |        26 |   0.6 |   3.5 |   2.0
  - on_joinplayer[1] ........................  |         1 |         1 |         1 |   0.1 |   0.1 |   0.1

 playeranim:                                   |         0 |       220 |         0 |   0.0 | 100.0 |  20.7
  - globalstep[1] ...........................  |         1 |       220 |         1 |   0.0 | 100.0 |  28.3
  - on_joinplayer[2] ........................  |         1 |         7 |         4 |   0.1 |   0.2 |   0.2
  - on_joinplayer[1] ........................  |         1 |         1 |         1 |   0.0 |   0.1 |   0.1

 fire:                                         |         0 |       155 |         0 |   0.0 | 100.0 |  14.1
  - globalstep[1] ...........................  |         1 |       155 |         1 |   0.0 | 100.0 |  25.6
20.7 % of new full, or 26.1 % more then without it.
again - for a server 99% without gamer in ... a lot of (useless work)
Last edited by Festus1965 on Fri May 13, 2022 11:59, edited 5 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - modlib

by Festus1965 » Post

modlib

"Multipurpose Minetest Modding Library" or "Mehrzweck-Minetest-Modding-Bibliothek"

source:
https://github.com/appgurueu/modlib
f0d888d/11.05.2022

tested as needed for ... character_anim (test below)

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
---------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------

 player_api:                                   |         0 |       288 |         2 |   0.0 | 100.0 |  57.9
  - globalstep[1] ...........................  |         1 |       288 |         2 |   0.1 | 100.0 |  59.0
  - on_leaveplayer[1] .......................  |         1 |         1 |         1 |   5.0 |   5.0 |   5.0
  - on_joinplayer[2] ........................  |        19 |        20 |        19 |   0.8 |   3.5 |   2.2
  - on_joinplayer[1] ........................  |         1 |         1 |         1 |   0.0 |   0.2 |   0.1

 fire:                                         |         0 |       199 |         0 |   0.0 | 100.0 |  21.1
  - globalstep[1] ...........................  |         1 |       199 |         1 |   0.1 | 100.0 |  28.7
  - on_leaveplayer[1] .......................  |         1 |         1 |         1 |   5.0 |   5.0 |   5.0

 modlib:                                       |         0 |       124 |         0 |   0.0 | 100.0 |  21.0
  - globalstep[1] ...........................  |         1 |       124 |         1 |   0.1 | 100.0 |  28.7
uses 21 % of combined CPU usage (mts+mods) on empty world and 99% now gamer logged in.
or raise the basic load MTG by 26.6%.

But itself it is depend for character_anim (test below) we see next two days.
As I also used playeranim (test above) before and cut it out as of ... lag part.
Last edited by Festus1965 on Thu May 12, 2022 21:09, edited 7 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - character_anim

by Festus1965 » Post

character_anim - test guess on 13.05.

source: https://github.com/appgurueu/character_anim
(6b0c2b1/11.05.2022)

...
depends on: modlib (test above)

after near 10 hours on a near empty world, just a bit land around, no gamer logged in. only last 30 sek to reg report

/profiler:

Code: Select all

instrumentation                                |    min µs |    max µs |    avg µs | min % | max % | avg %
---------------------------------------------- | --------- | --------- | --------- | ----- | ----- | ------

 player_api:                                   |         0 |       163 |         1 |   0.0 | 100.0 |  40.1
  - globalstep[1] ...........................  |         1 |       163 |         1 |   0.1 | 100.0 |  42.3
  - on_joinplayer[2] ........................  |        25 |        25 |        25 |   0.9 |   0.9 |   0.9
  - on_joinplayer[1] ........................  |         1 |         1 |         1 |   0.0 |   0.0 |   0.0

 character_anim:                               |         0 |     12374 |         1 |   0.0 | 100.0 |  37.4
  - globalstep[1] ...........................  |         1 |       134 |         1 |   0.0 | 100.0 |  24.7
  - on_joinplayer[1] ........................  |         7 |         7 |         7 |   0.3 |   0.3 |   0.3
  - globalstep[2] ...........................  |         1 |     12373 |         1 |   0.0 | 100.0 |  27.3

 modlib:                                       |         0 |       115 |         0 |   0.0 | 100.0 |  14.3
  - globalstep[1] ...........................  |         1 |       115 |         1 |   0.0 | 100.0 |  22.6

 fire:                                         |         0 |       205 |         0 |   0.0 | 100.0 |   8.2
  - globalstep[1] ...........................  |         1 |       205 |         1 |   0.0 | 100.0 |  21.6

 default:                                      |         0 |      1475 |        21 |   0.0 |  94.6 |   9.0
  - ABM 'Grass spread' ......................  |        60 |       127 |        81 |  28.6 |  79.4 |  62.2
  - on_joinplayer[1] ........................  |        20 |        20 |        20 |   0.7 |   0.7 |   0.7
  - ABM 'Grass covered' .....................  |       131 |      1475 |       288 |  69.0 |  94.6 |  83.3
clear :
* character_anim: 37.4 %
with needed
* modlib : 14.4 %
sum to use it : 51.8 % an so doubled the load from MTG base, or plus 107.5 % load (and so also CPU work and energy using ... for waiting for a gamer in ...)
Last edited by Festus1965 on Sat May 14, 2022 13:51, edited 4 times in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: mod LAG impact comparison - modlib

by LMD » Post

Festus1965 wrote:
Thu May 12, 2022 13:25
modlib

tested as needed for ... character_anim (test below)

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
 modlib:                                       |         0 |       124 |         0 |   0.0 | 100.0 |  21.0
  - globalstep[1] ...........................  |         1 |       124 |         1 |   0.1 | 100.0 |  28.7
uses 21 % of combined CPU usage (mts+mods) on empty world and 99% now gamer loged in.
or raise the basic load MTG by 26.6%.
Yay, thanks for confirming that modlib is in fact very efficient (uses one µs on average every globalstep, which is approximately 1/10000 of the resources available to Lua in 10ms - that's half the lifetime of a muon); the globalstep is needed for a more accurate gametime.

Not to mention that measurements in the millisecond range are entirely unreliable due to profiler overhead (look for sampler.log and compare it's code with modlib's globalstep code; you'll find that the instrumentation overhead is in fact heavier than the modlib code).
My stuff: Projects - Mods - Website

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: mod LAG impact comparison - modlib

by Festus1965 » Post

LMD wrote:
Thu May 12, 2022 15:59
Festus1965 wrote:
Thu May 12, 2022 13:25
modlib

tested as needed for ... character_anim (test below)

Code: Select all

 instrumentation                               |    min µs |    max µs |    avg µs | min % | max % | avg %
 modlib:                                       |         0 |       124 |         0 |   0.0 | 100.0 |  21.0
  - globalstep[1] ...........................  |         1 |       124 |         1 |   0.1 | 100.0 |  28.7
uses 21 % of combined CPU usage (mts+mods) on empty world and 99% now gamer loged in.
or raise the basic load MTG by 26.6%.
Yay, thanks for confirming that modlib is in fact very efficient (uses one µs on average every globalstep, which is approximately 1/10000 of the resources available to Lua in 10ms - that's half the lifetime of a muon); the globalstep is needed for a more accurate gametime.

Not to mention that measurements in the millisecond range are entirely unreliable due to profiler overhead (look for sampler.log and compare it's code with modlib's globalstep code; you'll find that the instrumentation overhead is in fact heavier than the modlib code).
LOL
https://en.wikipedia.org/wiki/Efficiency
wikipedia wrote:Efficiency is the (often measurable) ability to avoid wasting materials, energy, efforts, money, and time in doing something or in producing a desired result. In a more general sense, it is the ability to do things well, successfully, and without waste.[1][2][3][4][5] "Efficiency is thus not a goal in itself.
Efficiency would be 0.0 %, as long the mod itself has nothing to do !

and there are examples they show it is possible:
** 0.1 % / + ? % load : airutils (d1e5ec2/03.05.2022), as base to supercub
** 0.1 % / + ? % load : supercub ... supercup, as depend on airutils
** 0 % / + 0 % load : terumet (never played myself)
** 0 % / + 0 % load : mobkit (as needed depend mod) tested here
** 0 % / + 0 % load : biofuel (dd8a199/21.02.2022/V0.7), as base to supercub
** 0 % / + 0 % load : what_is_this_owo
It might be less impact on a running, much gamer used system, but on this test I test empty server.
And empty server mean 99% of the running time NO gamer in ... no gamer in no need for 'work' also !
So I disagree with your posting meaning.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

ronoaldo
Member
Posts: 177
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: mod LAG impact comparison

by ronoaldo » Post

Hi Festus - do you realize that measuring a server without any players, is like measuring if you have fever without having any symptoms? Yes, exactly, it makes no sense! Unless you walk around with a thermometer in ... your arm.

I'm not sure why you are posting this measures, to be frank. If you want to gather a more realistic impact, you should be simulating players interacting with the mod to get actually useful data: what is the impact that the mod causes for each connected player. Even more interestingly, if you manage to get the player doing something (like using a test build and passing the --random-input option from the command line). Data is good; random data is not good. Interpreting the data give you insights and you are doing random data posts only, sadly. Off course, you can keep posting your data, and keep giving more reasons for people to bash you, but this is yet another friendly reminder that it is not helpful the way you are doing it.

The message you are passing is: "look, if there is nobody using your software, it wasted X amount of resources." That means nothing to me as a modder.

Also, performance tuning is an art of balance. You are trading some CPU cycles in order to add features. You can save 100% of CPU cycles by turning off the computer!!! Using your measurements (no player connected), it is the most wise action to do because it will make no difference. What you are measuring is CPU waste, not usage. Usage is when the CPU is doing something useful, i.e., the game is actually being played.

I would not post this message, but I'm reading the forums using RSS reader, and EVERY SINGLE DAY THERE IS A POST OF YOU SAYING SUCH THINGS. I though it would be a decent act from my part as a human being to try to let you know.
Servers: Mercurio | Tools: ContentDB CLI | Mods: minenews

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: mod LAG impact comparison

by Festus1965 » Post

ronoaldo wrote:
Thu May 12, 2022 22:57
Hi Festus - do you realize that measuring a server without any players, ...

If you want to gather a more realistic impact, you should be simulating players interacting with the mod to get actually useful data: what is the impact that the mod causes for each connected player.
Even more interestingly, if you manage to get the player doing something (like using a test build and passing the --random-input option from the command line).

The message you are passing is: "look, if there is nobody using your software, it wasted X amount of resources." That means nothing to me as a modder.

Also, performance tuning is an art of balance. You are trading some CPU cycles in order to add features. You can save 100% of CPU cycles by turning off the computer!!!

Using your measurements (no player connected), it is the most wise action to do because it will make no difference. What you are measuring is CPU waste, not usage. Usage is when the CPU is doing something useful, i.e., the game is actually being played.

I would not post this message, but I'm reading the forums using RSS reader, and EVERY SINGLE DAY THERE IS A POST OF YOU SAYING SUCH THINGS. I though it would be a decent act from my part as a human being to try to let you know.
You might wonder, to measure without any gamer logged in IS the MAIN point of this thread, as also MOST mtserver guess about 250 of 350 = 71.4 % ARE most time empty.
And the starting base IS to start with empty.
It would be better to have less server, with then each more gamer in = better energy usage also, ...

With gamer will be later ... with this knowledge of this starting. I also sometime link to my server, showing how this can change. For you also again : empty, start peak (even as LMD realized), average, ... posted some above.
What o you think BB monitoring mod is for ... nothing else, but the realistic part.

In future until we have absolute enough Energy ... but now, with rising electric costs, if it means nothing for you as modder, it means costs ! to the server admin.

Yes, CPU usage on empty server is wasted time and energy, and maybe even on used server not efficient. Thanks ... you know it, so why complain I start with empty ? It is easier to accept usage even for one lonely gamer, but this ?

You now how many mods are there still outside ? Be happy that I look for those I have got some information from other server admins ... But it will get more client, some day I have measured all of them. Upps, but yes, then I start to measure them under gamer usage ... oh oh.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: mod LAG impact comparison - modlib

by LMD » Post

Festus1965 wrote:
Thu May 12, 2022 21:18

Efficiency would be 0.0 %, as long the mod itself has nothing to do !

and there are examples they show it is possible:
** 0.1 % / + ? % load : airutils (d1e5ec2/03.05.2022), as base to supercub
** 0.1 % / + ? % load : supercub ... supercup, as depend on airutils
** 0 % / + 0 % load : terumet (never played myself)
** 0 % / + 0 % load : mobkit (as needed depend mod) tested here
** 0 % / + 0 % load : biofuel (dd8a199/21.02.2022/V0.7), as base to supercub
** 0 % / + 0 % load : what_is_this_owo
It might be less impact on a running, much gamer used system, but on this test I test empty server.
And empty server mean 99% of the running time NO gamer in ... no gamer in no need for 'work' also !
So I disagree with your posting meaning.
I've explained this over and over again: Your idle percentages are bullshit. That's because the "100%" mean nothing; they are a miniscule amount of time compared to the profiler overhead and the engine overhead. The profiler even contains code to account for jumps in time and thus can not be considered a reliable source of information at all, especially when "microbenchmarking" microseconds.

You're completely misusing the profiler, which was written with the purpose of detecting pathological execution times in callbacks rather than microbenchmarking microsecond execution times.

modlib, player_api and most other mods using globalsteps are about as optimized as the engine permits; it is simply required to loop over players or to keep track of time, there is no way around it.

Going back to player_api which is an easy example: All the globalstep really does is loop over an empty table, which takes practically no time. If this was too "inefficient" you could basically throw modding at all out of the window. But it isn't. It's very fast actually. Only your skewed percentages of profiler overhead can make such miniscule operations look noteworthy when compared to nothing (as the profiler only instruments a few callbacks and can't profile engine overhead or it's own overhead!).

Furthermore, some more food for thought: Consider the min, max and avg values of e.g. the modlib globalstep. The globalstep is very lean, only taking 1µs on avg (which is likely still way too high due to profiler overhead but I'll let it slide). The max value is one hundred times that, despite modlib always doing the same every globalstep. Explain this massive outlier, please. My conclusion is that profiling is definitely broken when trying to microbenchmarking µs.

Finally: The proper "100%" are not a few microseconds but rather the time between two globalstep executions (something around 50-100ms usually). When you divide the couple µs by this you will obtain very low promille values rather than your misleading percentages. Those reflect the actual "CPU usage" (of a single core) and contribution to lag accurately (other than your BS percentages).

Learn to interpret data properly before jumping to conclusions and slandering well written mods. Also don't trust the profiler too much; it is likely that it's data is very much unreliable in this edge case. Mods that seemingly perform well only do so because their callbacks aren't called at all (e.g. no globalsteps), and thus profiler overhead doesn't matter.

I repeat: The profiler is intended for identifying issues under server load, as Ronoaldo has correctly pointed out, and not for idle measurements.

I'll cease further discussion because there seems to be no point in arguing with you as you fail to understand how optimizing mods works.
My stuff: Projects - Mods - Website

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: mod LAG impact comparison

by runs » Post

Let's see, what's up, festus, recognize your mistake and move on. A lemming is not the same as a kamikaze.

If you want to establish measurements, FIRST AND FOREMOST, establish a protocol.

1) A benchmark. If you want to measure length, use a meter, don't use a potato.
2) Use external tools: https://linoxide.com/best-linux-perform ... ing-tools/

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

mod LAG impact comparison - via Watt usage ?

by Festus1965 » Post

trying out something a bit ... less time - much gamer

youtube:
the other PXEM-004T I didn't get to tell me by modbus (yet), maybe I take the free PZEM-016 not installed actual
(but even this is difficult as Voltage change = Watt change, now we have 225 Volt)

Intel 1 Core 2 Thread, 4 GB RAM
Linux 4.15.0-177-generic #-186


nothing extra running, neither htop
* with Screen : 29.2 Watt
* nothing screensaver : 11.3 Watt

minetest --server : game empty
* with screen : 29.5 Watt
* screensaver : 11.35 Watt
= minetest --server with empty adds 0.05 - 0.3 Watt (that is near pure mt server)

minetest --server MTG
* with screen : 29.65 Watt
* screensaver : 11.5 Watt
= minetest --server with MTG here 0.2 - 0.3 Watt on PC
OR add another 0.15 - 0.3 Watt over empty (player_api, ... as main of MTG)


advtrains all
* with screen : 29.9 Watt
* screensaver : 11.75 Watt
= add mod advtrains add 0.25 Watt work (to base MTG: empty world, no nodes, items of it)


I see, I have to do this test on AC Batterie (fixed 225 Volt) or in the night - the Volt now changes too much during the day.


summary, short:
* just MTG (with player_api) HAS a measurable plus in Watt then 'empty' game (Wuzzy)
* mod advtrains add another 0.25 Watt alone to MTG
= result of adding load seen at profiler, about 125 % energy usage more


I can be measured and I see it. Not that big like /profiler % might suggest, but it IS using more CPU


that's all for today - not sure if PZEM-016 would be more accurate.


added later:
I got the PZEM-016 to run and show Watt in terminal ...

My idea for maybe nest week a server with:
* advtrains, petz and pipeworks+technic
against same server
* techage, rails?, mobs_redo
look at difference htop %, Watt, and also /profiler, as the 'strong' player_api is good to compare as same 'finger print'.
Last edited by Festus1965 on Sat May 14, 2022 13:55, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Trog and 12 guests