From owner-freebsd-questions Mon Mar 27 21:21: 8 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.rdc1.va.home.com (ha1.rdc1.va.home.com [24.2.32.66]) by hub.freebsd.org (Postfix) with ESMTP id 8C0DB37B51F for ; Mon, 27 Mar 2000 21:20:57 -0800 (PST) (envelope-from jgowdy@home.com) Received: from cx443070a ([24.4.93.90]) by mail.rdc1.va.home.com (InterMail v4.01.01.00 201-229-111) with SMTP id <20000328052051.VGUG12441.mail.rdc1.va.home.com@cx443070a>; Mon, 27 Mar 2000 21:20:51 -0800 Message-ID: <001301bf9876$af471f60$0100000a@vista1.sdca.home.com> From: "Jeremiah Gowdy" To: "Doug Barton" Cc: References: Subject: Re: Transmit Buffer Date: Mon, 27 Mar 2000 21:30:09 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > The point is, I know what type of load my machine is going to have, > > and how much resources it has, and I want to be able to decide how much of X > > resource is used for Y task. > > You need to get out of the windows mindset. :) Before you decide > that you know better than the system how to allocate resources, do some > serious analysis on what the real usage patterns are (not what you think > they are) and how the system is actually allocating resources. For > instance, FreeBSD will continue to allocate disk cache as long as there is > free memory available, and it starts to swap unused bits of system (and > other) code out when it starts to run out of free memory. Effective disk > caching is the _last_ thing you need to worry about on a FreeBSD system. > > "But I want to control it anyway!" Ok, knock yourself out. The > knobs are there, tweak to your heart's content. But don't expect people to > "help" you do it, since the effort has already gone into the system to > make it the best it can be, and the developers have other things to keep > them busy. :) 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. Then after that search fails to find what I'm looking for, I do another find command on the /usr tree. I have about 180 megs of memory completely free according to top, and yet still I hear it heavily read the hard drive to read that directory structure. 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, 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'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, and to see if maybe I was the one missing something. I'm by no means ranting that FreeBSD's caching is terrible, and that I'm dissatisfied with it, I was just looking for an alternative to having nearly 200 megs of memory free while my hard drive produces the same directory tree twice in a row :/ I have enabled soft updates, which lead to a _major_ improvement in the beat down that my disk was taking before. If softupdates can be such a savior and performance improver, prehaps there are other possibilities which could also be of use. I'm simply trying to draw other's conjecture and opinions, in case I was missing some obvious option. Knowing my luck there would be some setting in rc.conf that I missed that says DiskCache=8120 and I would be sitting there with 180 megs free going "Damn, my hard drive is taking a beat down !". In any case, my opinion is this. There's never a one size fits all. You can make the best algorithm for determining the size of disk cache you possibly can, and it's not going to fit *every* situation. Therefore, I would suggest that the default engine be used, _unless_ the admin feels they have a better idea. It can't hurt to try it, and if the admin's selection for disk cache isn't faster/more efficient, one could always turn it back. I don't see how a "just use what's there" attitude is relevent to the situation. BTW, I was just thinking, 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. Therefore, we aren't getting the more general disk caching that Win9x/DOS uses. This is just my opinion/guess after monitoring the behavior of programs run, and the size of the cache as they start, run, and exit. If I'm wrong I beg your pardon. But if I'm right, prehaps another scheme could be considered. I'm just hoping we're all open minded here, and comfortable if some nobody comes up and shouts out that the emperor is naked or something. I'm not even saying that the emperor is naked, simply that he could probably do a little better with a different outfit. I'm sure the project wouldn't be where it is today if people simply accepted the current state as the best that could be done. I used to consider myself to be a very talented C programmer, and I still do as compared to the rest of the students at my college, but I'm amazed by the size and complexity of some of the projects that are worked on here. I'm very interested in seeing what I can do to help improve things, because I've started to move alot of my machines to FreeBSD, hence I have an interest in how well it performs. Hopefully, someday I'll be good enough to help out on a development level on this kind of project. I've done a small amount of work on the FreeDOS project (because DOS programming is where I started, it's all so easy and familiar). Although I'm hoping to become an professional programmer someday, I'd still like to be able to contribute to projects such as these. The only problem I have with *nix programming is the environment. I have TurboC++ for DOS, Visual C++ 6.0 for Win32, Borland Builder 5.0 for Win32, etc. I'm used to programming in some kind of MDI style GUI. Is there something like this for unix ? Something in X maybe ? The Unix APIs don't seem that difficult (can't be harder than Win32 API), it's simply the environment that keeps me from really getting comfortable coding in unix. Any information greatly appriciated, and sorry about the totally huge post. Next time I'll write a novel and mail it. :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message