Jump to content

patxitron

Member
  • Content Count

    8
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About patxitron

  • Rank
    Private
  1. I've not even tryed the LD_PRELOAD trick since in http://feedback.arma3.com/view.php?id=18556 the reporter asserts that trying to preload intel-tbb, crashes the server and he must inject some asm to do a succesful preload. I thought that preloading fails at all, but it seems that a simple dummy mallinfo lib could do the job in a simpler and more elegant way without my chroot trick. Best regards.
  2. I think it's doable. I'm light years away from being an expert to this low-level of glibc using but from the link you provides I guess that the hook functions only can be used by modifying the server source code (which is, obviously, out of our reach). However it is possible to patch malloc and related functions in glibc with the tbb ones or make them call the tbb ones. The first approach could trigger a dependency hell and ending in including a non-trivial part of the tbb into glibc itself. The second approach implies linking the glibc library with the tbb one which must be done in the autoconf/makefile system, which will be a non-trivial work also (at least for me because I have no experience with the autoconf stuff). I think the little potential performance gain doesn't pay the effort. But I can probably be wrong and someone knows how to do it easyly. Thats the great advantage of open source. Best regards.
  3. Ok, I've got it. I've tested a chroot environment on a virtual machine on a server with @a3mp and @task_force_radio addons with a mission on chernarus with about 30-40 AI and 8 human players and, according to #monitor, the server was consistently running at 40-50 fps with some (very rare) drops to 30-35 fps. The same setup without the chrooted environment used to run at a maximum of 30-35 fps with very frequent drops to 3-4 fps. In the chroot environment, the glibc mallinfo is patched to provide a cached mallinfo struct refreshed every 1024 calls as Fred41 suggested (thank you). To use it, download the chroot environment from this link, unpack it in your home folder: tar xvf lfs-chroot-with-modified-glibc.tar.xz mount some filesystems: mount -o bind /dev /home/johndoe/lfs-root/dev mount -t proc none /home/johndoe/lfs-root/proc mount -t sysfs none /home/johndoe/lfs-root/sys chroot to the environment using its "games" user: chroot /home/johndoe/lfs-root sudo -u games \ HOME=/home/games \ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin \ TERM=$TERM \ PS1='\u:\w\$ ' \ /bin/bash --login +h and then you can download steamcmd and install the Arma 3 server (wget and nano are provided in the environment to download utils and edit configurations). Alternativelly you can copy your entire Arma3 server directory tree into the home/games of the rootfs environment and then chroot into it and launch the server. You can exit the environment with the "exit" command. Note that all above steps must be done as root (or using sudo), but when entering the chroot environment you drop the privileges to a normal user in order to minimize security concerns. The sources needed to build the chroot environment are available here. My glibc patch is this one. Best regards. ---------- Post added at 11:37 ---------- Previous post was at 11:21 ---------- Indeed, the Linux From Scratch book is a hard and painful method to get linux running, but a very interesting and educative one. Best regards
  4. @Fred41, Good idea. I will try it. I hope I get it by next monday (maybe sooner if I can elude some social compromises :p) Best regards Edit: I just changed glibc-2.19 with both my initial change and your suggestion (selected by a define) and it compiles OK. As I said, I hope I can release it soon (I must upload this to the server, set it the environment and make some tests). If anyone want to test it I've created a chroot environment by following the LFS (Linux From Scratch) book. and then I've chrooted into it and I've modified and recompiled the glibc. I've generated a patch with the changes: diff -ur glibc-2.19/malloc/malloc.c glibc-2.19-tweak/malloc/malloc.c --- glibc-2.19/malloc/malloc.c 2014-02-07 09:04:38.000000000 +0000 +++ glibc-2.19-tweak/malloc/malloc.c 2014-05-02 17:06:58.136999541 +0000 @@ -4650,6 +4650,7 @@ struct mallinfo __libc_mallinfo () { +#ifdef USE_GLIBC_DEFAULT_MALLINFO struct mallinfo m; mstate ar_ptr; @@ -4667,7 +4668,34 @@ ar_ptr = ar_ptr->next; } while (ar_ptr != &main_arena); +#else +# ifdef RETURN_ZEROED_MALLINFO + struct mallinfo m; + memset (&m, 0, sizeof (m)); +# else + static struct mallinfo m; + static size_t count; + if ((count++ % 1024) == 0) + { + mstate ar_ptr; + if (__malloc_initialized < 0) + ptmalloc_init (); + + memset (&m, 0, sizeof (m)); + ar_ptr = &main_arena; + do + { + (void) mutex_lock (&ar_ptr->mutex); + int_mallinfo (ar_ptr, &m); + (void) mutex_unlock (&ar_ptr->mutex); + + ar_ptr = ar_ptr->next; + } + while (ar_ptr != &main_arena); + } +# endif +#endif return m; }
  5. I am now trying to build a chrooted environment (based on Linux From Scratch) with a tweaked glibc in which the mallinfo function returns a zeroed struct like the tbb proxy one. If I get it working, I will post it here. Best regards
  6. patxitron

    @A3MP - ArmA 3 Map Pack

    I can host an initial torrent seed in my server, as I am doing now with 1.1. It has a decent bandwidth (up to 50Mbps) and as more and more and more people download it (and continues sharing it) they add their bandwith to mine. Send me a private message if you are interested. Best regards
  7. patxitron

    @A3MP - ArmA 3 Map Pack

    I repackaged version 1.1 into a single 7z file (sightly smaller) an made it avialable in the bittorrent network. You can use the following torrent file: http://servidor.fjlazur.info/games/arma3/Arma3_MapPack-v1.1.7z.torrent Best regards.
  8. patxitron

    @A3MP - ArmA 3 Map Pack

    Thank you very much for the pack. Can I make a torrent with 1.1 version repacked into one single 7z archive and publish it here and in armaholic forums? I am requesting permission because I know nothing about legal terms and I don't knw if I need permission to redistribute it. Best regards
×