Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Darwin IO performance and maxvnodes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Darwin IO performance and maxvnodes



On Wednesday, August 28, 2002, at 12:02 PM, Lars Sonchocky-Helldorf wrote:

In the latest issue of the c't (german fortnightly computer magazine) they
have a comparison of an Apple Xserve 1GHz single G4 vs. a Dell PowerEdge
1650 1,4 GHz single P III, both have 256 MB of RAM. The Xserve runs Mac OS
X Server while the PowerEdge runs Red Hat 7.2. The result so far is that
the PowerEdge outperforms the Xserve on almost all tasks (except SSL
(Keepalive), here is the Xserve the winner) by about factor 2.

That's quite close to comparing Apples to Onions. Don't you think?


The interesting thing is that they have been able to improve the
performance of the Xserve by tweaking the number of the cacheable files
(vnodes). They increased the amount of the default number of 4912 for 256
MB to 15000 by using:

sysctl -w kern.maxvnodes=15000

and got a huge performance boost on that. But they also say that it might
be dangerous to play around with that value (since Apple is warning to do
so)

Where did you/they see that warning?

If you have RAM to spare you can raise this soft limit without any problems... On machines with 1.5GB RAM I have set it to 1000000 without any ill effect.

and they claim that the concept of having a static value for that
parameter is technically outdated and in the case of Linux has been
replaced with a dynamic adaption to the use of the main memory.

It's just a soft limit. It's in place to avoid all your memory being consumed by vnodes.


So, now my question: is there anything in the plans/works regarding a
dynamic caching mechanism for the Darwin kernel? Is it technically
possible to implement such a mechanism? Will it have a huge or a minor
benefit regarding IO Performance?

Thanks, Lars

If you have working sets such that you have memory to spare [no pageouts...] you can bump up the number *anytime*....

The vnodes get allocated as needed up to the softlimit. After that we recycle [LRU] the currently unused [but cached vnodes].

Currently there is no reasonable way to shrink the vnode cache. [There are subsystems who have "soft" references to vnode and that makes it quite hard to release the vnode to common allocator for garbage collection when you want the memory for something else....]

The defaults selected are suitable for client machine for kind of working sets that does not have too much free memory [run top on the system when you have bunch of apps in use and you will see what I mean]...

Using up too much space for vnodes affect the performance adversely on those systems. And it's a requirement to ship the OS to need no tuning for those configurations [the grandma rule :)]

Server configurations however are mostly managed by system administrators that are savvy in system tuning to adjust the soft limits to meet their specific needs. Hence the availability of the sysctls. [Note that there is a SystemTuning startup item that attempts to deal with the system tuning for the cases where there are no sysadmins....]


Thanks,
--Umesh
--
Umesh Vaishampayan Apple Computer, Inc.
Mac OS X Kernel Ph: (408) 974 0229
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Darwin IO performance and maxvnodes (From: "Lars Sonchocky-Helldorf" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.