Re: commandine standalone using 100% of core on doing what?
Hi Markthanks very much ...I'm going to go report the bug ... its definitely reproducible here. i just need to gather more data that i can give with the report. Dulley noted on the intentions with the httpd library. On Fri, Apr 6, 2018 at 4:14 AM, Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > On 2018-04-05 15:27, Tom Glod via use-livecode wrote: > >> Hi folks, I wanted to benchmark the httpd library and decided to create a >> command line server application. >> >> I run it using "-ui" command ... >> >> and I use the "on Startup" message to print out a welcome message" >> >> thats all I have so far. >> >> But my executable process is using up 100% of the core . continuously. >> >> what is it doing ? what am I doing wrong? >> >> v9 .0 on windows 7. >> > > Hmmm - this is potentially a bug - in -ui mode the engine falls back to > using simpler event handling and such. It doesn't create any windows or > other system objects. > > My guess would be that in that mode (on Windows) something is causing the > event loop to trigger continuously, hence the 100% CPU usage. > > Just a note about the httpd library - we added that for a very specific > use-case... To allow a LiveCode app to talk to other processes locally; the > specific case being it allows an emscripten built standalone running in a > browser to communicate some info back to the IDE (in 'Test' mode). > > Another use of such a thing I encountered yday, was when using gcloud. I > was setting up the gcloud sdk on my Mac, and in order to be able to do > anything you need to authenticate. I was pleasantly surprised when I typed > the command to authenticate a 'project' in Terminal and up popped Chrome > allowing me to authenticate - the command line app had temporarily created > a httpd server so the web-page could send the auth token back to it. I > didn't even need to enter my details as I was already logged in to the > gcloud console in Chrome. > > So, it wasn't intended as a general web-server, but for small tasks where > you need to talk to something which naturally talks http :) > > Warmest Regards, > > Mark. > > -- > Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
On 2018-04-05 15:27, Tom Glod via use-livecode wrote: Hi folks, I wanted to benchmark the httpd library and decided to create a command line server application. I run it using "-ui" command ... and I use the "on Startup" message to print out a welcome message" thats all I have so far. But my executable process is using up 100% of the core . continuously. what is it doing ? what am I doing wrong? v9 .0 on windows 7. Hmmm - this is potentially a bug - in -ui mode the engine falls back to using simpler event handling and such. It doesn't create any windows or other system objects. My guess would be that in that mode (on Windows) something is causing the event loop to trigger continuously, hence the 100% CPU usage. Just a note about the httpd library - we added that for a very specific use-case... To allow a LiveCode app to talk to other processes locally; the specific case being it allows an emscripten built standalone running in a browser to communicate some info back to the IDE (in 'Test' mode). Another use of such a thing I encountered yday, was when using gcloud. I was setting up the gcloud sdk on my Mac, and in order to be able to do anything you need to authenticate. I was pleasantly surprised when I typed the command to authenticate a 'project' in Terminal and up popped Chrome allowing me to authenticate - the command line app had temporarily created a httpd server so the web-page could send the auth token back to it. I didn't even need to enter my details as I was already logged in to the gcloud console in Chrome. So, it wasn't intended as a general web-server, but for small tasks where you need to talk to something which naturally talks http :) Warmest Regards, Mark. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
great news for me thank you. on top of that I can run 1 of these services on each core listening to a different port. thanks for the links to the benchmarks. On Thu, Apr 5, 2018 at 3:12 PM, Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > Tom Glod wrote: > > > What are the chances I will get similar performance using a stack and > > httpd to process http requests . as i would using lc server .. > > if the performance is similar, i feel more confident building using > > this form . i'm not producing HTML code . just passing > > encrypted arrays back and forth . as well as sending & receiving > > small small files. > > > > that way i don't have to even run apache . just nginx and the > > services > > Quite good, I'd say: > > http://lists.runrev.com/pipermail/use-livecode/2016-March/225068.html > http://lists.runrev.com/pipermail/use-livecode/2016-March/225081.html > http://lists.runrev.com/pipermail/use-livecode/2016-March/225141.html > http://lists.runrev.com/pipermail/use-livecode/2016-March/225147.html > > Replacing Apache with NginX will boost performance in many areas, and > hooking in any persistent process behind it will always beat a CGI, such as > LiveCode Server, which launches, runs, and dies with each request. > > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
Tom Glod wrote: > What are the chances I will get similar performance using a stack and > httpd to process http requests . as i would using lc server .. > if the performance is similar, i feel more confident building using > this form . i'm not producing HTML code . just passing > encrypted arrays back and forth . as well as sending & receiving > small small files. > > that way i don't have to even run apache . just nginx and the > services Quite good, I'd say: http://lists.runrev.com/pipermail/use-livecode/2016-March/225068.html http://lists.runrev.com/pipermail/use-livecode/2016-March/225081.html http://lists.runrev.com/pipermail/use-livecode/2016-March/225141.html http://lists.runrev.com/pipermail/use-livecode/2016-March/225147.html Replacing Apache with NginX will boost performance in many areas, and hooking in any persistent process behind it will always beat a CGI, such as LiveCode Server, which launches, runs, and dies with each request. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
Mark Wieder wrote: > On 04/05/2018 08:46 AM, Richard Gaskin via use-livecode wrote: > >> You may try running the standalone with strace to see the system >> calls it's making: >> >>strace ./mystandalone > > I don't think strace is on Windows. I'd recommend Process Lasso for > seeing what's going on. > https://bitsum.com/ > > But if you need deep system tracing, you probably want Dr. Memory. > > http://drmemory.org/docs/page_drstrace.html > http://drmemory.org/ How do people get a day's work done with taking advantage of the Ubuntu shell Microsoft now provides for Win10 users? :) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
What are the chances I will get similar performance using a stack and httpd to process http requests . as i would using lc server .. if the performance is similar, i feel more confident building using this form . i'm not producing HTML code . just passing encrypted arrays back and forth . as well as sending & receiving small small files. that way i don't have to even run apache . just nginx and the services, On Thu, Apr 5, 2018 at 1:43 PM, Tom Glod wrote: > it was my goal to benchmark httpd ..but didn't get that far since it maxed > out the cpu and didn't let up...then i took out httpd..still did > that...and thats how i got to testing an entirely blank new stack. > > must be a windows thing. i will be running it on digital ocean > ubuntu...so i',m not that concerned about a windows problem...but i would > still like to get to the bottom of itwill have to look into the tracing > tools. haven't had time today. > > On Thu, Apr 5, 2018 at 1:27 PM, Richard Gaskin via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Tom Glod wrote: >> >> > hi richard... the standalone opens fine when i don't use the -UI >> > parameter. it opens up the blank stack and does nothingas its >> > supposed to since there is no code anywhere doing anything. no library >> > was modified...or even used. >> >> If you're not using any libraries how is the httpd invoked? >> >> >> > its a blank stack. >> > >> > the -ui flag puts it into the loop. I guess I don't have to use it. >> >> Depends what you're doing. If this will be a server it can be helpful to >> save CPU and RAM by not loading UI stuff that'll never be used. >> >> Well crafted server OSes don't even have a GUI at all, so on those not >> running a standalone without -ui will likely trigger an error as it looks >> for graphics libs not present. >> >> >> > but still wondering what its doing. >> >> I just build a standalone here in v9 under Ubuntu 14.04 and ran with -ui; >> not even enough CPU consumption to show up in top. >> >> strace showed the usual things (more than half of it loading fonts that >> are almost never used in faceless apps and CGIs), but there was one oddity >> I don't recall seeing before, toward the very end: >> >> ... >> lstat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", >> {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 >> stat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", >> {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 >> lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, >> st_size=4096, ...}) = 0 >> lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, >> st_size=4096, ...}) = 0 >> stat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, >> st_size=4096, ...}) = 0 >> gettimeofday({1522948176, 179743}, {420, 0}) = 0 >> ... >> >> Why would a standalone bother trying to stat JVM? >> >> I don't think that's related to your CPU issue, but odd just the same. >> >> >> -- >> Richard Gaskin >> Fourth World Systems >> Software Design and Development for the Desktop, Mobile, and the Web >> >> ambassa...@fourthworld.comhttp://www.FourthWorld.com >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
it was my goal to benchmark httpd ..but didn't get that far since it maxed out the cpu and didn't let up...then i took out httpd..still did that...and thats how i got to testing an entirely blank new stack. must be a windows thing. i will be running it on digital ocean ubuntu...so i',m not that concerned about a windows problem...but i would still like to get to the bottom of itwill have to look into the tracing tools. haven't had time today. On Thu, Apr 5, 2018 at 1:27 PM, Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > Tom Glod wrote: > > > hi richard... the standalone opens fine when i don't use the -UI > > parameter. it opens up the blank stack and does nothingas its > > supposed to since there is no code anywhere doing anything. no library > > was modified...or even used. > > If you're not using any libraries how is the httpd invoked? > > > > its a blank stack. > > > > the -ui flag puts it into the loop. I guess I don't have to use it. > > Depends what you're doing. If this will be a server it can be helpful to > save CPU and RAM by not loading UI stuff that'll never be used. > > Well crafted server OSes don't even have a GUI at all, so on those not > running a standalone without -ui will likely trigger an error as it looks > for graphics libs not present. > > > > but still wondering what its doing. > > I just build a standalone here in v9 under Ubuntu 14.04 and ran with -ui; > not even enough CPU consumption to show up in top. > > strace showed the usual things (more than half of it loading fonts that > are almost never used in faceless apps and CGIs), but there was one oddity > I don't recall seeing before, toward the very end: > > ... > lstat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", > {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 > stat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", > {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 > lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, > st_size=4096, ...}) = 0 > lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, > st_size=4096, ...}) = 0 > stat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, > st_size=4096, ...}) = 0 > gettimeofday({1522948176, 179743}, {420, 0}) = 0 > ... > > Why would a standalone bother trying to stat JVM? > > I don't think that's related to your CPU issue, but odd just the same. > > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
Tom Glod wrote: > hi richard... the standalone opens fine when i don't use the -UI > parameter. it opens up the blank stack and does nothingas its > supposed to since there is no code anywhere doing anything. no library > was modified...or even used. If you're not using any libraries how is the httpd invoked? > its a blank stack. > > the -ui flag puts it into the loop. I guess I don't have to use it. Depends what you're doing. If this will be a server it can be helpful to save CPU and RAM by not loading UI stuff that'll never be used. Well crafted server OSes don't even have a GUI at all, so on those not running a standalone without -ui will likely trigger an error as it looks for graphics libs not present. > but still wondering what its doing. I just build a standalone here in v9 under Ubuntu 14.04 and ran with -ui; not even enough CPU consumption to show up in top. strace showed the usual things (more than half of it loading fonts that are almost never used in faceless apps and CGIs), but there was one oddity I don't recall seeing before, toward the very end: ... lstat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 stat64("/usr/lib/jvm/java-6-openjdk-i386/bin/javac", {st_mode=S_IFREG|0755, st_size=38604, ...}) = 0 lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/usr/lib/jvm/java-6-openjdk-i386", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 gettimeofday({1522948176, 179743}, {420, 0}) = 0 ... Why would a standalone bother trying to stat JVM? I don't think that's related to your CPU issue, but odd just the same. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
thanks for those tools Mark. I just tested it again on a plain blank stack . make standalone .run with -ui flag .and its using going full tiltmaybe you can reproduce it? On Thu, Apr 5, 2018 at 12:16 PM, Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 04/05/2018 08:46 AM, Richard Gaskin via use-livecode wrote: > > You may try running the standalone with strace to see the system calls >> it's making: >> >>strace ./mystandalone >> >> > I don't think strace is on Windows. I'd recommend Process Lasso for seeing > what's going on. > https://bitsum.com/ > > But if you need deep system tracing, you probably want Dr. Memory. > > http://drmemory.org/docs/page_drstrace.html > http://drmemory.org/ > > -- > Mark Wieder > ahsoftw...@gmail.com > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
On 04/05/2018 08:46 AM, Richard Gaskin via use-livecode wrote: You may try running the standalone with strace to see the system calls it's making: strace ./mystandalone I don't think strace is on Windows. I'd recommend Process Lasso for seeing what's going on. https://bitsum.com/ But if you need deep system tracing, you probably want Dr. Memory. http://drmemory.org/docs/page_drstrace.html http://drmemory.org/ -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
hi richard... the standalone opens fine when i don't use the -UI parameter. it opens up the blank stack and does nothingas its supposed to since there is no code anywhere doing anything. no library was modified...or even used. its a blank stack. the -ui flag puts it into the loop. I guess I don't have to use it. but still wondering what its doing. On Thu, Apr 5, 2018 at 11:46 AM, Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > Tom Glod wrote: > > > Hi folks, I wanted to benchmark the httpd library and decided to > > create a command line server application. > > > > I run it using "-ui" command ... > > > > and I use the "on Startup" message to print out a welcome message" > > > > thats all I have so far. > > > > But my executable process is using up 100% of the core . > > continuously. > > > > what is it doing ? what am I doing wrong? > > > > v9 .0 on windows 7. > > I don't know what that library is doing, but I use standalones in nearly > every server system I make so I know it's not the standalone itself eating > up CPU. > > If the lib hasn't been altered, you should see the same behavior no matter > where it's running, even on the desktop. If you don't perhaps something > else is in play > > You may try running the standalone with strace to see the system calls > it's making: > > strace ./mystandalone > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: commandine standalone using 100% of core on doing what?
Tom Glod wrote: > Hi folks, I wanted to benchmark the httpd library and decided to > create a command line server application. > > I run it using "-ui" command ... > > and I use the "on Startup" message to print out a welcome message" > > thats all I have so far. > > But my executable process is using up 100% of the core . > continuously. > > what is it doing ? what am I doing wrong? > > v9 .0 on windows 7. I don't know what that library is doing, but I use standalones in nearly every server system I make so I know it's not the standalone itself eating up CPU. If the lib hasn't been altered, you should see the same behavior no matter where it's running, even on the desktop. If you don't perhaps something else is in play You may try running the standalone with strace to see the system calls it's making: strace ./mystandalone -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
commandine standalone using 100% of core on doing what?
Hi folks, I wanted to benchmark the httpd library and decided to create a command line server application. I run it using "-ui" command ... and I use the "on Startup" message to print out a welcome message" thats all I have so far. But my executable process is using up 100% of the core . continuously. what is it doing ? what am I doing wrong? v9 .0 on windows 7. Thanks, Tom ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode