Disk cache tuning

2009-07-21 Thread Eugene L. Vorokov
Hello guys,
 
I have an amd64 server with 8 cpu cores and 16Gb of memory, with FreeBSD
7.2. It is used as a corporate CVS server with several huge repositories 
(about 2Gb each), which consist of thousands of rather small files. I need
to tune the system so that it caches as much files as possible and minimizes
physical access to the disk. Of course, I did enable softupdates, but I have
an impression that more things can be tuned.

Specifically, I have read in many places that FreeBSD uses all available
memory for disk cache, because disk buffers are integrated with vm pager.
However, when I do cvs checkout to the same disk where the repository
resides and watch memory usage (by top or systat), repeating that several
times to activate the cache, I notice that for 2Gb repository system
hardly uses more than 1Gb of memory (including inactive) even after 3-4
checkouts of the same repository, and disk is still used a lot. Why this
happens ? How can I tell the system to use as much memory for caching as
possible ?
 
I also notice that the buffer cache expires pretty fast: the first
checkout takes 2 minutes, if I do checkout again immediately, it takes 1.5
minutes, but if I do it again after waiting a minute, it takes 2 minutes
again, even though the machine was completely inactive while I was
waiting. Why the cache expires at all when there is a lot of free memory ?
Can I somehow tell the system to keep everything cached until something is
modified or some process needs memory ?
 
Thank you in advance, please Cc: me as I'm not on this list. If there is
more appropriate list for my questions, please point me to one.

Regards,
Eugene
 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk cache tuning

2009-07-21 Thread Ivan Voras

Eugene L. Vorokov wrote:

Hello guys,
 
I have an amd64 server with 8 cpu cores and 16Gb of memory, with FreeBSD
7.2. It is used as a corporate CVS server with several huge repositories 
(about 2Gb each), which consist of thousands of rather small files. I need


With lots of files you need to tune vfs.ufs.dirhash_maxmem very high.
Other than that it is not obvious what could be the problem - you need 
to gather more information about your system. For example, try running 
systat -vm in the middle of a checkout and report its output.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


disk cache tuning

2005-06-17 Thread Eugene L. Vorokov
Hello.

I have a box with FreeBSD 5.4, where disk subsystem is a bottleneck.
It runs several applications which access huge number of files, usually small.
They do not require a lot of memory, network I/O is also not very intensive.

I have read tuning(7), enabled softupdates, noatime and such. But I have an
impression that most of the memory (1Gb) is not really used, while it could be
used for disk cache. top(1) reports about 800Mb as inactive, and
reading 200-300Mb
of information from disk still causes a lot of disk activity.

How can I increase the amount of memory used for disk cache without touching
other subsystems ? As far as I understand, simply increasing MAXUSERS is not
a good idea, because it will also increase NMBCLUSTERS and such, which I do
not really want.

Please Cc: me as I'm not on this list.

Regards,
Eugene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]