LuaJIT Profile - on engine, buildit and mods ?

Post Reply
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:

LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

based on new offered [Mod] LuaJIT Profiler [jitprofiler] the discussion should not be in the Thread about the mod itself ...
jwmhjwmh wrote:
Wed May 18, 2022 01:38
This mod just lets you use LuaJIT's builtin profiler. You need to add it to the secure.trusted_mods list. This profiler is good for pinpointing expensive parts of the code.

How to Use
  1. Enable the mod.
  2. In-game start the profiler with /jitprofiler_start 1 <filename>. The profiling data will be written to <worldpath>/jitprofiles/<filename>.
  3. Collect data for a while.
  4. Stop profiling with /jitprofiler_stop or by exiting the world.
  5. Download FlameGraph.
  6. Create a flamegraph SVG with ./flamegraph.pl <worldpath>/jitprofiles/<filename> > graph.svg.
  7. Open the SVG in your browser.
  8. The top level of each stack snapshot will be "C", "G", "I", "J", or "N", representing C code, garbage collection, interpreter, JIT compilation, or compiled code, respectively.
(Optional) dependencies: none
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:

LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

How to 'read'/use it ?

example:
run about 10 minutes, starting one login to start /jitprofiler end exit, finish log with close terminal

engine 5.5.1 - game 'empty'
* without profiler
** empty.txt.zip
** empty.svg
Image

* with profiler
** empty-profiler.txt.zip
** empty-profiler.svg
Image


with minetest_game
* without profiler
** minetest.txt.zip
** minetest.svg
Image

* with profiler
** minetest-profiler.txt.zip
** minetest-profiler.svg
Image

with MTG + pipeworks
* without profiler
** pipeworks.txt.zip
** pipeworks.svg
Image

* with profiler
** pipeworks-profiler.txt.zip
** pipeworks-profiler.svg
Image

MTG with TOP 20 mods AsiaThailand but also on empty world, no any node or item of this mods existing
running,
last to add
* without profiler
** zip
** svg
... then I will see what I can read out of it ...


I read them from down to up ... and see that the 3rd level still C, but get less (in % sure) but still big part at that stage, but I not sure yet if it changes, or still do the same in absolute but less in % work as before = stable same routine, whatever mod gets in plus.
And I see line 4 up ONLY the left part gets new information ...

OK, can click the tiny ones to zoom in ...
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: LuaJIT Profile - on engine, buildit and mods ?

by jwmhjwmh » Post

By the way, I have found that the "C" part is smaller on a dedicated server (that is, a server using dedicated_server_step.)

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: LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

jwmhjwmh wrote:
Wed May 18, 2022 14:27
By the way, I have found that the "C" part is smaller on a dedicated server (that is, a server using dedicated_server_step.)
What you mean with 'dedicated server', a setting ?
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: LuaJIT Profile - on engine, buildit and mods ?

by jwmhjwmh » Post

Festus1965 wrote:
Thu May 19, 2022 01:57
jwmhjwmh wrote:
Wed May 18, 2022 14:27
By the way, I have found that the "C" part is smaller on a dedicated server (that is, a server using dedicated_server_step.)
What you mean with 'dedicated server', a setting ?
I mean when you start up Minetest with the --server option.

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: LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

jwmhjwmh wrote:
Thu May 19, 2022 02:00
Festus1965 wrote:
Thu May 19, 2022 01:57
jwmhjwmh wrote:
Wed May 18, 2022 14:27
By the way, I have found that the "C" part is smaller on a dedicated server (that is, a server using dedicated_server_step.)
What you mean with 'dedicated server', a setting ?
I mean when you start up Minetest with the --server option.
sorry,
but I use 'minetestserver' most, self compiled and
'dedicated_server_step' is a standard setting by default

Code: Select all

#    Length of a server tick and the interval at which objects are generally updated over
#    network.
#    type: float
# dedicated_server_step = 0.09
via https://wiki.minetest.net/Minetest.conf
to https://github.com/minetest/minetest/bl ... mple#L1602
so it is there always, easiest so check with logged in gamer priv server

Code: Select all

/set dedicated_server_step


