× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That's a good point. I would suggest running one more test, this time create
the user space as something like 32k in size, but make it auto-extend. Then
read it in 32k chunks, similar to option C; and observer/report the results.
I'm wondering if there would be any difference.
If you already did that, and it was used in option A, then just let us know
that. Thanks!

Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of James Rich
Sent: Tuesday, June 24, 2003 4:28 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: scanning user space

On Tue, 24 Jun 2003, Pete Clifford (@riadne software) wrote:

> a) I guess A and B show the relative overhead of a user space and
> dynamically allocated memory. I'll be doing more ALLOCs in future.
> b) I expected D to be bad and C to be much better, but I didn't expect C
to
> be much better than A and B. Why? Have I somehow chosen some magic buffer
> size that corresponds to an internal IFS buffer size or something?

[snip]

> Can anyone explain why C is better than A and B? I wonder whether these
> results would be repeated on an empty machine (mine wasn't - no such
> luxury). I wonder whether A and B are getting paged out while the I-O is
> occurring while C isn't because it's doing more CPU intensive work
(multiple
> reads). The CPU usage is similar but the elapsed times are significantly
> different. Any suggestions?

Possible explanation without doing any real tests (apologies to Joe who
suggested we test things more before commenting - an excellent idea):

When you malloc() or use a user space of that size the system needs to
spend time getting the memory together for you to use.  Possibly that
memory may be on disk (paged out).  Regardless, meeting the demands for
that memory may take longer than simply reusing a smaller buffer over and
over.  Too small and you spend all your time going out to disk in an
inefficient way.  Too large and you make inefficient use of memory.  It is
very possible that memory contention is a worse problem than disk
performance in this case.

James Rich
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.