2009/5/20 gert <[email protected]>:
>
> On May 20, 3:21 am, Graham Dumpleton <[email protected]>
> wrote:
>> 2009/5/20 gert <[email protected]>:
>>
>> > On May 20, 2:56 am, Graham Dumpleton <[email protected]>
>> > wrote:
>> >> 2009/5/20 gert <[email protected]>:
>>
>> >> > On May 20, 2:12 am, Michael Schurter <[email protected]>
>> >> > wrote:
>> >> >> On Tue, May 19, 2009 at 5:09 PM, gert <[email protected]> wrote:
>> >> >> > Ok you win, but only if you can show me wsgi code that can tell a
>> >> >> > request to go to a other process in case they are no more threads 
>> >> >> > with
>> >> >> > some sort of ENV transfer session id :P
>>
>> >> >> Create a new thread.  I'm sure transferring the ENV would take more 
>> >> >> resources.
>>
>> >> >> If you're out of threads per process on the OS level, I'm guessing you
>> >> >> have bigger problems than your choice of scaling techniques.
>>
>> >> > I agree, still it would prefer to find solutions, to share memorie
>> >> > between processes then to make sure the same one gets picked.
>>
>> >> BTW, have you integrated use of memcached already into your system?
>>
>> > Can memcached store big query results as efficient ?
>>
>> Improving performance isn't all about the big queries, especially if
>> they are infrequent. Eliminating the very very frequent small queries,
>> which always yield the same result over time, is just as important.
>> Getting the most out of memcached is about choosing the most
>> appropriate thing to put in it.
>>
>> Anyway, your answer suggests you haven't tried to use memcached yet.
>
> No i did not try it yet, because it should be built into a good
> database engine anyway that also figures out to optimize the queries
> for me. My brain is not big enough to make complex wsgi
> infrastructures :-)

One of the main points of memcached is that what you cache is up to
you. Therefore you could cache database results which have had post
processing done on them, or even prerendered HTML pages or snippets of
HTML pages. That way you are also saving on the cost of that
processing and rendering.

For example, for home page of very busy site holding news stories or
blog post summaries, where information doesn't have to be exactly up
to date, you may generate the HTML snippet from database query and
then cache it in memcached so all processes can get it. That would be
set to timeout after 5 minutes, at which point would be recalculated
again.

For a well traffic'd site, you have therefore avoiding every visit to
home page, which is likely to be a large percentage of traffic,
hitting the database for everything every time.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to