Bug 525724

Summary: scomes doesn't count read/written data on tmpfs
Product: [Fedora] Fedora Reporter: Petr Lautrbach <plautrba>
Component: tunedAssignee: Petr Lautrbach <plautrba>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jhutar, mmaslano, pknirsch, plautrba
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: 2009-10-16 14:58:35 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:
Attachments:
Description Flags
0001-Add-statistic-for-cached-reads-writes.patch none

Description Petr Lautrbach 2009-09-25 12:22:18 UTC
Description of problem:
scomes doesn't count read/written data on tmpfs


Version-Release number of selected component (if applicable):
tuned-utils-0.2.4-2.fc12.noarch

How reproducible:
1. mount tmpfs on /tmp
2. $ cd /dir/on/regular/disk
3. $ cat load-disk-tmpfs.sh 
#!/bin/sh                  

dd if=/dev/urandom of=/tmp/data bs=1024 count=1024
dd if=/tmp/data of=/dev/null bs=1024 count=1024   

4. $ scomes  -c ./load-disk-tmpfs.sh 2
...
Read/Written bytes: 12654/0 (12654)
...

5. $  cat load-disk.sh
#!/bin/sh

dd if=/dev/urandom of=data bs=1024 count=1024
dd if=data of=/dev/null bs=1024 count=1024

6. $ scomes  -c ./load-disk.sh 2
...
Read/Written bytes: 1061215/1048576 (2109791)
...


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:
"scomes  -c ./load-disk.sh 0" should show same numbers as "scomes  -c ./load-disk-tmpfs.sh 0"

Additional info:

Comment 1 Jan Hutař 2009-09-25 13:10:36 UTC
Created attachment 362671 [details]
0001-Add-statistic-for-cached-reads-writes.patch

# /.../scomes -c "dd if=/dev/urandom of=/tmp/aaa bs=1024 count=1024" 0
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.185725 s, 5.6 MB/s
Collecting data...
... for pid 6606 - stapio
-----------------------------------
LAST RESULTS:
-----------------------------------
Monitored process: 6606 ()
Number of syscalls: 2142
Kernel/Userspace ticks: 185/1 (186)
Read/Written bytes (from/to device): 6132/1048576 (1054708)
Read/Written bytes (from/to cache): 1048576/89 (1048665)
Transmitted/Recived bytes: 0/0 (0)
Pooling syscalls: 0
SCORE: 10547267
-----------------------------------
QUITTING
-----------------------------------
# /.../scomes -c "dd if=/dev/urandom of=/dev/null bs=1024 count=1024" 0
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.174941 s, 6.0 MB/s
Collecting data...
... for pid 6622 - stapio
-----------------------------------
LAST RESULTS:
-----------------------------------
Monitored process: 6622 ()
Number of syscalls: 2142
Kernel/Userspace ticks: 174/0 (174)
Read/Written bytes (from/to device): 6132/0 (6132)
Read/Written bytes (from/to cache): 1048576/1048665 (2097241)
Transmitted/Recived bytes: 0/0 (0)
Pooling syscalls: 0
SCORE: 61494
-----------------------------------
QUITTING
-----------------------------------

Comment 2 Jan Hutař 2009-09-29 07:53:07 UTC
Was not able to find anything useful. What about changing the labels to:

  Read/Written bytes (from/to device): ...
- Read/Written bytes (from/to cache): ...
+ Read/Written bytes (from/to N/A device): ...

Not perfect, but could be described in some doc.