active block modifiers took 1015ms (longer than 200ms)

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

active block modifiers took 1015ms (longer than 200ms)

by tbillion » Fri Nov 27, 2015 12:15

any way to idk fix this or works around it...

no my computer is not slow either :) thats what alot of this has been blamed on... is there more information about what this does or means?

my computer-> 2 physical processors 4 cores each at 3ghz, 64gb of ram, 4gb video memory, only running minetest server and client.

when it does this it really messed up my mod... puts blcks back that have already been mined.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Sat Nov 28, 2015 20:48

I question the loop in the block of code this warning comes from

https://github.com/minetest/minetest/bl ... .cpp#L1166

It looks to me like there would be instances where that loop would keep running ABMs on active map blocks until it ran for 200ms. If you remove the loop ABMs work fine from my testing and the warning disappears.
 

User avatar
rubenwardy
Moderator
 
Posts: 5829
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Sat Nov 28, 2015 21:03

But the only time the Do..While is broken out of is if m_active_block_interval_overload_skip > 0 and m_active_block_interval_overload_skip is only changed in that loop when the timer is over 200ms unless I'm missing something.

Plus it loops through all active blocks twice in this section, once for node timers and once for ABMs, can't they both be handled in one loop through the active map_blocks?
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Sat Nov 28, 2015 21:36

So it looks like nothing changed recently performance wise, they changed this warning to using warningstream instead of infostream.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

Re: active block modifiers took 1015ms (longer than 200ms)

by tbillion » Sun Nov 29, 2015 02:32

hold up... does this mean the game kills the abm if it runs too long... becasue if so i found my bug :) i been beating my mod code to death for this one specific error where it is breking bricks and all the sudden just misses one section... and if minetest kills the abms becasue they were too slow this would be the result.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

Re: active block modifiers took 1015ms (longer than 200ms)

by tbillion » Sun Nov 29, 2015 02:34

it does it most after i run the code a few times. not instantaneously. when you have an abm remove 100x100x100 blocks its gonna take more than 200ms especially if the loop repeats until the machine is out of fuel...
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Sun Nov 29, 2015 04:31

No it shouldn't cut the ABM short. I think if all the ABMs for the active blocks take more than 200ms then it starts skipping ABMs on the next pass through.
 

User avatar
duane
Member
 
Posts: 1577
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: active block modifiers took 1015ms (longer than 200ms)

by duane » Sun Nov 29, 2015 04:36

BrandonReese wrote:But the only time the Do..While is broken out of is if m_active_block_interval_overload_skip > 0 and m_active_block_interval_overload_skip is only changed in that loop when the timer is over 200ms unless I'm missing something.


That's a "do {} while(0)". Doesn't that mean it never repeats?
Believe in people and you don't need to believe anything else.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Sun Nov 29, 2015 04:57

duane wrote:That's a "do {} while(0)". Doesn't that mean it never repeats?


Yep you're right. That's what I was missing. Makes a lot more sense now.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

Re: active block modifiers took 1015ms (longer than 200ms)

by tbillion » Sun Nov 29, 2015 07:55

soo... the short answer is change code, recompile and call it a day?
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: active block modifiers took 1015ms (longer than 200ms)

by BrandonReese » Tue Dec 01, 2015 05:47

Look at the changes I've made with my Adventuretest client. I've noticed considerable performance improvements with the changes I made in environment.cpp. I'm still testing it to see if there are any adverse affects.

https://github.com/Bremaweb/adventurete ... onment.cpp
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

Re: active block modifiers took 1015ms (longer than 200ms)

by tbillion » Tue Dec 01, 2015 05:59

ill compile it tommorrow and run it. maybe i wont have to move all my world stuff (probably will though)
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07
Location: 38381, US, TN, Toone

Re: active block modifiers took 1015ms (longer than 200ms)

by tbillion » Fri Dec 04, 2015 12:26

got around to it a little later than i thought. my tests indicate both a solution and a problem. in your version of the client, i dont ever get the error about the abm taking too lon just now when it takes too long the server never comes back. you end up trapped in a invisible box because it cant generate the map (or update the client to tell the user things have changed) other than that your very right it feels alot smoother than the default client. lots less lag to me any how. i think if all holds out correctly i am just gonna change my code to use another method that doesnt involve an AMB. i can watch it in the console, in about 3 seconds it is done, but the game doesnt respond for 2 to 5 minutes. sadly it is looking like i will have to slow my code down to meet the speed of minetest.. kind of like when you move too fast and minetest resets you and you walk the same 5 blocks 15 times. :)
 

User avatar
SaKeL
Member
 
Posts: 653
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: active block modifiers took 1015ms (longer than 200ms)

by SaKeL » Tue Dec 19, 2017 16:19

im getting it in my game also... what is the best solution to optimize this ?

Code: Select all
WARNING[Server]: active block modifiers took 448ms (longer than 200ms)
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: active block modifiers took 1015ms (longer than 200ms)

by Festus1965 » Tue Jan 23, 2018 23:10

Code: Select all
WARNING[Server]: active block modifiers took 230ms (longer than 200ms)


Getting the same some time, most around 230 ms. And new a mainly world (1 month), not much active, no mobs, no animals. hmmm