on started 'minetestserver' no settings in minetest.conf I get 'dedicated_server_step = 0.09'
on started 'minetest --server' no settings in minetest.conf I get 'dedicated_server_step = 0.09' = same !

so your post does not make any sense.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: LuaJIT Profile - on engine, buildit and mods ?

by jwmhjwmh » Post

Festus1965 wrote:
Thu May 19, 2022 02:18
jwmhjwmh wrote:
Thu May 19, 2022 02:00
Festus1965 wrote:
Thu May 19, 2022 01:57

What you mean with 'dedicated server', a setting ?
I mean when you start up Minetest with the --server option.
sorry,
but I use 'minetestserver' most, self compiled and
'dedicated_server_step' is a standard setting by default

Code: Select all

#    Length of a server tick and the interval at which objects are generally updated over
#    network.
#    type: float
# dedicated_server_step = 0.09
via https://wiki.minetest.net/Minetest.conf
to https://github.com/minetest/minetest/bl ... mple#L1602
so it is there always, easiest so check with logged in gamer priv server

Code: Select all

/set dedicated_server_step


on started 'minetestserver' no settings in minetest.conf I get 'dedicated_server_step = 0.09'
on started 'minetest --server' no settings in minetest.conf I get 'dedicated_server_step = 0.09' = same !

so your post does not make any sense.
I'm pretty sure minetestserver is equivalent to minetest --server. When one starts a singleplayer world, on the other hand, it seems that dedicated_server_step is ignored.

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: LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

jwmhjwmh wrote:
Thu May 19, 2022 02:23
I'm pretty sure minetestserver is equivalent to minetest --server. When one starts a singleplayer world, on the other hand, it seems that dedicated_server_step is ignored.
I started a singeplayer session, /grantme all, then '/set dedicated_server_step' as I am sure no settings done
and got also 'dedicated_server_step = 0.09' as the default is.
So answer is no,
and answer is this settings is always there as a default !
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: LuaJIT Profile - on engine, buildit and mods ?

by jwmhjwmh » Post

Festus1965 wrote:
Thu May 19, 2022 03:02
jwmhjwmh wrote:
Thu May 19, 2022 02:23
I'm pretty sure minetestserver is equivalent to minetest --server. When one starts a singleplayer world, on the other hand, it seems that dedicated_server_step is ignored.
I started a singeplayer session, /grantme all, then '/set dedicated_server_step' as I am sure no settings done
and got also 'dedicated_server_step = 0.09' as the default is.
The setting is still present in singleplayer, but it is just ignored AFAICT.

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: LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

jwmhjwmh wrote:
Thu May 19, 2022 03:03
The setting is still present in singleplayer, but it is just ignored AFAICT.
Yes, sure, as there is no network connected other gamer, sure that this is not needed or used,
but YOUR intention was to tell it is not even set !

But so far interesting, to make same tests on SinglePlayer, as to imagine or detect, what parts of work are server (network) depending that we might not expect.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: LuaJIT Profile - on engine, buildit and mods ?

by jwmhjwmh » Post

Festus1965 wrote:
Thu May 19, 2022 03:10
jwmhjwmh wrote:
Thu May 19, 2022 03:03
The setting is still present in singleplayer, but it is just ignored AFAICT.
Yes, sure, as there is no network connected other gamer, sure that this is not needed or used,
but YOUR intention was to tell it is not even set !

But so far interesting, to make same tests on SinglePlayer, as to imagine or detect, what parts of work are server (network) depending that we might not expect.
That was not my intention. But it doesn't really matter anyway.

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: LuaJIT Profile - on engine, buildit and mods ?

by Festus1965 » Post

jwmhjwmh wrote:
Thu May 19, 2022 13:13
That was not my intention. But it doesn't really matter anyway.
yes, as a single-player will not complain about lag ?
mhh, but anyway

I will use it so see the difference from
* high impact mods (pipeworks+technic / petz / ...)
to their counterpart with
* low impact mods (techage / mobs_redo / ...)

as from the other thread, maybe understand also why and how ...

but for me it is easier: I just choose the lower impact version, I don't write code anymore much
my time is gone ... selling first basic program "inventor on C64" in 1981/83 to neighbor bakery and help to do it also. That was so fast against old manual writing down all things. Best of computer class at that 2 years.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests