On 12/12/2013 07:17 AM, Vladimir Shabanov wrote:
2013/12/12 Adam Chlipala <[email protected]
<mailto:[email protected]>>
Interesting; so throwing at least one popular proxy in front
doesn't bring magic performance improvements. That's at least
comforting from the perspective of not challenging my mental model
of how efficient the Ur/Web HTTP binaries are.
I think nginx helped my benchmark only because of it fixed non-working
keep-alive. Since nginx uses the same Ur/Web's HTTP interface there
shouldn't be any improvements on a local machine. On a faraway machine
it could help by reducing network latency by not making new connection
for each request.
But would you expect that latency improvement now that keepalive is
available?
One more thing -- in postgres (and maybe other backends) there is a
read only transaction mode (BEGIN READ ONLY). As far as I understand
ur/web already knows whether transaction is read only or not. Setting
this mode could improve the speed of query handling. Maybe not much
but who knows.
The compiler can do conservative program analysis that usually guesses
correctly about whether a transaction will write to the database. In
fact, that guess was already being calculated to use in XSRF protection,
so I've taken your suggestion and used it to start transactions as
read-only where it looks safe. I don't see a performance difference on
these particular benchmarks running in Postgres 8.4, but the real
comparison uses Postgres 9.1, whose manual does suggest setting READ
ONLY as a useful optimization for SERIALIZABLE transactions (which
Ur/Web uses).
Thanks for the idea!
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur