Skip to contentSkip to conversation

Retouch plots in QQA 15.31

PATCH Applied Akira Yokosawa 2 participants 7 messages Jan 30, 2024 – Feb 3, 2024

lore
Share & tools
lore
#0 lore raw

cover Retouch plots in QQA 15.31

Hi Paul,

I'm not sure if you are already working on those figures in .png, but I'm sending updates in scripts. I'm dropping changes and additions of .eps and .png files generated by the updated scripts.

Here is a list of commands you'd need to reflect the changes in perfbook.pdf.

pushd CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/ sh plots.sh

evince coe-nvalue.eps &
evince coe.eps &
evince fre.eps &
evince rfe.eps &
display fre.png &

If those plots look reasonable to you, please copy them to the parent directory and do the "make":

    cp *.eps fre.png ../
    popd
    make

If those figures in the resulting perfbook.pdf looks good to you, I'd like you to go forward and commit the changes and additions:

git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/*.eps git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/fre.png git add CodeSamples/cpu/data/*.eps
git add CodeSamples/cpu/data/fre.png

git commit -a # with a suitable tag such as Requested-by: me

Furthermore, if you think those .png figures, now obsoleted by the new .eps figures, are not needed anymore, please "git rm" them as well.

If there is anything I've missed, please let me know.

Thanks, Akira
--
Akira Yokosawa (2):
CodeSamples/cpu/data: plots.sh: Fix typo in xlabel for fre plot CodeSamples/cpu/data: Use "smooth frequency" for plotting histogram

 .../expand.pl                                 | 42 +++++++++
 .../plots.sh                                  | 85 ++++++++++++++++++-
 2 files changed, 126 insertions(+), 1 deletion(-)
 create mode 100755 CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/expand.pl

base-commit: 9caac64bfabf85439c480ce928dddef969354369

Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 CodeSamples/cpu/data/.../plots.sh: Fix typo in xlabel for fre plot

Fix trivial typo in xlabel.

---
 .../cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/plots.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/plots.sh +1 -1
index ab2f318f..5b589858 100644
@@ -37,7 +37,7 @@ plot "coe.dat" w points pt 6 pointsize 0.2
 gnuplot << ---EOF---
 set term png
 set output "fre.png"
-set xlabel "Store-to-Load Latency (Timestamp Periods)"
+set xlabel "Load-to-Store Latency (Timestamp Periods)"
 set ylabel "Number of Samples"
 #set logscale y
 set xrange [-250:50]
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 CodeSamples/cpu/data: Use "smooth frequency" for plotting histogram

In reply to Akira Yokosawa

Add gnuplot scripts for generating EPS plots.

Use "smooth frequency" feature of gnuplot for plotting distribution histograms.

Distribution data in coe.dat, fre.dat, and rfe.dat are converted on-the-fly into single-column data by using expand.pl as a filter.

---
 .../expand.pl                                 | 42 ++++++++++
 .../plots.sh                                  | 83 +++++++++++++++++++
 2 files changed, 125 insertions(+)
 create mode 100755 CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/expand.pl
CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/expand.pl new file +42 -0
new file mode 100755
index 00000000..30719692
@@ -0,0 +1,42 @@
+#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Expand frequency data of the form:
+#
+#   1000 4
+#   1004 2
+#   1050 1
+#
+# into:
+#
+#   1000
+#   1000
+#   1000
+#   1000
+#   1004
+#   1004
+#   1050
+#
+# Copyright (C) Akira Yokosawa, 2024
+#
+# Authors: Akira Yokosawa <[email protected]>
+
+use strict;
+use warnings;
+
+my $line;
+my $freq;
+my $count;
+
+open(my $fn, '<:encoding(UTF-8)', $ARGV[0])
+    or die "Could not open file '$ARGV[0]' $!";
+
+while($line = <$fn>) {
+    if ($line =~ /(\-?[0-9]+)\s+([0-9]+)/ ) {
+	$freq = $1;
+	$count = $2;
+	for (my $i = 0; $i < $count; $i++) {
+	    print "$freq\n";
+	}
+    }
+}
CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/plots.sh +83 -0

86 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw
In reply to Akira Yokosawa
Quoted 10 lines · Akira Yokosawa

Hi Paul,

I'm not sure if you are already working on those figures in .png, but I'm sending updates in scripts. I'm dropping changes and additions of .eps and .png files generated by the updated scripts.

Here is a list of commands you'd need to reflect the changes in perfbook.pdf.

    pushd CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/

I removed this directory due to my having tweaked the data to paper over bugs in early versions of my scripts. So I focused instead on CodeSamples/cpu/data/kerneltest054.05.atn6.2024.01.22-12.28.01.

Ah, and I never did push out the commit where I removed the CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02 directory. Apologies, and it is out there now.

Quoted 1 line

sh plots.sh

This failed until I installed the groff package to get pfbtops. I of course also had to move expand.pl to this directory.

Quoted 5 lines

evince coe-nvalue.eps &
evince coe.eps &
evince fre.eps &
evince rfe.eps &
display fre.png &

I do like the vertical dashed line at x=0. I see artifacts on my screen due to pixel/plot misalignment, but increasing size makes things look good. It will be fine on paper. And the fill is good compared to the funny datapoint labels.

I adjusted coe.eps's xrange to include the entire curve in the plot.

And it does look a lot more professional than my original, so thank you for that!

Quoted 4 lines

If those plots look reasonable to you, please copy them to the parent directory and do the "make":

    cp *.eps fre.png ../

I don't understand why fre.png is needed. I am leaving it out, so perhaps I will learn the hard way. ;-)

Quoted 11 lines

popd
make

If those figures in the resulting perfbook.pdf looks good to you, I'd like you to go forward and commit the changes and additions:

git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/*.eps git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/fre.png git add CodeSamples/cpu/data/*.eps
git add CodeSamples/cpu/data/fre.png

Quoted 4 lines

git commit -a # with a suitable tag such as Requested-by: me

Furthermore, if you think those .png figures, now obsoleted by the new .eps figures, are not needed anymore, please "git rm" them as well.

Done.

I kept the old .png files where they are generated because I did not remove that part of the plots.sh file. Showing both ways of doing this is not necessarily a bad thing. ;-)

Quoted 1 line

If there is anything I've missed, please let me know.

Queued and pushed, thank you!

Thanx, Paul

Quoted 17 lines

Thanks, Akira
--
Akira Yokosawa (2):
CodeSamples/cpu/data: plots.sh: Fix typo in xlabel for fre plot CodeSamples/cpu/data: Use "smooth frequency" for plotting histogram

 .../expand.pl                                 | 42 +++++++++
 .../plots.sh                                  | 85 ++++++++++++++++++-
 2 files changed, 126 insertions(+), 1 deletion(-)
 create mode 100755 CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/expand.pl

base-commit: 9caac64bfabf85439c480ce928dddef969354369

Signature · 1 line
2.34.1
#4 lore raw
Quoted 67 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa

Hi Paul,

I'm not sure if you are already working on those figures in .png, but I'm sending updates in scripts. I'm dropping changes and additions of .eps and .png files generated by the updated scripts.

Here is a list of commands you'd need to reflect the changes in perfbook.pdf.

    pushd CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/

I removed this directory due to my having tweaked the data to paper over bugs in early versions of my scripts. So I focused instead on CodeSamples/cpu/data/kerneltest054.05.atn6.2024.01.22-12.28.01.

Ah, and I never did push out the commit where I removed the CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02 directory. Apologies, and it is out there now.

Quoted 1 line

sh plots.sh

This failed until I installed the groff package to get pfbtops. I of course also had to move expand.pl to this directory.

Quoted 5 lines

evince coe-nvalue.eps &
evince coe.eps &
evince fre.eps &
evince rfe.eps &
display fre.png &

I do like the vertical dashed line at x=0. I see artifacts on my screen due to pixel/plot misalignment, but increasing size makes things look good. It will be fine on paper. And the fill is good compared to the funny datapoint labels.

I adjusted coe.eps's xrange to include the entire curve in the plot.

And it does look a lot more professional than my original, so thank you for that!

Quoted 4 lines

If those plots look reasonable to you, please copy them to the parent directory and do the "make":

    cp *.eps fre.png ../

I don't understand why fre.png is needed. I am leaving it out, so perhaps I will learn the hard way. ;-)

Quoted 11 lines

popd
make

If those figures in the resulting perfbook.pdf looks good to you, I'd like you to go forward and commit the changes and additions:

git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/*.eps git add CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/fre.png git add CodeSamples/cpu/data/*.eps
git add CodeSamples/cpu/data/fre.png

Quoted 4 lines

git commit -a # with a suitable tag such as Requested-by: me

Furthermore, if you think those .png figures, now obsoleted by the new .eps figures, are not needed anymore, please "git rm" them as well.

Done.

Quoted 7 lines

I kept the old .png files where they are generated because I did not remove that part of the plots.sh file. Showing both ways of doing this is not necessarily a bad thing. ;-)

Quoted 1 line

If there is anything I've missed, please let me know.

Queued and pushed, thank you!

Except that github choked on the 366MB coe.out file. The gzip command compresses it to 72MB, and "tar -cJf" gets it down to 33MB, so maybe I rebase the compressed version into the commit that created that file.

And change the script that collects the data to do the compression. ;-)

Now kernel.org had no problem with the full file, but it might also be good to avoid imposing too much on their storage-space largesse...

Other thoughts?

Thanx, Paul

Quoted 17 lines
Quoted 17 lines

Thanks, Akira
--
Akira Yokosawa (2):
CodeSamples/cpu/data: plots.sh: Fix typo in xlabel for fre plot CodeSamples/cpu/data: Use "smooth frequency" for plotting histogram

 .../expand.pl                                 | 42 +++++++++
 .../plots.sh                                  | 85 ++++++++++++++++++-
 2 files changed, 126 insertions(+), 1 deletion(-)
 create mode 100755 CodeSamples/cpu/data/kerneltest009.05.atn6.2024.01.17-08.25.02/expand.pl

base-commit: 9caac64bfabf85439c480ce928dddef969354369

Signature · 1 line
2.34.1
#5 lore raw

On 2024/01/31 5:20, Paul E. McKenney wrote:
[...]

Quoted 4 lines

Except that github choked on the 366MB coe.out file. The gzip command compresses it to 72MB, and "tar -cJf" gets it down to 33MB, so maybe I rebase the compressed version into the commit that created that file.

Quote from github's file size limit at:
https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits

GitHub limits the size of files allowed in repositories. If you attempt to add or update a file that is larger than 50 MiB, you will receive a warning from Git. The changes will still successfully push to your repository, but you can consider removing the commit to minimize performance impact. For more information, see "Removing files from a repository's history."

...

GitHub blocks files larger than 100 MiB.

You hit the github's limit.

Quoted 7 lines

And change the script that collects the data to do the compression. ;-)

Now kernel.org had no problem with the full file, but it might also be good to avoid imposing too much on their storage-space largesse...

Other thoughts?

Well, no. Using xz compression looks reasonable to me.

By the way, you added the following in the answer to QQA 15.31:

Alert readers may have noticed that the distribution shown in Figure E.10 is monomodal, which those in Figure E.12 and Figure E.14 are trimodal.

In coe.png, whose bin_width is 2 I think, I see a spike around time period = [38, 40]. Count of time period 40 is 140 and the largest count in coe.dat.

Attached coe.png is the histogram version of the same plot. The spike is more evident there.

This spike causes slight but significant enough bump in the right shoulder of Figure E.10 whose bin_width is 40. You can still say the distribution is monomodal, but I just wanted to make sure.

Or I can replace the EPS plot with the one with bin_width=2, if you prefer.

Thanks, Akira

#6 lore raw
Quoted 24 lines · Akira Yokosawa

On 2024/01/31 5:20, Paul E. McKenney wrote:
[...]

Quoted 4 lines

Except that github choked on the 366MB coe.out file. The gzip command compresses it to 72MB, and "tar -cJf" gets it down to 33MB, so maybe I rebase the compressed version into the commit that created that file.

Quote from github's file size limit at:
https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits

GitHub limits the size of files allowed in repositories. If you attempt to add or update a file that is larger than 50 MiB, you will receive a warning from Git. The changes will still successfully push to your repository, but you can consider removing the commit to minimize performance impact. For more information, see "Removing files from a repository's history."

...

GitHub blocks files larger than 100 MiB.

You hit the github's limit.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines

And change the script that collects the data to do the compression. ;-)

Now kernel.org had no problem with the full file, but it might also be good to avoid imposing too much on their storage-space largesse...

Other thoughts?

Well, no. Using xz compression looks reasonable to me.

I will need to figure something else out if I ever get access to a system with (say) 500 CPUs. If nothing else, split it into one compressed file per CPU. I am sure that github will love that. ;-)

Quoted 13 lines

By the way, you added the following in the answer to QQA 15.31:

Alert readers may have noticed that the distribution shown in Figure E.10 is monomodal, which those in Figure E.12 and Figure E.14 are trimodal.

In coe.png, whose bin_width is 2 I think, I see a spike around time period = [38, 40]. Count of time period 40 is 140 and the largest count in coe.dat.

Attached coe.png is the histogram version of the same plot. The spike is more evident there.

Quoted 7 lines

This spike causes slight but significant enough bump in the right shoulder of Figure E.10 whose bin_width is 40. You can still say the distribution is monomodal, but I just wanted to make sure.

Or I can replace the EPS plot with the one with bin_width=2, if you prefer.

Thank you for checking, and please do replace that plot. I will then reword that text to say something like "almost monomodal" and "emphatically trimodal".

Thanx, Paul