On ??, 2009-10-23 at 14:55 +0200, Jan Damborsky wrote:
> Jan Setje-Eilers wrote:
> > Alexander Eremin wrote:
> >> On ??, 2009-10-22 at 10:56 +0200, Jan Damborsky wrote:
> >>> Hi Alex,
> >>>
> >>> since Sparc uses dcfs(7FS) "Compression file system" module
> >>> to decompress files on-the-fly when data are being read, my
> >>> understanding
> >>> is that all pieces necessary to bring up the system to the point when
> >>> dcfs(7FS) can do its job must remain uncompressed
> >>>
> >>> I am not sure what the critical pieces are - CC-in Jan S. who
> >>> might correct me or provide more details on this topic.
> >>>
> >>> That said, I am thinking how much space we actually save in this case
> >>> (Sparc OpenSolaris installer boot archive) - '/usr' is separated
> >>> in compressed archive solaris.zlib and kernel along with drivers
> >>> is uncompressed.
> >>>
> >>> If it turns out it is not significant, I think we might also consider
> >>> not to use dcfs at all, since there are also disadvantages - we are
> >>> seeing weird bugs filed from time to time against Sparc - they
> >>> are caused by the limitations of dcfs - compressed file can't be
> >>> updated. This is why 'fiocompress' attribute in Distro Constructor
> >>> Sparc manifest exists - files marked with this attribute are left
> >>> uncompressed.
> >>>
> >>> Thank you,
> >>> Jan
> >>
> >> I've prepared some Sparc iso's using root_archive for creating miniroot,
> >> they work good, but I?m agree about updating question. For DC it seems
> >> that only small part of bootroot is fiocompressed - /sbin,/usr and /libs
> >> and probably using dcfs for miniroot compression is not optimal it this
> >> case, other method is required.
> >
> >  I agree that the win may not be worth the trade-offs when /usr is 
> > compressed in another way.
> 
> Thanks, Jan !
> 
> 
> Alex,
> 
> I tried a quick test and created uncompressed Sparc boot archive
> from the compressed one:
> 
> # mkdir /tmp/br /tmp/br1
> # mount -o nologging 
> /export/home/ai/images/1003s-ai-12200-125/boot/boot_archive /tmp/br/
> # /usr/sbin/mkfile 170m /boot_archive_nofiocompress
> # /usr/sbin/lofiadm -a /boot_archive_nofiocompress
> /dev/lofi/2
> # /usr/sbin/newfs /dev/lofi/2
> # /usr/sbin/mount -o nologging /dev/lofi/2 /tmp/br1/
> # rsync -av /tmp/br/ /tmp/br1/
> ...
> # umount /tmp/br1
> # lofiadm -d /dev/lofi/2
> # mount -o nologging /boot_archive_nofiocompress /tmp/br1
> 
> Original compressed archive:
> # df -h /tmp/br/
> Filesystem            Size  Used Avail Use% Mounted on
> /export/home/ai/images/1003s-ai-12200-125/boot/boot_archive
>                       152M  121M   32M  80% /tmp/br
> 
> Uncompressed archive:
> # df -h /tmp/br1/
> Filesystem            Size  Used Avail Use% Mounted on
> /boot_archive_nofiocompress
>                       160M  151M     0 100% /tmp/br1
> 
> 
> So the difference is ~30MB with respect to 'Used' space.
> Comparing total size, the difference could be even smaller,
> since there is ~32MB of free space in current compressed.
> 
> As Karen pointed out, 10% of free space is the value we
> should calculate with which would be ~15MB.
> 
> Based on this, I am thinking if we could completely omit
> Sparc archive compression step and remove it from DC.
> 
> pros:
> * faster generation of Sparc AI image
> * simplified build procedure
> * simplified manifest (no need for list of 'fiocompress=false' files)
> * no need to worry about issues coming from dsfs(7FS) limitations
> 
> cons:
> * bigger Sparc boot archive => bigger AI image (~15MB estimated difference)
> 
> Thank you,
> Jan

Hi Jan, Karen,
Yes, I think that it's necessary to abandon the dcfs, may be 
implementing compression to the entire miniroot as done for the x86 for
fast booting.. 
Nevertheless I tested calculation methods and looks like my test is ok.
I used snv125 ai manifest and then I also increased and decreased
the size of bootroot.
First of all need to know all size of uncompressed 
dirs - this is /kernel
and /platform:                                                          
                                                                                
                              
kernel_size = (dir_size(BR_BUILD + "/kernel")) /
1024                                                               
                                                        
platform_size = (dir_size(BR_BUILD + "/platform")) /
1024                                                             

nocompress_size =  kernel_size +
platform_size                                                

Then calculate size of fiocompressed dirs 
(and /2, because they will be compressed and these dirs has 
permanent size for various pkg lists): 
fio_size = ((dir_size(BR_BUILD) / 1024) - nocompress_size) /
2                                                             

                                                   
Finally:                                                                        
                                      
sparc_overhead = 1.2
for fio_size also small overhead = 1.1
sparc_bootroot_size = int(round((((fio_size * 1.1) + nocompress_size) *
sparc_overhead) + (padding * 1024)))
      
For snv125 ai boot_archive I have 10% free space, increasing 
and decreasing bootroot this number does not change. May be this
calculation looks strange 
but it works ;)

-- 
Regards,
Alex

Reply via email to