Author |
Topic |
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 28 April 2002 : 19:46:56
|
quote: As you can see this case (test-6) is about 12 times slower than the best case (test-3: using Const)...
And that will probably increase exponentially with each concurrent user on the site.
www.daoc-halo.com
Edited by - Gremlin on 28 April 2002 19:47:23< |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 28 April 2002 : 22:50:01
|
I know that it will still probably be slower. . . but you must consider that if App vars were to be used they would not need to be assigned at all. . . they would already be assigned.
Nathan Bales Snitz Exchange | Do's and Dont's< |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 28 April 2002 : 23:44:41
|
quote:
I know that it will still probably be slower. . . but you must consider that if App vars were to be used they would not need to be assigned at all. . . they would already be assigned.
Nathan Bales Snitz Exchange | Do's and Dont's
You'd end up then storing all Language Strings for all Languages in the App Variables wouldn't you ? potentially thousands.
If you stored them in the Database, and retrieved them in a similar fashion to how I posted above, then your not only reducing the amount of App Variable overhead (and the potential threading/serialisation issues) but you could also then limit the Variables being loaded and created to just the language set the user requests by say having them in different tables eg FORUM_LANGFRENCH, FORUM_LANGHERBREW etc.
I must be honest though, I've not taken a great deal of interest in V4 and I may have made some incorrect assumptions here regarding how it does work.
quote:
EDIT: Actually Nathan, it would be MORE important that they are defined if they were Application Variables.
I think you were suggesting rather than assign's like Config.asp does now, that the App Variables be explicity referenced in the code as Application("Lang_String_xxx") ?? If so then this would really really hurt I think becuase of the serialisation, at least the way things are now all Variables are being retrieved and assigned in one place (config.asp) so the hit to the Application Object is relatively quick becuase its 100 serial requests, if they were split up amongst pages so that the interpreter had to process a little of this, then get a variable, then do a little of that, get another variable etc I think the wait times induced by seralisation would increase dramatically.
If this wasn't how you were suggesting it, then dont mind me at all heh
www.daoc-halo.com
Edited by - Gremlin on 28 April 2002 23:49:52< |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 28 April 2002 : 23:58:17
|
What I was saying is that the part in red should not be included in the test.
quote:
Here is the results for test 6 based on Application variables:
test6.asp: APPVAR-init+1000*ASSIGN
timer start 'assign all application vars Application("strLangActive00010") = "All Forums" '"All Forums" Application("strLangActive00020") = "Active Topics Since " '"Active Topics Since " ... for i=1 to 1000 s = Application("strLangActive00010") s = Application("strLangActive00020") ... next timer stop
[/b]
Storing them in the database is much much slower than storing them in files as variables, we have tested that to death.
Nathan Bales Snitz Exchange | Do's and Dont's< |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 April 2002 : 00:24:27
|
Ok my confusion then
Are there any posts with performance info from the testing that was done with them in the DB ?
www.daoc-halo.com< |
|
|
Nathan
Help Moderator
USA
7664 Posts |
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 April 2002 : 00:47:19
|
Thanks Nathan
I'm running a few real life simulations on my Test Forums now using Ms Web Stress Testing Tool between using DB Variables and AppVariables for just the basic Snitz config stuff, once I've got the scripts to my likings I might download a V4 and put some strings into the Database and see how that goes too. This is all pretty much for my own curiosity right now, but if I stumble accross anything interesting I'll post my findings.
www.daoc-halo.com< |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 29 April 2002 : 04:59:10
|
I'll also going to try my previous tests with constants, to see if I have similar results to Bozden. Maybe tonight...
------------------------------------------------- Installation Guide | Do's and Dont's | MODs< |
|
|
Deleted
deleted
4116 Posts |
Posted - 29 April 2002 : 19:00:11
|
posted by ruirib:
quote:
This looks like a good solution to me, and I don't think a single additional DB call will make much difference. That VB Execute statement can be a problem, though, but you can hardcode the assignments for IIS 4.0 and PWS, although that can slow down things a bit...
1) The proposed solution is very similar to the logic used in config.asp for application variables.
if blnLoadConfig then Application.Lock do while not rsConfig.EOF Application(strCookieURL & Trim(UCase(rsConfig("C_VARIABLE")))) = Trim(rsConfig("C_VALUE")) rsConfig.MoveNext loop Application.UnLock rsConfig.close end if
2) Although it can be used for app vars, we cannot use them for vars (as it is in the config.asp where variables are set from app.vars), because execute statement (or eval) is not available.
3) It will take Snitz a couple of more years to move to IIS5, because the implementation insists on IIS3 compatibility...
4) In the case of v4 language strings, as they will be some thousands, "one more hit" will mean that the performance will be reduced. You did the test!
Posted by Gremlin:
quote:
You could perhaps streamline it a little further too by looking at how the variables are named, for instance I have a single page which generates a CSS stylesheet for my from, that page only needs access to the various colour and style variables so If I rename then to perhaps strColor.... then I can change my select and reduce the data thats grabbed. Thats probably overkill for the 100 or so variables Snitz currently has, but it would add a little more flexibility/scalability.
Having a good variable naming standart is always important. The application variables to be added in v4b04 will either be "STRLANG..." or "INTLANG...".
Think Pink ==> Start Internationalization Here< |
|
|
Deleted
deleted
4116 Posts |
Posted - 29 April 2002 : 19:05:10
|
quote:
What I was saying is that the part in red should not be included in the test.
quote:
Here is the results for test 6 based on Application variables:
test6.asp: APPVAR-init+1000*ASSIGN
timer start 'assign all application vars Application("strLangActive00010") = "All Forums" '"All Forums" Application("strLangActive00020") = "Active Topics Since " '"Active Topics Since " ... for i=1 to 1000 s = Application("strLangActive00010") s = Application("strLangActive00020") ... next timer stop
[/b]
The test is actually correct, I think... They are set once when the server is started and then executed for every visit (this time 1000 visits).
Think Pink ==> Start Internationalization Here< |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 29 April 2002 : 19:14:34
|
quote:
posted by ruirib: 4) In the case of v4 language strings, as they will be some thousands, "one more hit" will mean that the performance will be reduced. You did the test!
I know I did the test , but I wasn't proposing this for our lang strings, just for the app vars. On my test conditions reading 100 values from the DB, with GetRows took about 0,085 secs (not much, I'd say, if scalability would be better than now).
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 29 April 2002 19:15:20< |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 30 April 2002 : 00:10:25
|
I don't think the performance difference between DB and App Variables is that great, it does (contrary to what I was predicting) look like App Variables when all loaded in one place in a linear fashion, like they presently are is the winner.
Using Web Stress Testing with the following user settings
Client machine: localhost ================================== Number of threads: 20 Number of users: 200 Hit Count: 4788 Connect Failures: 0
And with a script the basically just go and grabs default.asp, forum.asp and topic.asp I get the following results
default.asp using Database Variables default.asp using standard config.asp Time to first byte (in milliseconds) Time to first byte (in milliseconds) -------------------------------------- -------------------------------------
Average: 710.58 Average: 549.67 Min: 5.48 Min: 5.37 25th Percentile: 11.09 25th Percentile: 5.74 50th Percentile: 692.26 50th Percentile: 534.02 75th Percentile: 791.91 75th Percentile: 906.55 Max: 2690.70 Max: 1817.54
forum.asp using database variables forum.asp using standard config.asp Time to first byte (in milliseconds) Time to first byte (in milliseconds) -------------------------------------- -------------------------------------- Average: 280.37 Average: 130.63 Min: 5.35 Min: 5.45 25th Percentile: 5.76 25th Percentile: 5.78 50th Percentile: 335.97 50th Percentile: 139.10 75th Percentile: 352.89 75th Percentile: 148.52 Max: 1213.12 Max: 696.44
topic.asp using database variables topic.asp using standard config.asp Time to first byte (in milliseconds) Time to first byte (in milliseconds) ------------------------------------- ------------------------------------- Average: 480.15 Average: 253.57 Min: 5.47 Min: 5.44 25th Percentile: 6.13 25th Percentile: 5.86 50th Percentile: 508.96 50th Percentile: 333.21 75th Percentile: 635.46 75th Percentile: 338.81 Max: 1724.02 Max: 960.38
Right now this is only testing with the 100 or so an out of the box snitz install uses, I'll add in say another 500 variables to simulate the addition of some language strings and see what happens then.
Just as an aside, to see how much difference the tweaks I've been making to my own setup to remove database calls has gone, heres the same figures for a standard 3.3.03 forum.
default.asp Time to first byte (in milliseconds) ------------------------------------- Average: 1024.42 Min: 576.46 25th Percentile: 636.26 50th Percentile: 729.44 75th Percentile: 1244.33 Max: 2569.94
forum.asp Time to first byte (in milliseconds) ------------------------------------- Average: 567.58 Min: 444.99 25th Percentile: 468.33 50th Percentile: 476.53 75th Percentile: 514.98 Max: 1550.55
topic.asp Time to first byte (in milliseconds) -------------------------------------- Average: 746.47 Min: 590.02 25th Percentile: 613.30 50th Percentile: 630.80 75th Percentile: 726.39 Max: 1506.92
www.daoc-halo.com
Edited by - Gremlin on 30 April 2002 00:11:53< |
|
|
Deleted
deleted
4116 Posts |
Posted - 07 May 2002 : 05:08:52
|
Well... CONST's will work only:
a) You have a single language file included, OR b) You run on IIS 5.x and you use server.execute (will not be supported by Snitz, which is IIS 4 compatible)
This is because CONST's are evaluated in pre-compilation time, and you cannot use if-then-else constructs (you can use but, has no meaning). If you use them, it will throw an error stating that the constant is defined before.
Interesting thing, because VBScript is known with its lack of type checking.
Think Pink ==> Start Internationalization Here< |
|
|
Topic |
|