Am Fr Mai 20 2011 schrieb Karl Vogel: > >> On 19/05/11 17:01, Hartmut Niemann wrote: > > H> It often takes very long time (20s) to mkdir on an ext3 drive > > What does "strace mkdir /some/directory" show? > > $ strace mkdir two execve("/bin/mkdir", ["mkdir", "two"], [/* 18 vars */]) = 0 brk(0) = 0x9342000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78c9000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=41270, ...}) = 0 mmap2(NULL, 41270, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78be000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libselinux.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0J\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=104276, ...}) = 0 mmap2(NULL, 109564, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb78a3000 mmap2(0xb78bc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18) = 0xb78bc000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320m\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1323460, ...}) = 0 mmap2(NULL, 1333608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb775d000 mmap2(0xb789d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f) = 0xb789d000 mmap2(0xb78a0000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb78a0000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/i686/cmov/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\n\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=9736, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb775c000 mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7758000 mmap2(0xb775a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb775a000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7757000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7757720, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb775a000, 4096, PROT_READ) = 0 mprotect(0xb789d000, 8192, PROT_READ) = 0 mprotect(0xb78bc000, 4096, PROT_READ) = 0 mprotect(0xb78e7000, 4096, PROT_READ) = 0 munmap(0xb78be000, 41270) = 0 statfs64("/selinux", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=9612190, f_bfree=9096430, f_bavail=8608149, f_files=2444624, f_ffree=2381459, f_fsid={-1733799056, 1466923510}, f_namelen=255, f_frsize=4096}) = 0 brk(0) = 0x9342000 brk(0x9363000) = 0x9363000 open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78c8000 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 319 read(3, "", 1024) = 0 close(3) = 0 munmap(0xb78c8000, 4096) = 0 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1527680, ...}) = 0 mmap2(NULL, 1527680, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75e2000 close(3) = 0 mkdir("two", 0777) = 0 close(1) = 0 close(2) = 0 exit_group(0) = ?
This run was fast (less than 1 second). Unfortunately I do not know when mkdir takes long and can't reproduce it today, so I can't tell whether a strace of a slow mkdir is different. Hartmut -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201105200838.42119.hartmut.niem...@gmx.de