Hello CSJ, CSJ: > However, I fount that the make time become slow when using it, > Is any suggestion that I can improve the build time? ::: > real 14m35.194s ::: > real 16m9.366s
Ok, aufs looks like having about 10% overhead. Although I don't know this is a reasonable value, aufs surely has overheads. They are - maintain XINO files - confirm there is no external change on branch fs - etc... For speed-up, there are several option you can take. But I am not sure how they are effective. - stop XINO try the aufs mount option "noxino". or you can specify "xino="/non-existing/file/on/fast/drive". Alternatively, before you run "make", you can run "find" in aufs which will write info to XINO files for the existing files. so next time you access the file, aufs just refers the XINO files without writing. - stop INOTIFY if you use "udba=notify", then try "udba=reval" or "udba=none". "udba=none" is fastest. - use libau.so for readdir(3) on a VERY large dir if you set "LD_PRELOAD=libau.so" in user-space, the the library intercepts the readdir(3) call. This is a technique for saving memory consumption mainly, but often it improves the speed performance at the same time. if your directory is not so large, it won't help. If you try profilng the kernel/filesystem behaviour in detail, we may be able to another option. Currently I think 10% overhead is reasonable. Here is the output from building linux-3.5.0 on my test system. On ext2, + make -s mrproper + make -s allnoconfig # # configuration written to .config # + time find 0.02user 0.18system 0:00.21elapsed 98%CPU (0avgtext+0avgdata 4592maxresident)k 0inputs+0outputs (0major+338minor)pagefaults 0swaps + time make -s -j2 vmlinux 96.52user 31.61system 1:07.73elapsed 189%CPU (0avgtext+0avgdata 271696maxresident)k 0inputs+0outputs (22major+5638365minor)pagefaults 0swaps On aufs, /dev/shm/rw is tmpfs and /tmp/linux is ext2 + fgrep -w aufs /proc/mounts none /dev/shm/u aufs rw,relatime,si=a5c65b17f58bb3f5 0 0 + cat /sys/fs/aufs/si_a5c65b17f58bb3f5/br0 /sys/fs/aufs/si_a5c65b17f58bb3f5/br1 /sys/fs/aufs/si_a5c65b17f58bb3f5/xi_path /dev/shm/rw=rw /tmp/linux=ro /dev/shm/rw/.aufs.xino + make -s mrproper + make -s allnoconfig # # configuration written to .config # + time find 0.02user 0.36system 0:00.39elapsed 99%CPU (0avgtext+0avgdata 4608maxresident)k 0inputs+0outputs (0major+339minor)pagefaults 0swaps + time make -s -j2 vmlinux 96.80user 44.94system 1:14.95elapsed 189%CPU (0avgtext+0avgdata 271664maxresident)k 0inputs+0outputs (0major+5639500minor)pagefaults 0swaps J. R. Okajima ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/