Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Gustaf Neumann
what happens, if you try byte-compiled code, e.g.: test.adp Test list <%=[ns_fmttime [ns_time]]%> <% proc foo {n} { for { set i 0 } { $i < $n } { incr i } { ns_adp_puts $i }} foo 50 %>

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
So, what if readahead > bufsize, what does that mean? When we read-ahead, we read directly into the buffer. If the buffer is read-ahead sized, no point reading in smaller than neccessary bufsize chunks. What if readahead < bufsize? Does it mean the buffer will never be fully filled? What kind of

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > Now in this case, you tested the acceptsize knob, found that if you > turn it up there's an improvement, and if you leave it free to float > all the way up it hurts nothing. You discovered that there's one > correct setting: on. Or at least,

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
Now in this case, you tested the acceptsize knob, found that if you turn it up there's an improvement, and if you leave it free to float all the way up it hurts nothing. You discovered that there's one correct setting: on. Or at least, you have no evidence to suggest when you ever would turn it do

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: On 12.12.2006, at 18:54, Stephen Deasey wrote: > I am weeping quietly into my sleeve... Why? (more info!) Because some dead guys figured it all out before I was even born and I sometimes feel that I am wasting my time, and that the wo

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I agree, to many knobs but hey, postgresql has it also and they always had such questions of how many bufers ineed to allocate, how much memory for sort, for temp. They got tired and on install now it tries to detect what is possible and set

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Zoran Vasiljevic
On 12.12.2006, at 18:54, Stephen Deasey wrote: I am weeping quietly into my sleeve... Why? (more info!) My collegue writing dynamic pages uses that for years and he told me he cannot understand how other folks can program with that arcane mixture of programing lauguage's and html markup. And

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
I agree, to many knobs but hey, postgresql has it also and they always had such questions of how many bufers ineed to allocate, how much memory for sort, for temp. They got tired and on install now it tries to detect what is possible and set appropriate settings. but the knobs are still there

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: html { table { for {set i 0} {$i < 10} {incr i} { tr { td { } td { ... } } } } } I am w

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: When i started this i did not want to be the fastest, i wanted to see where we stand, even if it would turn out that we are the slowest, that would mean it requires some work in optimization area. I am not looking around for the fastest toolk

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Zoran Vasiljevic
On 12.12.2006, at 17:59, Vlad Seryakov wrote: at least it requires special tuning or producing specific Tcl code to be as fast as others That is, if you keep all your vital Tcl processing encapsulated in procedures and use Tcl sparsely in the adp page, you are OK. Isn't this also going to h

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
When i started this i did not want to be the fastest, i wanted to see where we stand, even if it would turn out that we are the slowest, that would mean it requires some work in optimization area. I am not looking around for the fastest toolkit to switch, but as i told i caught myself thinking

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
I understand, i tried 500 concurrent requests to do 5, NS did at 1200 req/sec easy, but apache produced 70 processed and barely finished, i guess my machine started swaping and average was 800 req/sec Real example is good to have but to have an idea how it works with simple one is not bad

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: On 12.12.2006, at 17:29, Vlad Seryakov wrote: > nope, it made it even slower :-)) So we are the fastest on the planet (at least under circumstaces=) :-) This planet..?

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Zoran Vasiljevic
On 12.12.2006, at 17:29, Vlad Seryakov wrote: nope, it made it even slower :-)) So we are the fastest on the planet (at least under circumstaces=) :-)

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/11/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: ... I actually even tried to test PHP inside Naviserver, same file, it was much slower than under Apache and .adp. I specifically chose simple examples and no DB, i wanted to see how simple web pages are served. I always though that Apache/P

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
nope, it made it even slower :-)) In the Optimizer doc the only way to really improve is to use precompiled files Bernd Eidenschink wrote: I tried Zend Optimizer, still same speed, i guess there could PHP tricks to speed up things i am not aware of Maybe putting PHP for loop into a function?

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Bernd Eidenschink
> I tried Zend Optimizer, still same speed, i guess there could PHP tricks > to speed up things i am not aware of Maybe putting PHP for loop into a function? :-))) Test list

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
I tried Zend Optimizer, still same speed, i guess there could PHP tricks to speed up things i am not aware of Bernd Eidenschink wrote: How do i install Zend optimizer? In order to download it, you have to create an account on their website. See http://www.zend.com/downloads "Zend Optimizer"

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
yes, i played with all those settings, not significant, i start with 10 threads, then i tried with 30 threads, usually first run is slow but after that it runs at full speed. I checked nsstats.conf for lock contention and even tried to disable some for testing purposes, no big difference, i wou

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Bernd Eidenschink
> How do i install Zend optimizer? In order to download it, you have to create an account on their website. See http://www.zend.com/downloads "Zend Optimizer" (right column). The latest should be ZendOptimizer-3.2.0 (For PHP 5.2.x). There's an install script which you run as root. It asks you w

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
Yes, i tried setting it to 1024 with maxqueuesize 1024 and it does not make noticeable difference, with 10 and 1024 it runs at the same rate. I guess it will depend on the application, this knob can be useful tuning thing and it is not universal Stephen Deasey wrote: On 12/12/06, Vlad Seryako

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Vlad Seryakov
How do i install Zend optimizer? Bernd Eidenschink wrote: Then i disabled .tcl caching, results are constantly around 1500 req/sec and i checked PHP source, it does compile file with every request, so PHP compiler is little bit faster than Tcl compiler. when you install the Zend Optimizer (wi

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Bernd Eidenschink
Does "ab" use keepalive (guess not...)? NaviServer should start with all 10 threads from the beginning (at least with the same number your Apache does pre-fork). Turn all kind of stats off that may be on by default. == ns_section ns/

Re: [naviserver-devel] Benchmarks

2006-12-12 Thread Stephen Deasey
On 12/12/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: but only when acceptsize is greater than 1, i tested with 5, results are exactly as php, around 1540-1560 req/sec, when i set acceptsize to 10, i constantly got results 1600-1610. Did you try it such that it would accept all pending connect

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Bernd Eidenschink
>Then i disabled .tcl caching, results are constantly around 1500 req/sec >and i checked PHP source, it does compile file with every request, so >PHP compiler is little bit faster than Tcl compiler. when you install the Zend Optimizer (with default optimization levels), how much does that speed

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
Actually i was wrong, when using .tcl file and caching enabled it works faster than apache/php, not significantly but only when acceptsize is greater than 1, i tested with 5, results are exactly as php, around 1540-1560 req/sec, when i set acceptsize to 10, i constantly got results 1600-1610.

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
yes, it is slower than from .adp page Zoran Vasiljevic wrote: On 11.12.2006, at 23:21, Vlad Seryakov wrote: Getting to C language every time i need to do stuff is not an option Did yu try ns_return as Stephen suggested? --

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 23:21, Vlad Seryakov wrote: Getting to C language every time i need to do stuff is not an option Did yu try ns_return as Stephen suggested?

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
No i am not moving to PHP, i am just trying to to justify the reason for some people why i am still using Naviserver/Tcl and do not want to switch to more "modern" or popular platforms like PHP, Java, Python or Ruby. If nothing else, the problem only arise when comparing speed, not overall syst

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Stephen Deasey
On 12/11/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I can sqeeze something from C maybe, but Tcl is a bottleneck, making "for" loop bigger than over 200-500 iterations makes it crawl comparing to PHP, even with Tcl files cached, still it is 2-3 times slower. I am evaluating stuff for high perfo

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 17:04, Vlad Seryakov wrote: It is hard to convince to use 2-3 times slower language even if the whole system is more versatile I think you need to make some "realistic" examples and then compare. But this is out of the scope of this discussion. We need/should know where we

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
Zoran Vasiljevic wrote: On 11.12.2006, at 16:56, Vlad Seryakov wrote: I can sqeeze something from C maybe, but Tcl is a bottleneck I understood that even for a index.html (which is a static file) you get bad values. Therefore I suggested to short-circuit layers and find out which one sucks.

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 16:56, Vlad Seryakov wrote: I can sqeeze something from C maybe, but Tcl is a bottleneck I understood that even for a index.html (which is a static file) you get bad values. Therefore I suggested to short-circuit layers and find out which one sucks. Tcl is definitely not th

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
I can sqeeze something from C maybe, but Tcl is a bottleneck, making "for" loop bigger than over 200-500 iterations makes it crawl comparing to PHP, even with Tcl files cached, still it is 2-3 times slower. I am evaluating stuff for high performance web site and it looks like Tcl alone makes re

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 16:27, Vlad Seryakov wrote: I tested AS 4.5, it is even slower than NS, not much but a little bit Well, then it is not the Tcl channel stuff as 4.5 still uses open/read. In that case it must be something else. I guess you need to put shortcircuit code at various places to is

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
I tested AS 4.5, it is even slower than NS, not much but a little bit Zoran Vasiljevic wrote: On 11.12.2006, at 06:17, Vlad Seryakov wrote: The results are somewhat bad, Naviserver is 2x slower on simple adp page comparing to similar PHP page. Not that the channel stuff I added some time i

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 16:13, Vlad Seryakov wrote: Looks like deficiency in Tcl and driver/queue processing. If you use static pages, then Tcl whould be included only when accessing Tcl FS. That's why I asked if you can try aolserver under same circumstances, as it does not call Tcl FS for that ki

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Vlad Seryakov
It is all defaults, as php and NS. I even tried to test test.html, but still apache is almost twice fatster than fastpath. Changing to clock did not make any difference. Playing with fancy non-fancy ADP parsers did not change anything as well. Looks like deficiency in Tcl and driver/queue proc

Re: [naviserver-devel] Benchmarks

2006-12-11 Thread Zoran Vasiljevic
On 11.12.2006, at 06:17, Vlad Seryakov wrote: The results are somewhat bad, Naviserver is 2x slower on simple adp page comparing to similar PHP page. Not that the channel stuff I added some time is braking us... Did you try the aolserver, as it does not use Tcl channels at the places we do?

Re: [naviserver-devel] Benchmarks

2006-12-10 Thread Bernd Eidenschink
Hi Vlad, > The results are somewhat bad, Naviserver is 2x slower on simple adp page > comparing to similar PHP page. can you replace the [ns_fmttime [ns_time... with one [clock format [clock seconds] -format "%c"] and did you set up similar configuration values in php.ini and config.tcl? Like,

[naviserver-devel] Benchmarks

2006-12-10 Thread Vlad Seryakov
Reading recently about different tests, i decided to see how we stand with PHP or Ruby. The results are somewhat bad, Naviserver is 2x slower on simple adp page comparing to similar PHP page. Below are files: test.php --- Test list test.adp ---