// Clear memory before each run
// http://www.stata.com/help.cgi?clear
clear all
// Allocate plenty of memory
// http://www.stata.com/help.cgi?memory
set memory 1024m
// Load data set: 1978 Automobile Data
// (Use "sysuse dir" to list other data sets)
// http://www.stata.com/help.cgi?sysuse
sysuse auto
// Duplicate observations
// http://www.stata.com/help.cgi?expand
expand 10000
// Bootstrap sampling and estimation
// http://www.stata.com/help.cgi?bootstrap
// Generate high load using example from bootstrap documentation
bootstrap: regress mpg weight gear foreign
// Generate even higher load and for a longer period
//bootstrap: logistic foreign price-gear_ratio
This answer is based on an earlier answer, but I added some comments, some setup, and an extra bootstrap command that generates less load. You can put this into a file called "load.do" and execute it in Stata with File -> Do. Click the Break button to stop execution.
Please feel free to merge this into the earlier answer if that is more appropriate.