|
296 | 296 | This function takes first ten blocks of relation and tries to compress them ands returns average compress ratio.
|
297 | 297 | So if returned value is 7.8 then compressed table occupies about eight time less space than original table.
|
298 | 298 | </para>
|
299 |
| - |
| 299 | + |
| 300 | + <para> |
| 301 | + Function <varname>cfs_compression_ratio(relation)</varname> allows to check how precise was estimation of |
| 302 | + <varname>cfs_estimate(relation)</varname> function. It returns real compression ration for all segments of the compressed |
| 303 | + relation. Compression ration is total sum of virtual size of all relation segments (number of blocks multiplied by 8kb) divided |
| 304 | + by sum of physical size of the segment files. |
| 305 | + </para> |
| 306 | + |
| 307 | + <para> |
| 308 | + As it was mentioned before, CFS always appends updated blocks to the end of the compressed file. So physical size of the file |
| 309 | + can be greater than used size in this file. I.e. CFS file is fragmented and defragmentation is periodically performed by CFS |
| 310 | + garbage collector. <varname>cfs_fragmentation(relation)</varname> functions returns average fragmentation of relation files. |
| 311 | + It is calculated as rum of physical sizes of the files divided by sum of used size of the files. |
| 312 | + </para> |
| 313 | + |
| 314 | + <para> |
| 315 | + There are several functions allowing to monitors garbage collection activity: |
| 316 | + <varname>cfs_gc_activity_scanned_files</varname> returns number of files scanned by GC, |
| 317 | + <varname>cfs_gc_activity_processed_files</varname> returns number of file compacted by GC, |
| 318 | + <varname>cfs_gc_activity_processed_pages</varname> returns number of pages transferred by GC during files defragmentation, |
| 319 | + <varname>cfs_gc_activity_processed_bytes</varname> returns total size of transferred pages. |
| 320 | + All this functions calculate their values since system start. |
| 321 | + </para> |
| 322 | + |
300 | 323 | </sect1>
|
301 | 324 | </chapter>
|