Date: Sun, 17 Sep 2017 16:30:31 +0000 From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: [Bug 222356] www/firefox: file-backed shared memory performance Message-ID: <bug-222356-21738-1nMJt0lO7E@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-222356-21738@https.bugs.freebsd.org/bugzilla/> References: <bug-222356-21738@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356 --- Comment #4 from Tijl Coosemans <tijl@FreeBSD.org> --- (In reply to Konstantin Belousov from comment #3) It's UFS with softupdates and journaling. This test program is more like what Firefox does. It opens and unlinks a f= ile, sets the size with ftruncate and uses mmap. There's no disk I/O that I can notice except for the final close which causes a lot of I/O. If you put mu= nmap last the I/O happens on that call. The bigger the file the longer it takes= .=20 Surely this isn't all metadata? #include <sys/mman.h> #include <fcntl.h> #include <stdio.h> #include <string.h> #include <unistd.h> int main( void ) { int fd; size_t sz; void *base; sz =3D 128 * 1024 * 1024; fd =3D open( "nosync.data", O_RDWR | O_CREAT, 0600 ); unlink( "nosync.data" ); ftruncate( fd, sz ); base =3D mmap( NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NOSYNC, fd, 0 ); puts( "calling memset" ); memset( base, '0', sz ); puts( "memset called" ); sleep( 5 ); puts( "calling munmap" ); munmap( base, sz ); puts( "munmap called" ); sleep( 5 ); puts( "calling close" ); close( fd ); puts( "close called" ); sleep( 5 ); return( 0 ); } I didn't really investigate the problem with your patch. I could build Fir= efox fine and then suddenly gmake couldn't find some targets that were clearly defined in the Makefile. Rerunning the make command a couple times always = gave this same error. Rebooting with the old kernel fixed it. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222356-21738-1nMJt0lO7E>