VA Server Smalltalk 5.5.2 hiccups

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

VA Server Smalltalk 5.5.2 hiccups

Postby ykc666 » Mon Jun 25, 2007 6:45 pm

We are having a new problem (described below) with our app running as application server in VA 5.5.2 which was not there for the last 4 years. I am not sure if it is related to all the patches we are applying to the windows 2000 server. If any of the smalltalk guru's can help us out or point to where we can find help, we really appreciate your help

Thanks in advance,
ykc

Problem:
While running some scripts, the application hangs for 10-15 seconds and becomes unresponsive too often. Not sure if it is doing garbage collection during that time, but this problem was not there for the last 4 years. Below is a sample code that illustrates this problem. I run the parsing script on a collection of xml strings and you can see that times when it hangs randomly for the same set of input xml strings.

|count|
count := 0.
XmlResults do:[:eXml |
|time|
time := Time millisecondsToRun:[IdXMLReader parseDocumentInString: eXml].
count := count+1.
Transcript cr; show: count printString, ') Parsing Time:', time printString].


First Run:
1) Parsing Time:281
2) Parsing Time:468
3) Parsing Time:516
4) Parsing Time:547
5) Parsing Time:172
6) Parsing Time:500
7) Parsing Time:672
8) Parsing Time:10328
9) Parsing Time:312
10) Parsing Time:187
11) Parsing Time:313
12) Parsing Time:187
13) Parsing Time:188

Second Run:
1) Parsing Time:203
2) Parsing Time:422
3) Parsing Time:484
4) Parsing Time:10547
5) Parsing Time:156
6) Parsing Time:484
7) Parsing Time:547
8) Parsing Time:266
9) Parsing Time:296
10) Parsing Time:204
11) Parsing Time:296
12) Parsing Time:10125
13) Parsing Time:188

Third Run:
1) Parsing Time:203
2) Parsing Time:406
3) Parsing Time:469
4) Parsing Time:500
5) Parsing Time:157
6) Parsing Time:468
7) Parsing Time:10469
8) Parsing Time:266
9) Parsing Time:312
10) Parsing Time:188
11) Parsing Time:297
12) Parsing Time:172
13) Parsing Time:203
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am

Re: VA Server Smalltalk 5.5.2 hiccups

Postby marten » Mon Jun 25, 2007 9:27 pm

Does Smalltalk really runs during the bad numbers ? Or are other processes cosuming the CPU time ????
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: VA Server Smalltalk 5.5.2 hiccups

Postby ykc666 » Tue Jun 26, 2007 5:56 am

Our production server is a dedicated server just for the smalltalk app. I don't believe there are other apps other than OS running on this box. The server app is preloaded with data and runs around 1.5GB memory footprint on a 4GB box

marten wrote:Does Smalltalk really runs during the bad numbers ? Or are other processes cosuming the CPU time ????
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am

Postby wembley » Tue Jun 26, 2007 6:04 am

What values do you specify for memory allocation when you start the image -- for example, -mo on the commandline or oldSpaceSize= in the .INI file?
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby ykc666 » Tue Jun 26, 2007 9:23 am

mo = 16000000 (16mb)

Should we increase this size?

wembley wrote:What values do you specify for memory allocation when you start the image -- for example, -mo on the commandline or oldSpaceSize= in the .INI file?
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am

Postby wembley » Tue Jun 26, 2007 9:34 am

I suspect that you are running into garbage collection. Garbage collection on a 1.5GB image is not going to be fast :(

Try specifying -mo a bit larger than your steady state image size (for example, 1.6GB: -mo 1600000000) and see if it helps. What you want to do is keep garbage collection from happening by giving the image enough room to allocate all its objects at steady state.

Note that you may need to rebase some of the VAST and Windows DLLs (see the MSDN documentation for EDITBIN) in order to get this much memory).
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby ykc666 » Tue Jun 26, 2007 9:40 am

