Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2000 21:59:10 -0800
From:      Doug Barton <Doug@gorean.org>
To:        Jeremiah Gowdy <jgowdy@home.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Transmit Buffer
Message-ID:  <38E04A2E.A47E0E59@gorean.org>
References:  <Pine.BSF.4.21.0003271744000.29390-100000@dt051n0b.san.rr.com> <001301bf9876$af471f60$0100000a@vista1.sdca.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
	You seem sincere, and you seem like you're really trying, so I'll give
you the benefit of the doubt. Please believe me when I repeat, "You need
to get out of the windows mindset." :)  Unix is not just windows with a
different interface. It's a TOTALLY different way of doing things. See
below for a few details.

Jeremiah Gowdy wrote:

> Well, basically, the way I'm seeing it is this.  I've got 288 megs of memory
> in my box as of today.  Because I'm still trying to find my butt in the dark
> with both hands sometimes I'm freebsd, I do a find . /usr -name
> *something* -print. 

	Ok, here is where we start to learn us some Eunichs! You don't want to
do that. :)  You want to get friendly with a command called locate. What
this command does is read from a database of the disk's directory
structure and tell you where stuff is. It has many advantages, not the
least of which is blinding speed. If locate complains about the size of
the database being too small, run 'periodic weekly' as root. If that
doesn't work (and I'm talking worst case scenario) take a look at 
/etc/periodic/weekly/310.locate and work through the commands in that
file till you figure out what the problem is. The man pages are your
friend. :)

> What I compare that
> to is this, both in windows, using the Find File dialog, and in DOS, with
> SmartDrv loaded, using dir /s /b, the entire directory structure would have
> been long since loaded into cache,

	Ok, now it's time to learn a little about windows. :) The first time
you run find file it actually creates the same type of directory
structure database that the locate.updatedb command does. That's why
subsequent searches are so fast. It has the information in the db, not
cached in memory. 

> saving alot of time for many applications
> finding their files.  I would think that if one has the available memory,
> one should have enough caching so that the hard drive isn't abused more that
> it has to be. 

	It already does this, just not in the way you think it does. The disk
cache algorithm DOES cache frequently used files. You'll notice this the
_second_ time you use locate, and all/most of the db is in cache. Same
goes for things like man pages, etc. 

> It's not a matter of control, and I don't see how you can say
> it's the best it can be and that everyone is too busy working on other
> things to improve this issue.  I'm simply trying to give some constructive
> criticism, 

	Don't take this the wrong way, but you're pretty far from constructive
criticism at this point. You don't know enough about the system or how
it works to criticize it. 

> and to see if maybe I was the one missing something. 

	And here is where I'm giving you the benefit of the doubt. 

> I've looked at the
> cache as I was running certain applications with top.  It seems to me that
> the operating system caches files that *processes* have open.  It doesn't
> seem to cache general areas of the disk that are hit by alot of processes,
> like the directory tree itself.  It seems as though the caching for a
> particular area of disk is dropped, once the process using that area (files)
> exits. 

	None of the things you describe in this section are the way things
actually work, which is why I said you really need to dig into the
details a little more, using tools more sophisticated than top. Start
with the *stat's, like vmstat and iostat, and start patrolling around
the associated man pages. 

	I would suggest that you do some reading on what unix is and how it
works. Start with "Essential System Administration" from O'Reilly, and
then head in the direction that interests you. Before during and after
that I'd highly recommend reading the entire FreeBSD Handbook and FAQ.
They will go a long way towards redirecting your energy in healthier
directions. 

Good luck,

Doug
-- 
    "So, the cows were part of a dream that dreamed itself into
existence? Is that possible?" asked the student incredulously.
    The master simply replied, "Mu."


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?38E04A2E.A47E0E59>