O que é esse arquivo: .readahead no meu diretório raiz?

2

Quando faço:

ls -a /

no Fedora 21 existe um arquivo oculto chamado:

.readahead e 104092k

O que é esse arquivo? .... é suposto estar lá?

Encontrei isso no google:

chamada do sistema readahead no wiki .

Trecho:

readahead is a system call of the Linux kernel that loads a file's contents into the page cache, providing that way a file prefetching technology. When a file is subsequently accessed, its contents are read from the main memory (RAM) rather than from a hard disk drive (HDD), resulting in much lower file access latencies due to much higher performance of the main memory.

Mais sobre a chamada do sistema readahead do homem :

Trecho:

readahead() initiates readahead on a file so that subsequent reads from that file will be satisfied from the cache, and not block on disk I/O (assuming the readahead was initiated early enough and that other activity on the system did not in the meantime flush pages from the cache).

O único sucesso deste arquivo em particular foi esta lista de discussão:

link

Trecho:

Indeed those files appear to be misplaced, the .config directory look like a leftover from the installation.. and the .readahead file appears to be written at boot time, dunno what writes it, monitoring it with "audit" may yield some clues.

File a bug report.

    
por somethingSomething 26.04.2015 / 17:08

1 resposta

1

Agradecemos a @don_crissti pelo link: systemd-readahead-replay.service .html , aqui está o que este arquivo faz.

Trecho:

systemd-readahead-collect.service is a service that collects disk usage patterns at boot time. systemd-readahead-replay.service is a service that replays this access data collected at the subsequent boot. Since disks tend to be magnitudes slower than RAM, this is intended to improve boot speeds by pre-loading early at boot all data on disk that is known to be read for the complete boot process.

systemd-readahead-done.service is executed a short while after boot completed and signals systemd-readahead-collect.service to end data collection. On this signal, this service will then sort the collected disk accesses and store information about them in /.readahead.

Normally, both systemd-readahead-collect.service and systemd-readahead-replay.service are activated at boot so that access patterns from the preceding boot are replayed and new data collected for the subsequent boot. However, on read-only media where the collected data cannot be stored, it might be a good idea to disable systemd-readahead-collect.service.

On rotating media, when replaying disk accesses at early boot, systemd-readahead-replay.service will order read requests by their location on disk. On non-rotating media, they will be ordered by their original access timestamp. If the file system supports it, systemd-readahead-collect.service will also defragment and rearrange files on disk to optimize subsequent boot times.

    
por 26.04.2015 / 17:31