Hi All, I just need some basic advice on deploying Dancer2 onto RedHat. I am wanting to deploy it to be multithreaded, or at least not to block when it is running requests. Starman and Twiggy both seem to not want to run multithreads for some reason and I tried the Apache way and it just seems to compile the code everytime which ended up being not any faster than a single thread. What ways do people here deploy the app to be fast/multi-threaded? I tried this: http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod#Running_as_a_cg... However it seemed to recompile everything for every request. I understand about static files being hosted in front etc...as well, which I may do in the future. Thanks, David
Hi David, Here’s a link to the files I use to start a Dancer2 app on RedHat: rcfile: https://github.com/Q-Technologies/fcollect/blob/master/packaging/fcollect_rc... <https://github.com/Q-Technologies/fcollect/blob/master/packaging/fcollect_rcfile> it’s config: https://github.com/Q-Technologies/fcollect/blob/master/packaging/fcollect_sy... <https://github.com/Q-Technologies/fcollect/blob/master/packaging/fcollect_sysconfig.example> (these are used for including in an RPM so have different names to when they are deployed) Basically Starman runs as many workers as specified in the config file - each worker is a process - not a thread as such. I have one app which has 16 workers - it manages hundreds of simultaneous connections quite comfortably. Cheers, Matt
On 3 Nov 2015, at 4:02 pm, David H <untg99@gmail.com> wrote:
Hi All,
I just need some basic advice on deploying Dancer2 onto RedHat. I am wanting to deploy it to be multithreaded, or at least not to block when it is running requests.
Starman and Twiggy both seem to not want to run multithreads for some reason and I tried the Apache way and it just seems to compile the code everytime which ended up being not any faster than a single thread.
What ways do people here deploy the app to be fast/multi-threaded?
I tried this:
http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod#Running_as_a_cg... <http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod#Running_as_a_cgi-script_%28or_fast-cgi%29_under_Apache>
However it seemed to recompile everything for every request.
I understand about static files being hosted in front etc...as well, which I may do in the future.
Thanks,
David _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Hello David I use nginx or Apache ( as proxy ) of starman with pre forked process since long month This is very fast, more than apache + fcgi Hugues Le 03/11/2015 06:02, David H a écrit :
Hi All,
I just need some basic advice on deploying Dancer2 onto RedHat. I am wanting to deploy it to be multithreaded, or at least not to block when it is running requests.
Starman and Twiggy both seem to not want to run multithreads for some reason and I tried the Apache way and it just seems to compile the code everytime which ended up being not any faster than a single thread.
What ways do people here deploy the app to be fast/multi-threaded?
I tried this:
http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod#Running_as_a_cg...
However it seemed to recompile everything for every request.
I understand about static files being hosted in front etc...as well, which I may do in the future.
Thanks,
David
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Salutations
In general, threads and Perl and efficiency are a pick-at-most-two proposition. Most people are content with forking. But I would love to hear details of counter-examples.
On Tue, Nov 3, 2015 at 8:32 AM, Yitzchak Scott-Thoennes <sthoenna@gmail.com> wrote:
In general, threads and Perl and efficiency are a pick-at-most-two proposition. Most people are content with forking. But I would love to hear details of counter-examples.
There is an opinion that threads and processes are almost the same from the performance point of view: http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux
On Tue, Nov 3, 2015 at 12:56 AM, Alex Mestiashvili <mailatgoogl@gmail.com> wrote:
On Tue, Nov 3, 2015 at 8:32 AM, Yitzchak Scott-Thoennes <sthoenna@gmail.com> wrote:
In general, threads and Perl and efficiency are a pick-at-most-two proposition. Most people are content with forking. But I would love to hear details of counter-examples.
There is an opinion that threads and processes are almost the same from the performance point of view:
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux
Yes, that's the picking threads and efficiency and leaving out the Perl route :)
Indeed, but mightn't MCE provide the desired efficiency? On 11/3/2015 10:29 AM, Yitzchak Scott-Thoennes wrote:
On Tue, Nov 3, 2015 at 12:56 AM, Alex Mestiashvili <mailatgoogl@gmail.com> wrote:
On Tue, Nov 3, 2015 at 8:32 AM, Yitzchak Scott-Thoennes <sthoenna@gmail.com> wrote:
In general, threads and Perl and efficiency are a pick-at-most-two proposition. Most people are content with forking. But I would love to hear details of counter-examples. There is an opinion that threads and processes are almost the same from the performance point of view:
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux Yes, that's the picking threads and efficiency and leaving out the Perl route :)
Am 03.11.15 um 09:56 schrieb Alex Mestiashvili:
There is an opinion that threads and processes are almost the same from the performance point of view:
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux
This is from April 2009 - more than 6.5 years old. It talks of Linux 2.4 vs. 2.6. We now have Linux 4.2; don't take this link too serious without checking if it is still valid for recent kernels. Jochen
On Wed, Nov 4, 2015 at 11:16 AM, Jochen Lutz <jlu@gmx.de> wrote:
Am 03.11.15 um 09:56 schrieb Alex Mestiashvili:
There is an opinion that threads and processes are almost the same from the performance point of view:
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux
This is from April 2009 - more than 6.5 years old. It talks of Linux 2.4 vs. 2.6. We now have Linux 4.2; don't take this link too serious without checking if it is still valid for recent kernels.
The most valuable answer was last edited in 2012 with the comments from 2014. So I would assume that it is still valid even for 4.3. Are you aware of any significant changes in this field ? Anyway the topic starter mentioned RedHat, the kernel version must be quite ancient there :)
Am 04.11.15 um 13:20 schrieb Alex Mestiashvili:
On Wed, Nov 4, 2015 at 11:16 AM, Jochen Lutz <jlu@gmx.de> wrote:
Am 03.11.15 um 09:56 schrieb Alex Mestiashvili:
There is an opinion that threads and processes are almost the same from the performance point of view:
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux
This is from April 2009 - more than 6.5 years old. It talks of Linux 2.4 vs. 2.6. We now have Linux 4.2; don't take this link too serious without checking if it is still valid for recent kernels.
The most valuable answer was last edited in 2012 with the comments from 2014. So I would assume that it is still valid even for 4.3. Are you aware of any significant changes in this field ?
Not particularly. I know that in 2.6 were big chances in the scheduling. First the O(1) scheduler, later the CFQ scheduler. And the scheduler can have significant influence on process and thread performance. Jochen
participants (7)
-
Alex Mestiashvili -
David H -
Hugues -
Jochen Lutz -
John J. McDermott, CPLP -
Matthew Mallard -
Yitzchak Scott-Thoennes