performance questions

Ned Konz ned at bike-nomad.com
Sat Mar 17 22:36:58 UTC 2001


On Saturday 17 March 2001 14:04, Tom wrote:

> I'm running Squeak 3.0 on a Linux RH7 system (I had similar experiences
> with 2.x).  I checked the FAQ, but it doesn't seem to answer a number
> of questions I have about performance.  My machine is 300MHz PII with
> 256M of RAM.  Not the fastest, but not exactly slow either.  I did
> experiment with various Preferences settings and I turned off flaps,
> but none of that seemed to make much of a difference.

Which VM are you using? The 3.0pre2 is (I think) the latest.

>  -- 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?

World Menu/debug/ start/browse Message Tally
wait a while, move your mouse up to the top of the screen. You should be 
spending most of your time waiting on a Delay in WorldState>>interCyclePause:

>  -- 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?

Squeak typically uses less than 6% of a 500 MHz Celeron on my system, just 
sitting around in Morphic. 

In MVC, it uses 94% of a cpu sitting around in a MVC project with no windows 
up. Once I open two browser windows, though, it goes down to 25%.

If you have a lot of Morphs that are stepping actively, it's going to eat 
more CPU.

>  -- 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.

This is a shortcoming of specific applications; they could be doing this 
stuff in another thread.

>  -- 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.)

This may be related to the CPU usage in your system. I've noticed Morphic 
getting sluggish from time to time.

Try this: hit Alt-. (alt-period). Abandon the requesters that come up. Does 
this make Morphic any faster?

>  -- 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?

By removing a number of tools. There is a "Major Shrink" script that makes a 
very minimal MVC system, but it lacks most of the tools.

>  -- Is there some window I can create that shows me what is going
>     on inside the VM (processes running, memory used, garbage collection
>     in progress, network connections, etc.)?

World Menu/debug/open Process Browser
World Menu/help/VM statistics

You can quickly examine open sockets using something primitive like:

Socket allSubInstancesDo: [ :sock |
		sock isValid ifTrue: [
				Transcript print: sock localAddress; space;
				print: sock localPort; space;
				print: sock remoteAddress; space;
				print: sock remotePort; space;
				print: sock statusString; cr.
		]
			].
Transcript flush.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list