| OCR Text |
Show 74 Total Percentage Tota l Bytes Elapsed Time of Time Number o f Storage per Operation (sec. (min.)) Paging T irne Paging Page Faults (byte•) Tile INSERT . .. PLANE 179 (3) 38 21% 1 , 072 4 , 342 , 268 25 6 UPDATE-TX-TY 62 (1) 40 65% 2 , 714 308 0 CREATE-PORTS 651 (11) 161 (3) 25% 5 , 762 19,717, 964 1,162 CONNECT ... PORTS 717 (12) 429 (7) 60% 25 , 759 5 , 769 , 224 340 DRAW-COMPLETELY 507 (9) 433 (7) 85% 25,524 7 , 540 0 Total 2 , 116 (35) 1,101 (18) 52% 60 , 831 29,837,304 1 , 758 Table 3: Loading ATQ Profiled breaks associated with ports are extremely costly in terms of both time and space, mostly because there are so many of them, but also because they are too big. Ignoring the con-stant overhead of invariant instance variable values, the memory required to store a flavor instance is one word (4 bytes) of header plus one word for each instance variable. Since ports have 24 instance variables, each instance uses 100 bytes of storage, making ports much too portly! Indeed, in overall storage usage, the profligacy of INSTED is truly embarrassing. Storage inefficiency has a direct impact on time inefficiency, because of the effect of paging. 19 million bytes at 1K bytes per page equals 19 thousand pages! That is assum-ing that port instances are packed tightly on pages, which in fact is not the case. The decision to put a lot of redundant information in ports was frankly bad. The expected time for space tradeoff backfires, since this wanton use of space results in inordinate amounts of time being consumed swapping pages in and out of main memory. Immediate solutions to the paging problem: • Make objects smaller by eliminating redundant instance variables. • Use fewer objects and fewer large data structures. • Use the garbage collector to improve locality of reference. |