Bug 454581

Summary: ypbind rewrites unchanged binding files every 60s
Product: [Fedora] Fedora Reporter: Eric Sandeen <esandeen>
Component: ypbindAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideKeywords: Patch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-21 11:01:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 438944, 454582    
Attachments:
Description Flags
Proposed patch
none
Fixed/updated patch none

Description Eric Sandeen 2008-07-09 03:50:18 UTC
[root@inode ~]# sysctl -w vm.block_dump=1
vm.block_dump = 1
[root@inode ~]# while true; do sleep 10; date; dmesg -c | grep redhat.com &&
md5sum /var/yp/binding/redhat.com.*; done
Tue Jul  8 22:40:21 CDT 2008
Tue Jul  8 22:40:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2
Tue Jul  8 22:40:41 CDT 2008
Tue Jul  8 22:40:51 CDT 2008
Tue Jul  8 22:41:01 CDT 2008
Tue Jul  8 22:41:11 CDT 2008
Tue Jul  8 22:41:21 CDT 2008
Tue Jul  8 22:41:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2
Tue Jul  8 22:41:41 CDT 2008
Tue Jul  8 22:41:51 CDT 2008
Tue Jul  8 22:42:01 CDT 2008
Tue Jul  8 22:42:11 CDT 2008
Tue Jul  8 22:42:21 CDT 2008
Tue Jul  8 22:42:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2

....

this uses extra power and stops disks from spinning down.  Can the files be
rewritten only if changed?

Thanks,
-Eric

Comment 1 Eric Sandeen 2008-08-21 22:33:32 UTC
Created attachment 314759 [details]
Proposed patch

Without knowing much about ypbind, here's a potential patch.

It just keeps track of the last domain info that was written, and if it's unchanged since last time, it skips the writeout.

Comment 2 Eric Sandeen 2008-10-11 14:55:09 UTC
Created attachment 320097 [details]
Fixed/updated patch

The original patch was a bit hacky; Thorsten turned it into this, which he said he has upstream already.

Thanks,
-Eric