Date: Sun, 2 Aug 1998 12:43:11 +0930 From: Greg Lehey <grog@lemis.com> To: Reynoldus Lamuri <rlamuri@it.ntu.edu.au>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: "find" is slow on freebsd Message-ID: <19980802124311.Y11960@freebie.lemis.com> In-Reply-To: <199808020120.KAA20774@hakea.cs.ntu.edu.au>; from Reynoldus Lamuri on Sun, Aug 02, 1998 at 10:50:43AM %2B0930 References: <199808020120.KAA20774@hakea.cs.ntu.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, 2 August 1998 at 10:50:43 +0930, Reynoldus Lamuri wrote: > Hello, > > I have two questions about freebsd. > > 1. Why is the command "time find / -name foo" slow on freebsd compared to redhat > linux? On freebsd the same command run in succession yields the same time resul > t, while on redhat its faster the first time and the second time linux uses cach > ed result. This also happens with "rm -rf *". I tested this with similar machine > s, same hard drive and cpu. Can you tell me how to speed up the find command on > freebsd? Why, is time find / -name foo" slow on FreeBSD compared to redhat Linux? I don't have any direct comparison, but I hadn't thought it was slow here. (mail mutilation corrected) > On freebsd the same command run in succession yields the same time > result, while on redhat its faster the first time and the second > time linux uses cached result. I can't confirm this. Here are some results done with three different directories on a slow old drive. $ time find picobsd >/dev/null real 0m1.854s user 0m1.014s sys 0m0.060s $ time find picobsd >/dev/null real 0m0.067s user 0m0.026s sys 0m0.030s $ time find raptor >/dev/null real 0m3.022s user 0m0.038s sys 0m0.103s $ time find raptor >/dev/null real 0m0.101s user 0m0.048s sys 0m0.045s $ time find src >/dev/null real 5m24.376s user 0m2.345s sys 0m7.942s $ time find src >/dev/null real 4m58.402s user 0m3.438s sys 0m7.542s You have mail in /var/mail/grog $ du -s picobsd raptor src 7183 picobsd 173420 raptor 1475377 src In the first two cases, the second find ran an order of magnitude faster than the first one. The third directory was so large (the du output is in kilobytes) that most of the data was flushed from buffer cache before it could be used a second time, so as expected the results are much worse. > This also happens with "rm -rf *". I tested this with similar > machines, same hard drive and cpu. Can you tell me how to speed up > the find command on freebsd? It would be interesting to see what your configuration is and how large the directories. It's possible that the Linux ext2fs does some things faster than ufs, but it should't be that obvious. We haven't taken the Linux approach because it has some nasty corners which can bite you from time to time. On the other hand, there are two ways to speed up the file system: async mounts or soft updates. The latter is still experimental, but looks like offering an optimum mix of performance and safety, while async mounts, like ext2fs, are less than 100% safe. > 2. How do I get "telnet and su" to use opie or else make skey use md5. It seems > that when i installed opie and skey telnet uses skey but skey is using md4. I wo > uld like to telnet to my system using skey with md5 or opie with md5. Sorry, I don't know opie or skey. It's usually not a good idea to "tack on" a second question, especially if you don't mention it in the subject: the people who might know the answer may give up at the first question, or never even read the message. Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980802124311.Y11960>