- Your table is to wide that can be fit in on page's text area
- as possible solutions enabling split text in the second column into multi lines
- also will help use smaller font and reduce size of the
\tabcolsep
:
\documentclass[10pt,twoside,openright,english,italian]{book}
\usepackage{geometry} % added
\usepackage{siunitx}
\usepackage{booktabs, multirow,
tabularx} % added
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\NewExpandableDocumentCommand\mcc{O{1}m}{\multicolumn{#1}{c}{#2}}
\begin{document}
\begin{table}[ht]
\centering
\setlength\tabcolsep{3pt}
\small
\begin{tabularx}{\linewidth}{@{}
l L
S[table-format=2.2]
S[table-format=1.2]
S[table-format=2.2]
S[table-format=1.2]
%
S[table-format=3.3]
S[table-format=3.0]
S[table-format=1.3]
@{}}
\toprule
\textbf{Program}
& \textbf{Problem Size}
& \mcc[4]{\textbf{Instructions (Billions)}}
& \mcc[3]{\textbf{Synchronization Primitives}} \\
\cmidrule(lr){3-6} \cmidrule(lr){7-9}
& & {\textbf{Total}}
& {\textbf{FLOPS}}
& {\textbf{Reads}}
& {\textbf{Writes}}
& {\textbf{Locks}}
& {\textbf{Barriers}}
& {\textbf{Conditions}} \\
\midrule
\texttt{blackscholes} & 65,536 options & 2.67 & 1.14 & 0.68 & 0.19 & 0 & 8 & 0 \\
\texttt{freqmine} & 990,000 transactions & 33.45 & 0.00 & 11.31 & 5.24 & 990,025 & 0 & 0 \\
\texttt{swaptions} & 64 swaptions, 20,000 simulations & 14.11 & 2.62 & 5.08 & 1.16 & 23 & 0 & 0 \\
\texttt{bodytrack} & 4 frames, 4,000 particles & 14.03 & 4.22 & 3.63 & 0.95 & 114,621 & 619 & 2,042 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
addendum:
small variation where for X
column is used \renewcommand\tabularxcolumn[1]{m{#1}}
and enlarge table stretch:
\documentclass[10pt,twoside,openright,english,italian]{book}
\usepackage{geometry}
\usepackage{siunitx}
\usepackage{booktabs, multirow, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\NewExpandableDocumentCommand\mcc{O{1}m}{\multicolumn{#1}{c}{#2}}
\begin{document}
\begin{table}[ht]
\centering
\setlength\tabcolsep{3pt}
\renewcommand\arraystretch{1.2}
\renewcommand\tabularxcolumn[1]{m{#1}}
\small
\begin{tabularx}{\linewidth}{@{}
l L
S[table-format=2.2]
S[table-format=1.2]
S[table-format=2.2]
S[table-format=1.2]
%
S[table-format=3.3]
S[table-format=3.0]
S[table-format=1.3]
@{}}
\toprule
\textbf{Program}
& \textbf{Problem Size}
& \mcc[4]{\textbf{Instructions (Billions)}}
& \mcc[3]{\textbf{Synchronization Primitives}} \\
\cmidrule(lr){3-6} \cmidrule(lr){7-9}
& & {\textbf{Total}}
& {\textbf{FLOPS}}
& {\textbf{Reads}}
& {\textbf{Writes}}
& {\textbf{Locks}}
& {\textbf{Barriers}}
& {\textbf{Conditions}} \\
\midrule
\texttt{blackscholes} & 65,536 options & 2.67 & 1.14 & 0.68 & 0.19 & 0 & 8 & 0 \\
\texttt{freqmine} & 990,000 transactions & 33.45 & 0.00 & 11.31 & 5.24 & 990,025 & 0 & 0 \\
\texttt{swaptions} & 64 swaptions, \newline
20,000 simulations & 14.11 & 2.62 & 5.08 & 1.16 & 23 & 0 & 0 \\
\texttt{bodytrack} & 4 frames, \newline
4,000 particles & 14.03 & 4.22 & 3.63 & 0.95 & 114,621 & 619 & 2,042 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}