We are working on Android-S
and saw that each CI user uses nearly 385 GB of space on there local
FS, when doing a "repo init " and repo Sync" operation. we wanted to
optimize the storage and the network speed and as per the man pages we
observed that this can be achieved using the --reference command.
As per the documentation:
The --reference option can be used to point to a directory that has the content of a
--mirror sync. This will make the working directory use as much data as possible from the
local reference directory when fetching from the server. This will make the sync go a lot
faster by reducing data traffic on the network.
We followed the steps and created the first reference copy and saw that the initial space occupied was close to 385 GB.
first user now did a repo init and repo sync and we saw the total time
for this activity was only 23 minutes but it also reduced the size
considerably to 63 GB.
The second user now did a repo init and repo sync and we saw the
total time for this activity was only 23 minutes and it also reduced the
size to 63 GB.
do see the network performance improvement but wondering how the actual
size moved from 385 GB to 63 GB and what is actually there in the 63 GB
and what is the real concept behind the reference option WRT the space
leads or documentation around it is really helpful on how the space is
getting crunched and if this can also lead to any issues during the
build and any precautions to be taken during this command operation.