Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Issues with the controller running at 100% CPU
rickard
Newbie
Posts: 7
Permalink
Post Issues with the controller running at 100% CPU
on: February 7, 2012, 06:57
Quote

Hi Guys,

I'm running the controller on Mac OS Lion and it's constantly running at 100% CPU, even when totally idle. Does anyone else have this problem or should I start checking my setup?

Kind Regards, Rickard.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Issues with the controller running at 100% CPU
on: February 7, 2012, 13:23
Quote

Hi Rickard, sorry I missed your email. Running at 100% isn't a deliberate design feature, no! That said, one of the reasons I place the lower limit on the grid size is that very low values here do make the controller do an awful lot of work and tend to kill it's responsiveness. It hasn't been programmed to be very efficient, and it often does a lot of recalculation whether it needs to or not.

Upon startup, before you do anything else, does it hit 100%, or do you need to do something to prompt it?

rickard
Newbie
Posts: 7
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 7, 2012, 13:59
Quote

HI Sandy,

No problem, I just thought you might want allt the questions here instead.

The controller uses up about 60% when I start it (new computer, small window). And when I make the window a bit bigger, it uses 120% CPU. This is just starting the application for the first time.

I'm using Mac OS Lion on both computers.

Rickard.

lanthan
Newbie
Posts: 22
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 7, 2012, 17:58
Quote

Hi Rickard,
Testing it on a mac (SL10.6.8) right now, the compiled app from the release. Drawing vectors (C17)
Activity monitor shows me polargraphcontroller around 114% CPU with 31 threads and 147.7 MB in memory
But the overall CPU use is idling 86% and correspondingly top shows me 14 to 15% CPU usage (user), 1 to 3% system, the rest is idle time.
The app doesn't feel unresponsive.

rickard
Newbie
Posts: 7
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 7, 2012, 18:14
Quote

The app seems fine to me while running, it's the Macbook fans that's killing me. No way I will leave this overnight during a long drawing session.

Rickard.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Issues with the controller running at 100% CPU
on: February 7, 2012, 21:14
Quote

Not sure what to do about that to be honest, when I select an image and push the grid down low then it does get pretty sluggish, and often misses clicks in the controller itself, but the rest of the system is fine, and CPU sits on 25%. It could be a coincidence that Processing is not concurrent and I have a quad core machine (so it's maxing one core), but the graphs give the impression that the load is spread over all four cores. And it does pop over 25% every now and then. I know that some people are using is successfully with Lion, but I can't test it myself.

I have made a little queue runner app that does nothing except runs a queue. So you could use the regular controller to export all your commands, then close it and use queue runner to fire them off overnight.

It's at http://code.google.com/p/polargraph/source/browse/#svn%2Fqueuerunner%2Ftrunk (or http://code.google.com/p/polargraph/downloads/) just brand new this minute. After looking at it, it still sits there taking up 25% of cpu, so I wonder if it isn't a controlp5 thing where it's idling just drawing boxes and things. Well, I suppose running this little thing will tell you. It would be pretty easy to turn into a commandline util if necessary, but the easiest way (though not the cheapest way) is to get an arduino mega and an SD card and run it that way! Hurrah!

Can you tell I'm excited about getting standalone drawing working?

Cheers
Sandy Noble

hendrik
Newbie
Posts: 4
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 10, 2012, 23:30
Quote

I am having the same problem (and maybe the system too, a MBP 13" with Lion) with CPU load of 120% and up if the controller screen is stretched to fullscreen. Keeping the screen small during queueing solves it very well with a average CPU load of 20%. So, it might have something to do with the on board intel graphics chip.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Issues with the controller running at 100% CPU
on: February 11, 2012, 11:28
Quote

Could be Hendrik, historically Processing has had a couple of rendering systems with different levels of acceleration (openGL etc), and I've only ever used whatever the default is. It's possible there's one that works better on macs, I'll have a look. Though I also think I remember reading that there would only be one rendering engine in the newer versions of processing (2.0+), so that could be a good thing or a bad thing. Does the load change if you turn off the density preview, or show a different tab? Also, I'm confused about what 120% cpu means - I thought it must be a typo but a few people wrote it. If 100% isn't the absolute max, then what is?

rickard
Newbie
Posts: 7
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 11, 2012, 18:41
Quote

Hi Sandy,

I guess what he means it that the system CPU-usage is 120%, so the processing (java) process is using up (close to) 100% and then 20% for some other stuff he has running (web, mail etc). On a MP system the total CPU-usage is 100 times the number of processors.

The runner-app works great, not any CPU-usage to talk about. My bet is that some component you are using is (perhaps controlp5) is not that optimized and using up lots of CPU keeping all the graphics updated.

Could you in some way have an option to turn off the preview and disable some of the graphics in the application? This would firstly make the primary application usable for most of us since we don't need that much graphics while most of the time and might also help you find exactly what component is causing the high CPU-usage.

BTW, got my first usable print today, after trying all the pens I had in the house I discovered that "FABER-CASTELL Ecco Pigment" works great. Pigmented ink with non bleeding tips. Easy to get here in Sweden (art stores) so it might be something to recommend to people.

Sending you an e-mail in a few with a picture of how I solved the motor wires in a neat way.

Rickard.

hendrik
Newbie
Posts: 4
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 11, 2012, 22:17
Quote

Hi,
Actually my computer is telling me strange enough that the Polargraph controller is using 120% CPU load.
Image

Changing tabs, turning on or off previews and serial communication don't change much. The only thing that helps is the screen size.
Image

It doesn't bother me much as there is an easy solution.
I actually have another puzzle http://www.polargraph.co.uk/forum/?mingleforumaction=viewtopic&t=27

Hendrik

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Issues with the controller running at 100% CPU
on: February 11, 2012, 23:14
Quote

How weird! I hadn't thought of multiprocessor systems having a maximum of 400% (or whatever). On reflection, that's nothing a thing I'm going to worry about, it's only just over a quarter of the total CPU, and that's more or less what mine reports too (25%).
Oh, that's if it's a quad core machine. On a dual core, that's 60% of total CPU, so that's not great I suppose. I'll admit that at the moment I'm more interested in concentrating on reliability and features than performance. That said, the way the app works is by continuously recalculating and redrawing rather than by caching or repainting, so there are at least a couple of things that could be optimised.

I'm away this weekend so not in a position to test, but will look a bit more closely at this next week. I can't think of much that is common to all tabs, except ControlP5 buttons and things, but the queue runner app also uses ControlP5 and that doesn't exhibit this CPU hogging.

Rickard, would be keen to see your wiring solutions. The best luck I've had with any pens have been with pigmented (water based) fineliners, so I guess that's a similar thing to what you're using - really glad to hear you got something from the machine you liked 🙂

rickard
Newbie
Posts: 7
Permalink
Post Re: Issues with the controller running at 100% CPU
on: February 18, 2012, 10:55
Quote

Sandy,

Sending you more info on the wiring over e-mail, feel free to post it anywhere you like.

I also added another post here about bluetooth-printing that I think you will like.

Rickard.

dZoid
Newbie
Posts: 17
Permalink
Post Re: Issues with the controller running at 100% CPU
on: August 2, 2012, 23:05
Quote

Hi a cpu meter going over 100% would means that to make what it should do on 1 seconds, it need 1.2 seconds, or maybe i'm messing things up with the load mesurement ...

Btw i have the same problem on montain lion ( 10.8 )

cawer
Newbie
Posts: 9
Permalink
Carlos Werberich
Post Re: Issues with the controller running at 100% CPU
on: February 23, 2015, 11:23
Quote

Hi folks,

I'm starting a polargraph project and I also notice 100% CPU when running sketching from Processing on Macos Mavericks.
So I found a quick solution: call frameRate(20) at setup method. Now CPU is less than 50% and no more heating / battery problems 🙂
It seems to be working fine, at least all the functionalities are ok. I'm finishing the physical assemby so not sure if it would affect other aspects of program. Don't think so.

Sandy, do you think is it a valid idea to make this option available as default in your Processing sketch? I mean allow the user to set the frameRate to adjust the CPU workload? Normally these Processing programs consume a lot of power and this is an easy way to minimize them.

Anyway, thanks guys and specially Sandy for this great project!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Issues with the controller running at 100% CPU
on: February 23, 2015, 13:46
Quote

Ah hi Cawer - welcome, and you make a really good point. Processing generally will always try and run at it's maximum frame rate. Makes perfect sense for interactive, animation stuff, but for something like the controller, I don't suppose there's much difference between 20 fps and 60 fps. It could easily be set as a property in the config file yes, but even if not, I think a sensible default limit would be a good idea (20 for instance).

Thanks for the note, and the experiment! I'll do some trials and make an announcement if it makes it into the next version of the controller.

sandy noble

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.023 seconds.