Thanks for you reply. I will try this and see if this makes a difference. The settings didn't change for the last 4 years and the image size was always around 1.5 GB. I was just curious why the garbage collection is acting weird this last 2 months. Did any of the patches on the windows 2000 server replace any core windows libraries that were working fine with VAST 5.5.2 VM before the patches?

wembley wrote:I suspect that you are running into garbage collection. Garbage collection on a 1.5GB image is not going to be fast :(

Try specifying -mo a bit larger than your steady state image size (for example, 1.6GB: -mo 1600000000) and see if it helps. What you want to do is keep garbage collection from happening by giving the image enough room to allocate all its objects at steady state.

Note that you may need to rebase some of the VAST and Windows DLLs (see the MSDN documentation for EDITBIN) in order to get this much memory).
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am

Postby wembley » Tue Jun 26, 2007 9:47 am

It's certainly possible that Windows released a replacement DLL with a different base address -- this could be due to any number of reasons. This may have resulted in Smalltalk having difficulty allocating additional memory and so driving Smalltalk to do GC more often. Of course, this is all just speculation based on very little concrete information.

If my speculation is correct, then you will need to rebase some DLLs to free up sufficient continguous memory for allocation.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby ykc666 » Tue Jun 26, 2007 9:52 am

Could you tell me more about "rebase some DLLs ". I am not familiar with this process. Are these windows DLL's or VAST DLL's?

wembley wrote:It's certainly possible that Windows released a replacement DLL with a different base address -- this could be due to any number of reasons. This may have resulted in Smalltalk having difficulty allocating additional memory and so driving Smalltalk to do GC more often. Of course, this is all just speculation based on very little concrete information.

If my speculation is correct, then you will need to rebase some DLLs to free up sufficient continguous memory for allocation.
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am

Postby wembley » Tue Jun 26, 2007 11:17 am

The following is a simplified discussion that overlooks some of the subtleties of memory allocation on Windows, but is sufficiently correct for our purposes.

DLLs are typically loaded from low memory to high memory while heap space is allocated from high memory to low memory. However, DLLs can have a load address specified when they are linked and they will be loaded at that address if it isn't already allocated.

As heap space is being allocated, the allocation address will eventually bump into a DLL -- oops, no more memory! But there may be memory holes between DLLs which could be used to satisfy the allocation IF they were continguous with the rest of the free memory.

So, the trick is to use a tool like ProcessExplorer (download from Microsoft) to see the layout of DLLs in memory. Then use EDITBIN (download from Microsoft) to pack the DLL space by moving the "rogue" DLLs to lower memory.

The "rogue" DLLs can be Windows, VAST, or other program's DLLs. With VA Smalltalk 7.5.1 we linked many (but not all) of our DLLs so they occupy contiguous memory. With VA Smalltalk 7.5.2 all the VA Smalltalk DLLs will be packed together to maximize available heap space.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby ykc666 » Tue Jun 26, 2007 1:18 pm

Will try this. Thanks for the information

wembley wrote:The following is a simplified discussion that overlooks some of the subtleties of memory allocation on Windows, but is sufficiently correct for our purposes.

DLLs are typically loaded from low memory to high memory while heap space is allocated from high memory to low memory. However, DLLs can have a load address specified when they are linked and they will be loaded at that address if it isn't already allocated.

As heap space is being allocated, the allocation address will eventually bump into a DLL -- oops, no more memory! But there may be memory holes between DLLs which could be used to satisfy the allocation IF they were continguous with the rest of the free memory.

So, the trick is to use a tool like ProcessExplorer (download from Microsoft) to see the layout of DLLs in memory. Then use EDITBIN (download from Microsoft) to pack the DLL space by moving the "rogue" DLLs to lower memory.

The "rogue" DLLs can be Windows, VAST, or other program's DLLs. With VA Smalltalk 7.5.1 we linked many (but not all) of our DLLs so they occupy contiguous memory. With VA Smalltalk 7.5.2 all the VA Smalltalk DLLs will be packed together to maximize available heap space.
ykc666
 
Posts: 6
Joined: Mon Jun 25, 2007 7:34 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest