Database Management for Smalltalk

Forum
Garbage Tips



Current User: Guest
  • This forum allows Guest Users to post
  • Guests may not subscribe to email notifications
  • This forum allows for Member Registration
  • Registered Members can subscribe to email notifications
  • Registered Members can upload personal avatars
Login Register
Search 
Search Forums:


 
Current Forum
All Forums
Match Any Word
Match All Words
Match Phrase

UserPost

4:49 pm
Monday, 14 April 2008

John Clapperton

Admin

posts 13

Garbage Tips

 
‘Garbage’, in an object-oriented database system, means objects which have become unreachable and are to be removed to reclaim storage space. The garbage collector (’GC’) in VOSS is a ‘Baker’ design, similar in concept to the garbage collector in Smalltalk-80, and which can be run in foreground and/or background modes of which more later.

Unlike the mark-sweep design, which truly is a ‘garbage collector’, the Baker design would be better characterised as a ‘good object preserver’ which copies all reachable objects within a virtual space back and forth from one ’semi-space’ to another, deleting everything left behind on each flip. This has consequences for database design, administration, and the choice of GC settings, to tune for maximum transaction throughput and minimum time offline.

Know which space your objects are in.

In a database design using multiple virtual spaces, the most important thing to know is that when the VOSS GC flips it preserves only those objects in a virtual space which are (indirectly) reachable from the rootDictionary of that virtual space or from the image in which the GC is then running (in the case of uncommitted new objects). In other words, any object in virtual space ‘A’ which is referenced only by an object in virtual space ‘B’, though it will behave normally whilst present, will not be preserved when the GC flips virtual space ‘A’. Or in other words again, reference(s) from object(s) in another virtual space alone are not sufficient to preserve an object from the GC of the virtual space in which it exists. In its systematic copying, the GC does not follow references to objects outside the virtual space which it is scanning.

This situation must be avoided, as after such a flip, those objects would become instances of VOUndefinedObject, and later magically become some arbitrary new object when the id number of that apparently garbage object in space ‘A’ was re-allocated to a new object, having spent some days, weeks or months on space ‘A’s free id list.

The simplest way to keep this right is always to use one of the explicit variants of the message to virtualize an object, preferably on creation, which specify the location explicitly, for example:

  myObject := MyClass newVirtualIn: aVOManager.

The non-specific variants, for example:

  myObject := MyClass newVirtual.

virtualize the new instance in the current virtual space of the current process, i.e. the virtual space which hosts the last object to have received a message in the current process.

Why use multiple virtual spaces?

One reason for distributing a database across multiple virtual spaces may be that some parts of the database are static, whilst others are volatile - subject to frequent update and new object creation - and in this case unnecessary GC processing can be avoided by suitable partitioning of the database, so that the more static virtual space is GC’d less frequently, if at all.

Foreground or Background Garbage Collection?

Foreground GC scans and saves a specified number of reachable objects as an addendum to  each transaction commit, before that transaction’s changes are physically written to disk, to minimise disk activity. The effect, to the user, is that each transaction commit takes longer than it otherwise would, depending on the number of objects it is set to scan.

Background GC runs as one or more separate background process(es), effectively as a dummy user(s) committing null transactions, which each do some GC, as above. Within each image, background GC process(es) (though there is no sensible reason to have more than one in each image) commit their invisible dummy transactions once every user-specified time delay - by default 3000 milliseconds - and scan the user-specified number of objects each time.

The advantage of background GC is that it utilises the time in between application transaction commits, the disadvantage is that it causes more disk flushing activity than foreground GC.

Foreground GC is indicated if the application consists mainly of frequent transactions which are a short time n the preparation before commit (i.e. whilst the application has control); background GC is indicated if transactions are less frequent and/or a long time in the preparation, especially open-ended interactive transactions, when background GC can go on whilst the user is thinking.
Read original blog post


Reply to Post


Reply to Topic: Garbage Tips

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 7 + 3        (Required)

Topic Reply:


 



About the VOSS 3.1 forum

Currently Online:

4 Guests

Maximum Online: 20

Forums:

Groups: 2

Forums: 8

Topics: 17

Posts: 19

Members:

There are 2 members

There are 1 guests

John Clapperton has made 13 posts

Top Posters:

Thomas Holzer - 1


Simple Forum - Version 2.1 (Build 237)

Simple Forum WordPress Plugin created by Andy Staines: Yellow Swordfish

Forum Skin/Icons: theme229compatible / default

Default 'Silk' Icon Set created by Mark James: fam fam fam

Math Spam Protection based on code by Michael Woehrer: Software Guide

Tabbed Admin uses Tabifier by Patrick Fitzgerald: BarelyFitz Designs


My thanks to all the people who have aided, abetted, suggested and helped test this plugin



 
cancer treatment effects of celexa buy proscar real levitra online online cialis no prescription buy cialis where luvox cr cialis online without prescription rx-viagra chewable cialis buy levitra onlines cialis 10 online allegra effects of high blood pressure buy alpha lipoic acid phentermine no perscription medician for heart attacks chlamydia medication dosage alternative cholesterol treatment buy lasuna natural constipation remedies nitroglycerin sublingual site viagra treatment of heart attacks seroquel for depression buy cialis how to boost immune system healthy pets cialis alcohol buy canada levitra scabies medicine cheapest cialis price buy pain medicine on-line immune system support products cats hairball low prices pain meds alcoholism treatment option new treatment for depression buy tribulus discount vitamin vitamin a natural arthritis cures chlamydia antibiotics viagra prescription lisinopril 10mg celecoxib medicine ultram buy discount cialis famvir dose buspar viagra online usa herbal antifungal and antibacterial buy viagra hypnosis to stop smoking buy discount cialis depakote 250mg buy lipothin viagra to buy how to take a beta-blocker buy cialis without prescription diazepam 10 mg what causes hair loss in women buy cheap cialis without a prescription cheap cialis tadalafil generic viagra on line menopause treatment zantac medication dog tooth infection cialis 30 effexor dose buy glucosamine sulfate metoprolol dose diet hoodia gum side effects levitra cialis on line stomach parasites viagra online cheap breast increasing oils buy paxil online online cheap viagra buy buy viagra order viagra cialis 5 aspirin medicine at home acne treatment canada cialis generic buy mycelex treatment of stroke order viagra plus zyprexa 5mg buy diazepam approved cialis fda itching relief viagra online usa hair loss treatment online information on levitra immune system supplement how to buy viagra beta blocker uses adhd treatment buy online viagra buy cialis online in usa adhd in women cats inflammatory bowel disease cialis viagra valtrex dosage cheap breast augmentation buy cialis online with a prescription prescription ibuprofen healthy women's vitamins dog site health treatment for lung cancer cialis without a prescription cialis 5mg cheap order viagra online discount viagra online order celebrex hypnotherapy for health synthroid doses hypothyroidism medication discount cialis online cialis 50mg help for infertility top ten acne products buy pain killers reducing cholesterol naturally viagra tablet dosage zoloft viagra cialis cialis comparison online stores hair loss products medications ativan lowering blood pressure naturally fluconazole cialis 20 mg buy augmentin buy cialis online cold flu menopause gum online pharmacy viagra buy cymbalta fluconazole capsule jelly kamagra brand viagra online cialis prescription online cialis without rx irritable bowel syndrome cures zestril medication cheapest online cialis buy celebrex online buy viagra on line