Ondrej Dubaj <odu...@redhat.com> ha escrit: > Hello, > I would like to ask about behaviour of tar when extracting millions of > symlink.
When extracting a symlink to absolute file name or to a filename in a parent directory, tar first creates a placeholder (a regular file of zero length) in its place and records the fact in a list of such "delayed links". The placeholder is replaced with the actual link when it becomes certain that it cannot be used for placing other file to the absolute location unbeknownst to the user. Quite often this becomes certain only at the end of extraction. The delayed list link is kept in the memory, and that's the reason for the excessive memory usage you observe. > Is it expected behaviour? Yes, it is expected behaviour. > Is there a way that the memory can be freed also during extraction in case > it is not needed anymore? Delayed link creation is disabled if the -P (--absolute-names) option is used. Regards, Sergey