From: John Darrington Date: Sun, 27 Jul 2008 00:47:06 +0000 (+0800) Subject: Changed the default WORKSPACE value to 64MB. X-Git-Tag: v0.7.0~7 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee7be3e962a4faba54d7bc01364365b51167242c;p=pspp-builds.git Changed the default WORKSPACE value to 64MB. Corrected documentation of WORKSPACE. When --testing-mode is set, workspace can now be arbitrarily low. --- diff --git a/doc/utilities.texi b/doc/utilities.texi index 314c435e..35ea20e2 100644 --- a/doc/utilities.texi +++ b/doc/utilities.texi @@ -334,6 +334,7 @@ SET /MXERRS=max_errs /MXWARNS=max_warnings /PROMPT='prompt' + /WORKSPACE=workspace_size (program execution) /MEXPAND=@{ON,OFF@} @@ -390,7 +391,6 @@ SET /SCRIPTTAB='c' /TB1=@{'xxx','xxxxxxxxxxx'@} /TBFONTS='string' - /WORKSPACE=workspace_size /XSORT=@{YES,NO@} @end display @@ -554,6 +554,17 @@ RANDOM, which will obtain an initial seed from the current time of day. @item UNDEFINED Currently not used. + +@item WORKSPACE +The maximum amount of memory that PSPP will use to store data being processed. +If memory in excess of the workspace size is required, then PSPP will start +to use temporary files to store the data. +Setting a higher value will, in general, mean procedures will run faster, +but may cause other applications to run slower. +On platforms without virtual memory management, setting a very large workspace +may cause PSPP to abort. +@cindex workspace +@cindex memory, amount used to store cases @end table Data output subcommands affect the format of output data. These diff --git a/src/data/settings.c b/src/data/settings.c index 5b791dc2..a87e3eff 100644 --- a/src/data/settings.c +++ b/src/data/settings.c @@ -125,7 +125,7 @@ static struct settings the_settings = { /* endcmd */ '.', /* workspace */ - 4L * 1024 * 1024, + 64L * 1024 * 1024, /* default_format */ {FMT_F, 8, 2}, /* testing_mode */ diff --git a/src/data/settings.h b/src/data/settings.h index 2de7e900..e39a63a0 100644 --- a/src/data/settings.h +++ b/src/data/settings.h @@ -105,13 +105,13 @@ void settings_set_endcmd (char); size_t settings_get_workspace (void); size_t settings_get_workspace_cases (size_t value_cnt); -void settings_set_workspace ( size_t); +void settings_set_workspace (size_t); const struct fmt_spec *settings_get_format (void); void settings_set_format ( const struct fmt_spec *); bool settings_get_testing_mode (void); -void settings_set_testing_mode ( bool); +void settings_set_testing_mode (bool); enum behavior_mode { ENHANCED, /* Use improved PSPP behavior. */ diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index e058aa59..37388f92 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -115,7 +115,7 @@ int tgetnum (const char *); wib=wib:msbfirst/lsbfirst/vax/native; wrb=wrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl; width=custom; - workspace=integer "x>=1024" "%s must be at least 1 MB"; + workspace=integer "x>0" "%s must be positive"; xsort=xsort:yes/no. */ @@ -195,7 +195,12 @@ cmd_set (struct lexer *lexer, struct dataset *ds) if (cmd.sbc_wrb) settings_set_output_float_format (stc_to_float_format (cmd.wrb)); if (cmd.sbc_workspace) - settings_set_workspace (cmd.n_workspace[0] * 1024L); + { + if ( cmd.n_workspace[0] < 1024 && ! settings_get_testing_mode ()) + msg (SE, _("WORKSPACE must be at least 1MB")); + else + settings_set_workspace (cmd.n_workspace[0] * 1024L); + } if (cmd.sbc_block) msg (SW, _("%s is obsolete."), "BLOCK");