Am 19.01.15 um 18:37 schrieb Clinciu Andrei:
First I'd like to wish you all a happy new year.
Soon it will be almost one year from the first time I started using
and learning NaviServer.
hi and welcome to the club!
In the meantime I've started developing a web framework as an exercise
(it's taking almost an year) to learn everything I can about
NaviServer. During this time I;ve had the time to dive in many cool
things but also faced many problems having to rewrite a lot of code.
I've developed a short list of questions I hope someone has an answer
or knows of an alternative. I had many more but I prefer to RTM and
try everything before I ask.
If anyone has similar experiences in production/development or has
any "best tuning/usage" advice I'd be more than happy to read it.
I've started using NSSSL , however, is there a possibility to make it
work on a per virtual host? *That it can load the .pem file from a
location within the virtual host location? *
If you have just a few server then the following setup should work:
ns_section ns/servers
ns_param $serverA $serverAName
ns_param $serverB $serverBName
ns_section ns/server/${serverA}/modules
ns_param nssslA nsssl.so
ns_section "ns/server/${serverA}/module/nssslA"
ns_param certificate $serverroot/etc/cert.pem
im am not sure, how well this will work with mass hosting, since every
server will probably need it own driver instance.
The framework I'm working with is in TclOO (i was using namespaces but
I had problems generating the pages, as somethings wouldn't render
correctly so had to make a new object for each connection) however it
seems not to work when preloading files so I have to load everything
each time a user hits the page. I've tried to make it work and even
trying to serialize everything but I did not seem to succeed. Did
anyone make it work? *Or is it a wiser choice to switch everything to
NX 2.0? *
The problem with TclOO in this respect is that some features of XOTcl
were dropped by design. It has e.g. no support for serialization and
recreation of objects/classes, which are part of XOTcl 2.0 and NX. My
recommendation is certainly to use NX, but i am certainly biased.
Same as above, is there a way to reload files into the init for all
threads once the server is started so there will not be a need to
restart it?
There is no full built-in support in NaviServer, but it can be done.
OpenACS has a mechanism for hot-reloading of Tcl/Objects/Classes, we use
this all the time.
I''ve noted a problem with keep-alive on most of the machines where
I've tested it. When accessing any domain form outside the LAN or
localhost it seems to take a long time to complete the load of images
or bigger files. Tests in Chrome and Firefox with the network analyzer
show that it loads the file in under one second but it keeps the
connection open for the file untill the max keep-alive seconds have
elapsed. So If i have a keep-alive of 10-20 seconds the page won't
load untill it's closed. I tried to put it to 5 seconds but it seems
way too long. The only good keep-alive time that seems to be adequate
is 2 seconds. /*By disabling it, will the server be more burdened or
doesn't it affect anything?
*/
a keep-alive of 10-20 seconds is way to long.
next-scripting.org has a closewait of 2 and a keepwait of 5, which are
the default values, with that it works quite ok.
Reducing the value does not harm, but every new request implies a new
tcp-connections which implies a new 3-way handshake in the standard
case. other than this, there is no bad side effect.
Is using the fastpath for css, img, js files 100-200 kb a good choice
or should I think of a accelerator/proxy?
there should be no need for this. depending on your loads, configure a
few writer threads and compressed static deliveries ( gzip_static in the
fastpath section).
I've tried many tuning options for the server to make it server many
.adp requests. However they seem to never go above 100 requests/sec
(with big latency) with simple writing/reading from db. Is this
normal? (Quad-Core and 16-core tests..) Compared to apache with a PHP
yii framework, the framework in PHP has faster response time 120 r/s.
there seems to be something wrong in your setup. processing .adp files
can be quite fast. just now, i've checked the delivery of the default
index.adp of a server, where server A (intel machine) requests this page
over the local network from server B (as well an intel machine). I've
measured 6594 requests per seconds (the default configuration with
maxthreads increased).
an .adp page can certainly perform complex operations. Do you see this
bad performance for all requests?
When using mmap on linux the loading time decreases substantially of
any web page naviserver serves, sometimes 30 seconds or more...
when testing with 5k sized on the same configuration as above, i see no
big differences, the configuration without mmap is slightly faster.
serving 5k.html with mmap: 5781 req/sec
serving 5k.html without mmap: 5847 req/sec
Also sometimes when using MySQL with ns_dbi without embeding the
database. It can happen that it gives an error "could not open handle"
and then the server crashes once in a while without any information.
Or it won't reconnect without a server restart. This isn't such a
problem since I use postgresql but some clients still have data and
require extraction or manipulation from mysql and errors like these
are weird.
i can't comment on mysql, we use mostly postgres, in connection with
OpenACS, nsdbpg is still recommended. We have seen siginficant slowdowns
with nsdbipg when it runs out of the prepared case, openacs has many
"... in (...)" queries, which are bad for preparing.
all the best
-gn
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel