From owner-freebsd-hackers@freebsd.org Mon Jan 13 13:42:32 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FAE92242C4 for ; Mon, 13 Jan 2020 13:42:32 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47xFBv5ywxz4Vbf; Mon, 13 Jan 2020 13:42:31 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id 00DDgQmW004478 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Jan 2020 14:42:26 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1578922947; bh=d7H7xuKZGd053XdDD4/BKOAusDawQ5fwbcmYsOa3hNo=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=i2cSBDk5m932dHEnJZ/J3M59ysMo//Ufcy/HxDAGlv6OGxmxlJuolA6mXOyt98/nG 9CBLCj1UrUUEhI/M5ucz881zkxLKRQu5tcrpaRadeuDd6LQ4KOUKMnEitm6DGaYBxh GR6QKvfAt8J2rBn32p38ThBXQXyn4ha25mAOHgww= Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id 00DDgQVR004475; Mon, 13 Jan 2020 14:42:26 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Date: Mon, 13 Jan 2020 14:42:26 +0100 (CET) From: Wojciech Puchar To: Conrad Meyer cc: Wojciech Puchar , "freebsd-hackers@freebsd.org" Subject: Re: adding some smartness in file cache In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 47xFBv5ywxz4Vbf X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jan 2020 13:42:32 -0000 > Consider modifying your linear scan programs to use posix_fadvise(2) > POSIX_FADV_DONTNEED and/or POSIX_FADV_NOREUSE. or simply use DIRECTIO. But it is not about my own program to be written but general use - like copying large file, downloads/uploads over FTP or SMB or NFS. i am talking about doing it automatically when having large linear reads > > You're right that we could be a bit more clever than straight LRU for > eviction (if we are not already), such as incorporating some hybrid > scoring using MRU/LFU/RR-like eviction policies. Your proposal is an > extremely specific MRU heuristic. > > On Sun, Jan 12, 2020 at 4:21 AM Wojciech Puchar wrote: >> >> FreeBSD uses unified cache which is generally great but have some >> disadventages. >> >> One common is case of linear reading or writing of large files. >> This wipes out other things from memory very quickly. >> >> Can cache be made to drop every full block (MAXPHYS) from cache instantly >> after is fully read by user program or is wrote to disk. >> >> This way memory would be much better utilized in caching small I/O. >> >> >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > >