Messages in this thread |  | | Date | Mon, 24 May 1999 10:18:09 +0200 (CEST) | | From | Mikulas Patocka <> | | Subject | Re: Long `rm` times. |
| |
> > Try rebooting and then deleting the file. I did so and it took around > > 30seconds to delete a 1GB file..... if I delete it IMMEDIATELY after > > creating it (including "sync") it takes (as youve shown) around 5 seconds or > > so. > > Is the "file" in the root directory? > > Maybe this delay is just ext2 running around updating > all of the superblock backups or something (WAG) ???
I guess it's because of stupid design of ext2 indirect blocks. Indirect blocks are scattered over that 1G. Imagine how long it would take to read 4M of non-contignuous blocks in 1G file. When you delete it immediatelly, it's probably still in buffers.
It would be much better to have pairs (position,length) instead of list of all blocks. This would - speed up bmap - save disk space - speed up delete & truncate
Mikulas
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |