Hello Mohammed,
Wt's wthttpd is multithreaded and asynchronous, which is capable of
providing excellent performance. There are a few things you need to be
aware:
- The amount of threads used by wthttpd can be set by the --thread startup
option (by default this threadpool contains 10 threads).
- If this threadpool is exhausted, new incoming requests will not be
answered until threads become available.
- Avoid to do long computations in wthttpd's threads. The UI of your
session will show the loading indicator, and the thread cannot be used to
serve other clients for the duration of the computation. To resolve the
situation, increase the amount of threads used by wthttpd, or perform your
computations in a sepatate thread/process
- Avoid the use of 'recursing event loops'. As you mention dialog: if you
use exec() to display a dialog, the session will occupy a thread until the
user closes the dialog and exec() returns. Instead, use show() and hide()
to display/hide dialogs (see documentation of WDialog). Do not use exec()
in applications that will have more users that the amount of threads in
your wthttpd threadpool.
The OS will automatically schedule the active threads on multiple CPUs.
Best regards,
Wim.
2012/6/4 Mohammed Rashad <[email protected]>
> Hi,
> Is it possible to spawn a new instance of wthttpd application when there
> are more number of users accessing it. for example the 0-5 users gets
> instance1 and 5-10 gets instance2 and so on. My application is not scaling
> up for cloud system. Is it because of builtin httpd server. I used monit
> and I found that it uses less cpu and ram but still application hangs and
> is becoming slow even with good internet connection. For example, a WDialog
> appears with some text and nothing in the background (CSS loading problems)
>
> Is there anything which I can do to make my Wt httpd application to scale
> up to use more resources if needed ?
>
> Can Wt httpd application make use of multiple cpus ?
>
> --
> Regards,
> Rashad
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest