performance questions

Bob Arning arning at charm.net
Sat Mar 17 23:03:45 UTC 2001


Tom,

On Sat, 17 Mar 2001 14:04:24 -0800 Tom <tmb-squeak at lumo.com> wrote:
> -- I noticed that Squeak is taking up between 50-90% of the CPU
>    even when I'm doing nothing.  Is that the regular calls to the
>    Morphic "step" methods?  But even those are supposed to happen
>    only once a second.  Why does Squeak never rest?  Is there some
>    busy waiting going on there?

Squeak is supposed to be a better citizen that that, but problems have been observed on occasion. So, some questions:

- Is this 50-90% on a normal Squeak image that just started up or have you given it additional things to do? (Like starting a web server, doing something animated, etc).
- Have you run a MessageTally? (World menu/debug menu/start MessageTally; answer yes; wait 10 or 20 seconds then move the mouse to the top of the screen to get the report). Paste a copy in your reply and it might offer some clues.
- Have you turned on the preference #higherPerformance? This is for folks who *want* Squeak to use more cycles, so if you are concerned about cpu utilization, you may want to turn it off.
- From the new morph menu/demo menu get a FrameRateMorph. What does it tell you about the frame rate? That's how often Squeak cycles through looking for morphs to step (which can be much more frequent than once per second).
- You mentioned having used 2.x in addition to 3.0. Are you using the same VM for both? Which VM is that?

> -- How much of these performance issues is related to running Squeak on
>    the Linux platform?  I checked with strace and ltrace.  Sitting idly,
>    it seems to be calling "gettimeofday" a lot, check with XPending 
>    regularly, and call "sin" and "modf" quite a bit.  Expensive stuff
>    like drawing only seems to happen when something actually changes.
>    So, it looks to me like running it on Linux isn't the issue; but does
>    it actually run faster on MacOS?  Do I just need a 1GHz P4?

I think you'll find 300MHz gives decent performance once some of the issues in the previous section are resolved.

> -- Squeak seems to be non-responsive during many network and name
>    resolution operations.  Is this a shortcoming of specific 
>    applications, or are there limitations in the Squeak implementation
>    that make some network operations intrinsically blocking?
>    This is pretty important for me for writing UIs that interact with 
>    the network.

If you run a name lookup, e.g., from the main UI process, then that process is blocked until the lookup completes or times out. For that reason, doing any serious amount of network stuff is often better done from a separate Squeak process.

> -- General responsiveness in Morphic seems pretty sluggish.  I would
>    estimate that scrollbars take several hundred milliseconds to pop
>    up after a click, windows take about a second to come to the front
>    when clicked on.  Deleting a pane in the Whisker browser takes about
>    2 seconds.   (I also find it a bit confusing that while such operations
>    are in progress, there is no feedback that anything is in progress.)

That seems quite a bit slower than it should be on your machine.

> -- Plain MVC seems a lot faster; maybe I should be using it, although
>    it seems much less convenient than Morphic and seems to lack features
>    like drag-and-drop.  But is MVC by itself still usable?  Many of
>    the windows that come up in MVC seem like they are actually Morphic
>    windows.  How would I creat an MVC-only image?

Look at the 'shrinking' category of messages in SystemDictionary. There are many parts of the system that can be deleted to create a leaner image.

Cheers,
Bob





More information about the Squeak-dev mailing list