From: Casper H.S. Dik Newsgroups: comp.sys.sun.misc Subject: Re: I/O performance on big files Date: 27 Mar 2002 18:07:53 GMT Organization: Sun Microsystems, Netherlands Lines: 30 Message-ID: References: <58000997.0203270146.5473da@posting.google.com> NNTP-Posting-Host: 62-177-150-175.bbeyond.nl X-Trace: news1.xs4all.nl 1017252473 1142 62.177.150.175 (27 Mar 2002 18:07:53 G MT) X-Complaints-To: abuse@xs4all.nl NNTP-Posting-Date: 27 Mar 2002 18:07:53 GMT User-Agent: nn/6.6.2 Path: news.island.liu.se!news.Update.UU.SE!puffinus.its.uu.se!newsfeed.sunet.se !news01.sunet.se!uninett.no!feed.news.nacamar.de!newsfeed.icl.net!skynet.be!sky net.be!transit.news.xs4all.nl!not-for-mail Xref: news.island.liu.se comp.sys.sun.misc:3343 sfetouh@hotmail.com (Sally Fetouh) writes: >I wonder if anyone can help! I'm running a C program on a Solaris 8 >machine that uses sockets to receive requests from a client. Each time >a request is received, it opens a file (using fopen for append - mode >'a') writes to the file using fputs then closes the file. Initially, >when the file being written to was small, we didn't notice any >performance issues. Now I'm wondering whether the process of opening, >writing to then closing a file of say 250MB size can cause any >problems; especially when handling different client requests at the >same time. This means that each time a file is opened it's stored in >memory! Does it make a difference whether the file being written to is >3KB or 250MB? Yes; the Solaris kernel will "throttle" large writes to the filesystem and write will not return until most I/O has completed. This is broken, especially since the limits used were derived when systems had 4-16MB of memory rather than 10-100 as much. Try setting the following in /etc/system set ufs:ufs_WRITES = 0 you can do this live: # adb -wk ufs_WRITES/W0 Casper