reading here: minetest.register_abm
... The Active Block Modifier consists of a function that is executed at a specific interval for single nodes.
... abms only work in active blocks,
there's the active_block_range setting telling how far blocks are active,
and abm_interval sets the Length of time between ABM execution cycles ...


so activated by player or forceloaded, but which one ...
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

User avatar
SaKeL
Member
 
Posts: 653
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: active block modifiers took 1015ms (longer than 200ms)

by SaKeL » Wed Jan 24, 2018 06:30

its activated by time interval, so no player nor forceloaded..every block used in ABM config on the map is triggered by time interval what executes an function
 

User avatar
sorcerykid
Member
 
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: active block modifiers took 1015ms (longer than 200ms)

by sorcerykid » Wed Jan 24, 2018 13:29

It would be nice if there was a bit more fine-grained control of ABMs, such as the ability to create, suspend, and delete them as well as more specific parameters (like boundaries, node beside, node above, node below, light above, etc.), so the ABM functions don't need to employ any more conditionals than they have to. That might help with optimization in many scenarios.
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: active block modifiers took 1015ms (longer than 200ms)

by Festus1965 » Wed Mar 07, 2018 00:29

Even the server is empty, me and noeone else is in, I am getting this message now exactly every 08:33 mm:ss = 513 sec, (guess could be 500 set somewhere ?)
so ...

SaKeL wrote:its activated by time interval, so no player nor forceloaded..every block used in ABM config on the map is triggered by time interval what executes an function


where is that time set ?
And what does that warning mean in real, as I think a warning has some reason !
(Too long time using might ???`make a break, or problems to other actions, or loose the action, or what ever)

And how can I get more into that section of what block caused that late to see if that is a problem or just to understand how II can deny that problem by optimizing that area and its abm.

edit: 8.3.2018
I read it again and again:
Code: Select all
active block modifiers took 448ms (longer than 200ms)


"Took" longer ... with a specified time, that IT TOOK.

I am getting more relaxed, as for me that means it was done complete, and just reported about the longer time needed than a "set" maximum for a warning.

But why was 200ms selected, where I could set it higher, or get the information what in the abm makes it taking so long, that it seams to be a problem.
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

User avatar
paramat
Developer
 
Posts: 3434
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: active block modifiers took 1015ms (longer than 200ms)

by paramat » Sun Mar 11, 2018 22:32

You can use the built-in mod profiler to see which ABMs are taking a long time.
It's likely an intensive or poorly coded mod.
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: active block modifiers took 1015ms (longer than 200ms)

by Festus1965 » Sun Mar 11, 2018 23:28

paramat wrote:You can use the built-in mod profiler to see which ABMs are taking a long time.
It's likely an intensive or poorly coded mod.


I do already: /profiler save - issues, questions - but I don't trust the result really. Just yesterdeys I got one step further ...

I modify Mods also like modifiing Vines in plantlife, and did more yesterday ...

So, I got back my lag = 0,09 including that pipeworks seams to take most of the cpu, but after looking not the sums, and focus more on the most ABMs using subtasks I got more successful, what makes my link 1 with the profiler more important first.

I got away the message about
* "too much Items in one Block, want to delete"
* "activate block modification takes longer than 200ms"
what was some step further, but as I made 5 changes I am not sure if one of them or all together made it.
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

User avatar
LMD
Member
 
Posts: 788
Joined: Sat Apr 08, 2017 08:16
Location: Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: active block modifiers took 1015ms (longer than 200ms)

by Festus1965 » Sun Jun 10, 2018 00:22

First check out profiler with its "official" result and also check single ABM that take a lot of time,

in my case i stopped vines, they took too much,
and reduced switching stations on the LV, MV and HV networks, merging more of them together, as long cables doesn't matter yet

the other changes in the minestest.conf if will post next
but remember, everything there also depends on your (not) strong server and ability of RAM and read/write on HDD
my server only hosts the game with
* i7-4770 4 core, 8 threads,
* 16 GB Ram, and a
* very fast M.2 SSD, writing 2200, reading 2800, instead of normal HDD can do 200/s !!!

the server CPU gets only with the server (no Map Gen running) about 3/4 %,
* MapGen forces 1 thread to 100% /(cpu all about 15%), and makes lag to 2.4, normal is 0.1 until 0.25 with 16 people
and
* after running some time the cache map in ram is more then 5 GB already - so no need to read even from ssd ...
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

User avatar
LMD
Member
 
Posts: 788
Joined: Sat Apr 08, 2017 08:16
Location: Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: active block modifiers took 1015ms (longer than 200ms)

by LMD » Sun Jun 10, 2018 09:04

Well my pc : 2 Ghz * 4 cores, pentium, 4 GB Ram, HDD 500 GB, 30/s, and my abms are FAR less often executed then once per second.
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: active block modifiers took 1015ms (longer than 200ms)

by Festus1965 » Sun Jun 10, 2018 14:59

if only for MTS, then should be ok,
so what about
* lag from one to 16 gamers,
* profiler results
??
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

Next

Return to Problems



Who is online

Users browsing this forum: No registered users and 3 guests