- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 2-second delays in fsync/msync/munmap
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 02:53 AM
тАО10-14-2003 02:53 AM
I'm running our proprietary DBMS on an HP-UX 11.0 and occasionally observe very large elapsed times for my fsync, msync, and munmap calls. When writing to a VxFS or RAID device, they are always near a multiple of 2 seconds (HFS also gives me occasionally large times, but not in multiples of 2 seconds, possibly .5 seconds, but not as obvious). I was able to reduce the problem somewhat with one test variation of our software by avoiding mixing of real I/O and writes to the correspondnog mmap'd pages of the file. However, another variation of our code doesn't use mmap (or msync or munmap) at all - just regular writes and fsync - and has the same problem (e.g. in one test where an index file has many (>100) areas modified, the fsync takes 14-24 seconds).
I've tried to find patches or ITRC posts that describe this problem and haven't found a clear match. We've loaded several patches that sounded close, but they haven't solved it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 03:12 AM
тАО10-14-2003 03:12 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 03:21 AM
тАО10-14-2003 03:21 AM
Re: 2-second delays in fsync/msync/munmap
One thing that occurs to me is that you may be running extremely large buffer caches; 11.0 tends to degrade in terms of perfomance when buffer cache exceeds about 800MB. You really need to use Glance to see what the system is doing when these delays occur.
One more thing to try: Recreate you vxfs filesystems with a larger logsize -- that may be the logjam.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 03:33 AM
тАО10-14-2003 03:33 AM
Re: 2-second delays in fsync/msync/munmap
dbc_max_pct = 60% (min = 5%)
From various posts, it sounded like around 300M was a good size for a fixed buffer cache size, so I figured 60% would be OK(?).
We haven't tried directIO on the mount. It's currently configured with delaylog and nodatainlog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 03:45 AM
тАО10-14-2003 03:45 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 06:42 AM
тАО10-14-2003 06:42 AM
Re: 2-second delays in fsync/msync/munmap
I also tried a bufpages of 75 (by accident) and this actually helped quite a bit (i.e. the times were around where I'd expect (30 sec) vs. 200). Since our application test does 10 fsyncs each of all the modified files, it may be that we don't really need that much buffer cache?
BTW, the machine has 4GB of real memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 07:15 AM
тАО10-14-2003 07:15 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 07:31 AM
тАО10-14-2003 07:31 AM
Re: 2-second delays in fsync/msync/munmap
It appears that timeslice has been set to 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 07:35 AM
тАО10-14-2003 07:35 AM
Re: 2-second delays in fsync/msync/munmap
.
log,largefiles,mincache=direct,convosync=direct
.
on your "DBMS" filesystems? Say, is this DBMS homegrown? By any chance is it Ingress or PostGress?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2003 07:36 AM
тАО10-14-2003 07:36 AM
Re: 2-second delays in fsync/msync/munmap
Set that timeslice back to 10 ASAP.
Having it at 1 could (probably would) be killing this system.
And as Clay has mentioned ~300MB buffer space should be OK.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2003 12:57 AM
тАО10-15-2003 12:57 AM
Re: 2-second delays in fsync/msync/munmap
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2003 02:38 AM
тАО10-15-2003 02:38 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2003 05:11 AM
тАО10-15-2003 05:11 AM
Re: 2-second delays in fsync/msync/munmap
You could also compile with -p and -g and profile the code to see where this guy is really spending its time.
vnode_cd_hash_locks and vnode_hash_locks are at 2048 while the default is 128. These are related to spinlocks and it is very unusual to set these to other than default values.
I would also return scsi_max_qdepth to 8 -- simply because this parameter is i/o related.
The other thing that I note is the you have fs_async enabled while your application clearly wants synchronous i/o.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2003 10:22 AM
тАО10-16-2003 10:22 AM
Re: 2-second delays in fsync/msync/munmap
FYI, I put some debug code in the SW and find that - for the msync/munmap version of the SW - the 2-second delay happens periodically (e.g. often about every 110th or 140th msync, and more than half of the munmaps).
I got a trial license for glance and it tells me that I'm waiting on VM over 90-95% of the time (and no I/O wait). Seems a bit high.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2003 08:23 AM
тАО10-17-2003 08:23 AM
Re: 2-second delays in fsync/msync/munmap
FYI, for the fsync version, the waits were around 50% for both IO and System.
More info on the msync/munmap version:
There is a distinct pattern of 2-second msync delays. In each COMMIT where the delay appears, it's frequently about the same "n-th" msync on the file (e.g. 18th-22nd out of usually 22-30 total, 1st-4th out of around 170) in the 2 tests I looked at. It also seems interesting that there is only ever ONE appearance of the delay in each commit (which syncs all modified pages), even if a different test does many more (and bigger) msyncs.
There were a less-frequent bunch of fairly consistent "anomalies" where the 2-second delay actually appeared to be split (i.e. total of times was ~2s) between an msync on one file and a couple msyncs later on another file or (less frequently or consistent/certain) 2 adjacent msyncs on the same file.
BTW, some of the msyncs cover more than one contiguous region of modified pages (if this matters).
...and the munmaps generally exhibited the delay about every other call.
In the fsync version, the delay usually occurs every time, and was around 2 or 4 seconds for one test and 14-40 seconds (but always around a multiple of 2) for a larger test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2003 08:34 AM
тАО10-17-2003 08:34 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2003 08:37 AM
тАО10-17-2003 08:37 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2003 08:47 AM
тАО10-17-2003 08:47 AM
Re: 2-second delays in fsync/msync/munmap
The "Logical Volume Detail" screen (1-sec interval) shows the Writes/sec regularly spiking to around 1500 Writes/sec with Write kb/sec values showing around 4-8KB per write. Is this normal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2003 01:13 PM
тАО10-17-2003 01:13 PM
Re: 2-second delays in fsync/msync/munmap
swapinfo -tm
and to see how fast paging (swapping) is going, use vmstat, looking at the po column. Sinle digits are fine, 2 digits marginal, 3 or more digits means that your system is only useful about 10-20% of the time, The rest of the time is wasted getting processes in and out of memory. Add 2Gb or 3Gb to your system and set the maximum buffer cache size to about 400-600 megs.
If you really want to see what is happening on the system, get a copy of Glance installed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 03:08 AM
тАО10-20-2003 03:08 AM
Re: 2-second delays in fsync/msync/munmap
I have obtained a trial license for Glance. Are there some specific metrics I haven't already reported that you'd like to see?
As far as paging:
With the fsync version of the software, the po column shows 0.
With the mmap/msync version of the software, the po can get into the triple digits, but this would be expected for mmap usage, yes?
The buffer cache is currently set to 5-15%.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 07:02 AM
тАО10-20-2003 07:02 AM
Re: 2-second delays in fsync/msync/munmap
I suggest that you download and read this paper (I actually remembered a reference to a problem similar to yours):
http://docs.hp.com/hpux/onlinedocs/os/11.0/tuningwp.html#know
Look under the "Points of Interest" section. There is a topic which deals with some strange behavior dealing with memory-mapped files. The "workaround" which you have already accidently discovered is to reduce buffer cache. I would set bufpages to 16384 (64MB) and see if the situation improves.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 08:43 AM
тАО10-20-2003 08:43 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 09:18 AM
тАО10-20-2003 09:18 AM
Re: 2-second delays in fsync/msync/munmap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 09:39 AM
тАО10-20-2003 09:39 AM
Re: 2-second delays in fsync/msync/munmap
If you have not installed a recent SupportPlus patchset then that is certainly the place to start. There have been a large number of VxFS, I/O, mmap, NFS, and SCSI patches released and a number of them are related to problems in your area. In HP-UX, far more problems are caused by not patching regularly than are avoided by not patching at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2003 10:52 AM
тАО10-20-2003 10:52 AM