Through a series of unfortunate late night amazon sorties i have 24 GB of memory on my machine

The performance gain i got using foreach is about a factor of 3 with 4 processors supporting 4 workers.
In each iteration of the loop i'm pulling a sample out of the test set that's five columns and 300 rows and a set of data out of the training set which is 5 columns and anywhere from a few thousand rows to many hundreds of thousands of rows and computing several quantities. Both sets are stored in lists where each item in the list is either a data set for a specified device in the training data or a test sequence id in the test data---indexing this way, or some other way maybe through a database connection is essential since subsetting a huge data frame is slowwwww.
I compute the times between samples of the test sequence, pull the precomputed times between samples for the training device data and compare their distributions with KS test, compute correlation of three of the columns in both data sets and their differnces, compute different in means for one column in each, and compute differnece in mode sampling rate between the two sets.
then pull a precomputed glm object from a list (that was built solely in the training data), and get predictions from those computed quantities.
The actual length of the iteration is only 90024 (each iteration gets a chunk from the 30 mil + 30 mil data sets) and it takes about 2.5 hours in parallel with 4 workers on my machine (AMD A8 @3.0 Ghz), sorry if that was misleading in my first post.
The first time i tried to do it i was just subsetting the data frames with 30 millionish rows in each and a rough guess is that it would take 3 or 4 days to run subsetting that way. So i have a pre processing script that just subsets the data frames and stores them in a list...this takes an hour or so to run, but then subsetting is quick. probably better ways to do it but this is my first time really messing with large data sets and it's the way i got it to work

jon