[Linux] Is LUAJIT really working?

JDCodeIt
New member
 
Posts: 5
Joined: Mon May 16, 2016 23:02
GitHub: JDCodeIt

[Linux] Is LUAJIT really working?

by JDCodeIt » Mon Jun 06, 2016 13:54

I have compiled with flag ENABLE_LUAJIT, but I don't see outstanding LUA performance improvement in the server.

Linux's ldd reports that the LUAJIT library is unused - any idea why? The lua wrapper code is definitely being compiled.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ldd -u bin/minetestserver
Unused direct dependencies:
   /lib/i386-linux-gnu/libz.so.1
   /usr/lib/i386-linux-gnu/libsqlite3.so.0
   /usr/lib/i386-linux-gnu/libluajit-5.1.so.2
   /lib/i386-linux-gnu/librt.so.1
   /lib/i386-linux-gnu/libpthread.so.0
   /lib/i386-linux-gnu/libncurses.so.5
   /usr/lib/libpq.so.5
   /usr/lib/i386-linux-gnu/libleveldb.so.1
   /usr/lib/i386-linux-gnu/libhiredis.so.0.10
   /usr/lib/i386-linux-gnu/libcurl.so.4
   /lib/i386-linux-gnu/libm.so.6
   /lib/i386-linux-gnu/libgcc_s.so.1
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Linux] Is LUAJIT really working?

by rubenwardy » Mon Jun 06, 2016 15:25

Have you installed the luajit dev libraries?
Does the output of cmake mention "luajit found"
 

JDCodeIt
New member
 
Posts: 5
Joined: Mon May 16, 2016 23:02
GitHub: JDCodeIt

Re: [Linux] Is LUAJIT really working?

by JDCodeIt » Mon Jun 06, 2016 16:26

Yes, installed the dev libraries

The first output of cmake shows it finds the library:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cmake . -DBUILD_SERVER=TRUE
-- *** Will build version 0.4.14-dev ***
-- Found Irrlicht: /usr/lib/i386-linux-gnu/libIrrlicht.so 
-- Found CURL: /usr/lib/i386-linux-gnu/libcurl.so 
-- cURL support enabled.
-- GetText disabled.
-- Found OpenAL: /usr/lib/i386-linux-gnu/libopenal.so 
-- Found VORBIS: /usr/include 
-- Sound enabled.
-- checking for module 'freetype2'
--   found freetype2, version 17.1.11
-- Found Freetype: /usr/lib/i386-linux-gnu/libfreetype.so (found version "17.1.11")
-- Freetype enabled.
-- Found LuaJit: /usr/lib/i386-linux-gnu/libluajit-5.1.so
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Linux] Is LUAJIT really working?

by ExeterDad » Mon Jun 06, 2016 21:04

I just now built 0.4.14 (server) and it linked to my libs just fine
+ Spoiler


Edit: Just did a pull from dev and it linked as well.
Is it possible you have the headers installed, but the libs are missing? Can you confirm libluajit-5.1.so is in your libs dir? Weird.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: [Linux] Is LUAJIT really working?

by sfan5 » Tue Jun 07, 2016 15:23

With the ldd output you quoted your minetestserver would be completely non-functional.

libz.so is required for compressing MapBlocks when saving them to disk, libsqlite3.so is the default backend for saving MapBlocks and can't be disabled, libpthread.so is required for threading which is used by the minetest server and can't be removed either.

In short: Don't believe the ldd output and look at what CMake's saying.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: [Linux] Is LUAJIT really working?

by kaeza » Tue Jun 07, 2016 18:59

To see if you're running LuaJIT, create a dummy mod with this code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
assert(jit)

If you're running under plain Lua, you'll get an "assertion failed!" error message.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

JDCodeIt
New member
 
Posts: 5
Joined: Mon May 16, 2016 23:02
GitHub: JDCodeIt

Re: [Linux] Is LUAJIT really working?

by JDCodeIt » Wed Jun 08, 2016 19:47

Well I guess it is working.. I bracketed with log messages, and this was the output on the terminal.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-06-08 13:35:21: ACTION[Main]: assert(jit)
2016-06-08 13:35:21: ACTION[Main]: done with assert(jit)

Hard to imagine the lua performance without jit - really, 30 times slower? With reasonably setup technic and pipeworks systems, I regularly get the warning that ABM's are taking too long - like 600+ms (Xubuntu AMD A6-5200 quad-core @ 2.0 GHz, 8 GB RAM)
 


Return to Minetest Builds

Who is online

Users browsing this forum: No registered users and 2 guests

cron