Hi there, is there any way to monitor the VM's gargabe collection? When I run my Smalltlalk program under AIX (instead of Windows) it takes about 60 times longer to make its calculations. I already tried tuning the memory by changing some of the command line parameters mentioned here: http://www.instantiations.com/docs/FAQ/wwhelp/wwhimpl/js/html/wwhelp.htm#href=va03001.html Unfortunately, I could not achieve a significant better performance. The program fetches data from the database and writes into it. My assumption is that the VM is busy with garbage collection because a lot of new objects are created. Is there any way to get some output to see when and how much gargabe collection is performed? Thanks. Best regards, Shanna You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
This is not the detail you ask for, but it may prove your theory. We periodically output some statistics via:
reportGcStatsOn: aStream | a | a := EsbTimer vmStats. a isNil ifFalse: [ aStream tab; nextPutAll: 'numberOfScavenges'; tab; nextPutAll: a numberOfScavenges printString; cr; tab; nextPutAll: 'numberOfGlobalGCs'; tab; nextPutAll: a numberOfGlobalGCs printString; cr; tab; nextPutAll: 'millisecondScavengeTime'; tab; nextPutAll: a millisecondScavengeTime printString; cr; tab; nextPutAll: 'millisecondGlobalGCTime'; tab; nextPutAll: a millisecondGlobalGCTime printString]
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by shanna.bastkowski
What do you mean with "database" ? Maybe the database connection is the bottleneck, have you checked the timings of the fetch and write operations? Norbert You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Among the "usual suspects" : dynamic SQL via ODBC ?
Maybe there's (still) a cache on VA side (beside the one on db). I remember a switch between DB2 and SQL Server : after setting the sql cache on VA side ... ... performances boost up. Then we de-dynamic-ize the SQL queries ('WHERE' clauses were expanded in query text : introduced '?' parameters and pre-preparing queries). Just my 2 Euro cents. Ciao, Davide On 18/09/2018 09:55, Norbert Schlemmer
wrote:
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Wayne Johnston
Hi Wayne, perfect, I'll try to do that. Thanks! On Monday, September 17, 2018 at 6:21:47 PM UTC+2, Wayne Johnston wrote: This is not the detail you ask for, but it may prove your theory. We periodically output some statistics via: You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Noschvie
Hi Norbert, I am using DB2. I do not think that this is the bottleneck though since the same code runs under Windows, using the same DB2, much faster. This is why I assumed that the bad performance must be somehow OS-dependent. On Tuesday, September 18, 2018 at 9:55:26 AM UTC+2, Norbert Schlemmer wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Davide Grandi-2
Hi Davide, I don't have much experience in databases (nor Smalltalk :D) and am using the build-in database parts in order to fetch data (DB2). Can you give a hint how to set the SQL cache?? Thanks. On Tuesday, September 18, 2018 at 10:12:37 AM UTC+2, Davide Grandi wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
How many fetch and write operations are done ? Just to get a feeling for the dimension.
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by shanna.bastkowski
The default abt.ini ?
Back to home I could find the original edit. (you could, of course, follow the execution of a SQL SELECT in order to catch that cache, if still esxists but it may be a lengthy work). Best regards, Davide Grandi On 18/09/2018 12:20,
[hidden email] wrote:
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Found in a veeeeeery old VA doc.
-- VisualAge keeps the last 10 database queries in a cache. This means that queries after the first query should process faster. To improve performance further, you can increase the number of queries that are cached by changing the PreparedStatementCacheSize value in the ABT.INI file. -- May be it still apply, maybe not. Sorry ... Best regards, Davide Grandi On 18/09/2018 16:53, Davide Grandi
wrote:
The default abt.ini ? -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
This trick was still in 9.0 :
-- www.instantiations.com/docs/90/db/dbdfqr.html -- Good luck, Davide Grandi On 18/09/2018 17:06, Davide Grandi wrote: > Found in a veeeeeery old VA doc. > -- > VisualAge keeps the last 10 database queries > in a cache. This means that queries after the > first query should process faster. To improve > performance further, you can increase the > number of queries that are cached by > changing the PreparedStatementCacheSize > value in the ABT.INI file. > -- > > May be it still apply, maybe not. Sorry ... > > Best regards, > > Davide Grandi > > On 18/09/2018 16:53, Davide Grandi wrote: >> The default abt.ini ? >> Back to home I could find the original edit. >> (you could, of course, follow the execution of a SQL SELECT in order >> to catch that cache, if still esxists >> but it may be a lengthy work). >> >> Best regards, >> >> Davide Grandi >> >> On 18/09/2018 12:20, [hidden email] wrote: >>> Hi Davide, >>> >>> I don't have much experience in databases (nor Smalltalk :D) and am >>> using the build-in database parts in order to fetch data (DB2). >>> Can you give a hint how to set the SQL cache?? >>> Thanks. >>> >>> On Tuesday, September 18, 2018 at 10:12:37 AM UTC+2, Davide Grandi wrote: >>> >>> Among the "usual suspects" : dynamic SQL via ODBC ? >>> Maybe there's (still) a cache on VA side (beside the one on db). >>> >>> I remember a switch between DB2 and SQL Server : after setting >>> the sql cache on VA side ... >>> ... performances boost up. >>> Then we de-dynamic-ize the SQL queries ('WHERE' clauses were >>> expanded in query text : introduced '?' parameters and >>> pre-preparing queries). >>> >>> Just my 2 Euro cents. >>> >>> Ciao, >>> >>> Davide >>> >>> On 18/09/2018 09:55, Norbert Schlemmer wrote: >>>> What do you mean with "database" ? Maybe the database connection >>>> is the bottleneck, have you checked the timings of the fetch and >>>> write operations? >>>> Norbert >>>> -- >>> >>> You received this message because you are subscribed to the Google >>> Groups "VA Smalltalk" group. >>> To unsubscribe from this group and stop receiving emails from it, >>> send an email to [hidden email] >>> <mailto:[hidden email]>. >>> To post to this group, send email to [hidden email] >>> <mailto:[hidden email]>. >>> Visit this group at https://groups.google.com/group/va-smalltalk. >>> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by shanna.bastkowski
Thanks for your replies. After further analyzing by evaluating the execution time of specific blocks and placing more log messages in the code I could find the the line of code which takes too long.
This line takes about 770ms to execute. It is placed in a loop which runs 262 times, so it takes about 200ms to run. This loop runs 11 times and therefore takes about 37 minutes. This loops runs twice at the two places where the program did not seem to do anything. In the methods isValidAt: and isValidFor: simple comparisons like anAbtTimestamp >= anotherAbtTimestamp are made. It does not fetch or write any data, nor is creating a lot of new objects. The method isValidAt: takes about 10ms to execute and will run 77 times since the array has 77 entries (fits to the 770ms from the detect-block). Even if I found the place which causes the performance issue and I could probably rewrite it in a more efficient way I still have no clue why the exact same code runs MUCH faster under Windows. Any ideas? You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Shanna,
-- Just a guess off the top of my head, maybe there is some optimization on Windows like inlining going on that isn't AIX. If that is the case, I'm not sure what you can do about it. Lou On Wednesday, September 19, 2018 at 12:06:38 PM UTC-4, [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Davide Grandi-2
Ciao Davide, after solving the performance problems by rewriting the critital area I found another performance leak.
Do you know under which heading I have to configure PreparedStatementCacheSize in abt.ini? On Tuesday, September 18, 2018 at 5:09:32 PM UTC+2, Davide Grandi wrote: This trick was still in 9.0 : You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Shanna DB2 supports transactions, and you have a single transaction for each insert operation. But you can use one transaction for all your insert operations. https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/intro/src/tpc/db2z_commitandrollbackoftransactions.html use #executeQuery for each insert operation and #commitTransaction at the end after the loop Norbert You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Norbert, thank you, this helps a lot! On Tuesday, September 25, 2018 at 11:18:14 AM UTC+2, Norbert Schlemmer wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |