Server Totals
Elysia - (2)
Mikona - (2)
Deglos - (1)
Wilderness - (1)
Ferrell - (0)
M'Chek - (0)
Le'Or - (0)
Visimontium - (0)
Underdark - (0)
Total players: 6
Gallery
  • M'Chek - Azlae vs Nixtixu
    Album name: DM Events
    Uploaded by: Hamlet
    Uploaded: Wed Aug 20, 2014 12:40 am

Links Menu

APS/NWNX released

Avlis Headlines - www.avlis.org

Moderator: Dungeon Masters

Re: Dev from NWNOnline

PostAuthor: Papillon » Fri Feb 07, 2003 11:07 am

perogi21 wrote:We are experiencing serious lag and jitter from using NWNX.
Couple of questions for the devs at Avlis:
1) Are you using MySQL for your database?


Yes.

2) Whatever DB you are using, are you creating relational tables for data? IE. Are you using DB statements other than Set/GetPersistent*? Example: "Select * from tblPC WHERE PCID = 1" and requests like this?


Yes, we use both the default APS functions and custom SQL statements using SQLExecDirect().

3) Do you have the database on another server other than the ones running the mods?


Local as well as remote (main server is running mysql, elysia is on another pc).

4) Im sure that this is answered elsewhere but what hardware/OS etc are you using to run Avlis?


We're using Win XP on dual 1 GHZ-class machines.

How fast does the database server respond ? You can tell that from the time that passes when you see a SELECT in the console until you see the resultset. You shouldn't notice any delay there.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Hari Seldon » Fri Feb 07, 2003 11:39 am

Hi to all !

I've NWN Italian version and I've the same problem of french and german version befor you fix.

This is the screen capture before and after :





http://www.larry.it/before.jpg

http://www.larry.it/after.jpg

Hari Seldon
Newbie
 
Posts: 2
Joined: Fri Feb 07, 2003 11:34 am

PostAuthor: Papillon » Fri Feb 07, 2003 4:14 pm

Ok, I've added support for the italian version. I'm going to upload a new version of APS/NWNX that also finally displays SQL error messages to nwvault later (version will be APS v1.22).

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

Thanks

PostAuthor: perogi21 » Fri Feb 07, 2003 4:44 pm

Papillon,

Thanks for your answers. We are still trying to track down the jitter, those answers will help.

The SQL statements are very quick. So, I don't think that is the problem.

In the Win XP on dual 1 GHZ-class machines, are you saying that each machine has two CPUs or each machine is a 1 GHz CPU in it?

Thanks,
Pele.

perogi21
Newbie
 
Posts: 7
Joined: Mon Jan 20, 2003 4:44 pm

Re: Thanks

PostAuthor: Papillon » Fri Feb 07, 2003 5:43 pm

perogi21 wrote:Papillon,

In the Win XP on dual 1 GHZ-class machines, are you saying that each machine has two CPUs or each machine is a 1 GHz CPU in it?



We have one dual processor machine and a single processor machine. Neither experiences the excessive lag you're describing. If you found the reason for this, please post it here.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Hari Seldon » Fri Feb 07, 2003 6:55 pm

Papillon wrote:Ok, I've added support for the italian version. I'm going to upload a new version of APS/NWNX that also finally displays SQL error messages to nwvault later (version will be APS v1.22).


Thank you :D !!!

Hari Seldon
Newbie
 
Posts: 2
Joined: Fri Feb 07, 2003 11:34 am

Please Help Me!

PostAuthor: VB_SQL_CODER » Fri Feb 07, 2003 8:39 pm

Hello,

I have a problem but I don't know if its possible to execute stored procedures with the SQLExecDirect. I don't get an error in the dos prompt or in the logs. Nothing happens at all. I tested the stored procedure in SQL Query Analyzer so I know the SQL end is fine. I just want to know if it is possible to execute stored procedures using SQLExecDirect.

This is my syntax I am using:

SQLExecDirect("EXEC p_addPlayer " + "'" + 'GetName(GetLastUsedBy())' + "'");

Please any help would be great.

Thanks,
Mike Street

VB_SQL_CODER
Newbie
 
Posts: 2
Joined: Fri Feb 07, 2003 8:26 pm

Re: Please Help Me!

PostAuthor: Papillon » Fri Feb 07, 2003 9:12 pm

VB_SQL_CODER wrote:SQLExecDirect("EXEC p_addPlayer " + "'" + 'GetName(GetLastUsedBy())' + "'");



It's EXECUTE....

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: VB_SQL_CODER » Fri Feb 07, 2003 9:23 pm

Well I know you don't have to spell it out in MS SQL Server 2000, but you do if you are useing it with your system. It works now thank you very much

Thanks,
Mike Street

VB_SQL_CODER
Newbie
 
Posts: 2
Joined: Fri Feb 07, 2003 8:26 pm

PostAuthor: slabar » Sat Feb 08, 2003 12:50 am

I posted my time script on the NWN boards. I hope someone finds it useful and possibly improves it. Here's the link:

http://nwn.bioware.com/forums/viewtopic ... 30#1635489

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Papillon » Sat Feb 08, 2003 1:17 am

Thanks slabar! It's good to see more and more contributions from others. I'll have a look this weekend.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: slabar » Sat Feb 08, 2003 1:31 am

Papillon,

You are most welcome. I hope to have me one lil bug with the script squashed in the next day or so. I did note the bug so others might be able to help me fix it.

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Pelemele » Sat Feb 08, 2003 5:34 pm

Slabar,

If your bug is on the OnClientLeave, trust me it's probably not a bug. (Well at least in your code) That event is not caught 100% of the time.

Pele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: Pelemele » Sat Feb 08, 2003 11:52 pm

Papillon,

We have not been able to figure out why NWNX has increased our CPU usage 15-20%%. Even when NWNX is not processing any requests, we are still averaging 70% CPU. Using SamsPWS, we averaged about 50-55% CPU. We are using a 2.0GHz with 512 PC133 RAM. MySQL with mostly Custom SQL Statements.

ANY ideas are very welcome. I very much want to use this system over any other system. I have only begun to scratch the surface of what I want to do with it.

Is Avlis using HCR? Anyone over there willing to start up our mod (with the Database schema) to see what may be the issue?

Thanks for any other help or ideas.
Pele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: slabar » Sun Feb 09, 2003 12:02 am

Pelemele,

Aye that's the bug. I refuse to give up on a solution though. I will find an answer or die trying. :lol: {inform my family in the event of my sudden death please}

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Papillon » Sun Feb 09, 2003 1:29 am

Pelemele, I just had an idea: Look in the Windows taskmanager and tell me how much accumulated cpu time nwn extender uses. It's usually around 30 seconds each day on Avlis. Or, you can send me a link where I can download your mod to papillon@blackdagger.com.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Dregan » Sun Feb 09, 2003 2:08 am

I thought I would share my results of tracking down what is causing the extra cpu usage. I have tested this with the newer 1.2 version stuff, with a modified version of the aps_demo. Basically I created a small script that is activated by an item that simply duplicated itself 500 times by creating items at the player's location, on the ground. I used this script in 4 sequential steps to make 2000 items, both using the NWNX program to launch the server, and simply launching the server directly.

The client portion of NWN was run on a second machine, with an AMD 1600 XP and 256 MB RAM. The results on my AMD 2000 XP server box, with 512MB DDR memory highlight the problems with extra cpu usage. The following is a table showing the cpu usage results for both test runs.

No items: <1% without NWNX, <1% with NWNX
500 items: <1% without NWNX, 5% with NWNX
1000 items: 5% without NWNX, 13% with NWNX
1500 items: 8% without NWNX, 52% with NWNX
2000 items: 13% without NWNX, 55% with NWNX

It is interesting to note that the problems shown here with the NWNX take off at around 1500 items, but level off.

I realize that the results of these tests do not point to a particular problem, but they do highlight that there is a repeatable difference in CPU usage, even on a tiny module.

Here is a copy of the event_onactivate script that is linked to the rod used for testing:


void main()
{
object oItem=GetItemActivated();
object oActivator=GetItemActivator();


if(GetTag(oItem)=="RodOfMultiplying")
{
SendMessageToPC( oActivator, "Creating 500 new rods." );
int nCnt = 0;
location lLoc = GetLocation( oActivator);

while( nCnt < 500 )
{
CreateObject( OBJECT_TYPE_ITEM, "rodofmultiplying", lLoc, FALSE );
nCnt++;
}

}


}



Enjoy,
Dave.

[/img]

Dregan
Newbie
 
Posts: 5
Joined: Sun Feb 02, 2003 11:37 pm

PostAuthor: Pelemele » Sun Feb 09, 2003 3:05 am

Papillon,

Thanks so much for taking an interest in my problem.

The mod has been up for 6 hours and 14 minutes and has only 'used' 5 seconds of cpu time. ~20 sec/day.

I will email you a link where you can upload the mod. Do you have win rar?

I will upload the mod and my schema for my database.

Thanks once again =)
Pelemele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: slabar » Sun Feb 09, 2003 10:52 pm

If anybody is in need of a set of scripts for adding, checking, and updating Journal entries during the game and OnClientEnter here ya go.

http://nwn.bioware.com/forums/viewtopic ... m=47&sp=45

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Arakiel » Mon Feb 10, 2003 8:14 pm

Quick question, how do I get NWNX to restart my mod when it restarts the server. Right now if it crashes it will restart the server but sit idle waiting for someone to load the mod. This has caused problems because it is then not apparent that the server is down until you look closely at it to see that that mod isn't up. It would actually be preferable for us if NWNX didnt restart the server if it can't also restart the mod.

-Arakiel

Arakiel
Newbie
 
Posts: 2
Joined: Mon Feb 10, 2003 8:08 pm

PostAuthor: Pelemele » Tue Feb 11, 2003 1:15 am

Arakiel,

Wow I just wrote that same ? today on the bioware boards!

Pele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

CPU Usage

PostAuthor: Dregan » Tue Feb 11, 2003 9:28 pm

Papillion,

Any news on whether you are either looking into, or plan on looking into the CPU usage issue? Your system is quite excellent, and our PW of Lands of Arda has already made a sizeable investment into using the APS system for everything from persistent locations, to complex guild systems, messageboards, and master levels (simulating effects for levels 21 through 30). But as our world is very large, with a 77MB mod, and 450+ areas, the cpu usage issue is currently killing our ability to implement the new APS based code. Presently we are going to wait to see what Bioware releases, if they release anything for PWs.

Based upon the description you give for the NWNX program, I'm going to go out on a limb and suggest that the hooks that were added to the memory allocation functions are significantly affecting the program's performance. This would show up as an increase in CPU usage for the main program, but not for the NWNX process. If this is the case, it would be most welcome if there was a second look at the interrupt hooks with the intent for code optimization.

Looking forward to any response,
Dave.

Dregan
Newbie
 
Posts: 5
Joined: Sun Feb 02, 2003 11:37 pm

PostAuthor: Silk » Tue Feb 11, 2003 9:38 pm

Are you calling the extender with any parameters? like -module <modulename>
Silk

Member of the MadK@t lover's group.
User avatar
Silk
Co-Founder
 
Posts: 6665
Joined: Fri Sep 14, 2001 6:47 pm

PostAuthor: Arakiel » Tue Feb 11, 2003 9:45 pm

No I am not, should I be? I'll attempt that when I get home from work and see what happens.

Arakiel
Newbie
 
Posts: 2
Joined: Mon Feb 10, 2003 8:08 pm

PostAuthor: Pelemele » Tue Feb 11, 2003 11:32 pm

Hot damn!!

That worked. Thanks sooo much!

Pelemele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PreviousNext

Return to Avlis News

Who is online

Registered users: Cameron Klym, Google [Bot]