Subject | RE: [ib-support] RC1 Error - Responses |
---|---|
Author | Helen Borrie |
Post date | 2001-12-06T01:21:19Z |
At 04:40 PM 05-12-01 -0800, you wrote:
You probably did it already, but... does (DATABASE_CACHE_PAGES * page_size) come out greater than SERVER_WORKING_SIZE_MAX? (It seems this could get to be an issue quite easily with 16K pages). I bumped into this parameter while researching for a documentation task but so far haven't discovered what the defaults are for SERVER_WORKING_SIZE_MAX and SERVER_WORKING_SIZE_MIN.
If the cache is already thrashing the disk, is there enough temp space left in your TMP_DIRECTORY for merge-sort operations on huge datasets?
Helen
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>To quickly emulate it, I changed it to read in the first 300kb from each ofBill,
>those files. This spikes nicely, and causes the Kernel memory to jump to
>152mb, but it still succeeds.
>
>It seems like there is a piece of the puzzle missing somewhere . . .
You probably did it already, but... does (DATABASE_CACHE_PAGES * page_size) come out greater than SERVER_WORKING_SIZE_MAX? (It seems this could get to be an issue quite easily with 16K pages). I bumped into this parameter while researching for a documentation task but so far haven't discovered what the defaults are for SERVER_WORKING_SIZE_MAX and SERVER_WORKING_SIZE_MIN.
If the cache is already thrashing the disk, is there enough temp space left in your TMP_DIRECTORY for merge-sort operations on huge datasets?
Helen
>BillAll for Open and Open for All
>
>-----Original Message-----
>From: Ann W. Harrison [mailto:aharrison@...]
>Sent: Wednesday, December 05, 2001 4:06 PM
>To: ib-support@yahoogroups.com
>Subject: RE: [ib-support] RC1 Error - Responses
>
>
>At 03:42 PM 12/5/2001 -0800, Bill Morrison wrote:
> >Unfortunately it worked fine. Question : does it use a different way of
> >opening the db if the db is split into different files?
>
>Hmmm.... One difference is that it does read the first page
>of each file before opening the next.
>
>
>You might take a look at the code in gstat. I've included
>the central part here... You are using the command line
>gstat and not the one that's built into the server/IBConsole,
>right?
>
>Ann
>
>
>/* From main */
>
>/* Open database and go to work */
>
>current = db_open (name, strlen (name));
>tddba->page_size = sizeof (temp);
>tddba->global_buffer = (PAG) temp;
>tddba->page_number = -1;
>header = (HDR) db_read ((SLONG) 0);
>
>if (header->hdr_ods_version > ODS_VERSION ||
> (header->hdr_ods_version < ODS_VERSION8 &&
> header->hdr_ods_version != ODS_VERSION6))
> {
> dba_error (3, (TEXT *)ODS_VERSION, (TEXT *)header->hdr_ods_version,
> 0, 0, 0); /* msg 3: Wrong ODS version, expected %d,
>encountered %d? */
> }
>
> strcpy(file_name, name);
>
>dba_print (6, file_name, 0, 0, 0, 0); /* msg 6: \nDatabase \"%s\"\n */
>
>tddba->page_size = header->hdr_page_size;
>tddba->buffer1 = (PAG) ALLOC (tddba->page_size);
>tddba->buffer2 = (PAG) ALLOC (tddba->page_size);
>tddba->global_buffer = (PAG) ALLOC (tddba->page_size);
>tddba->page_number = -1;
>
>/* gather continuation files */
>
>page = HEADER_PAGE;
>do
> {
> if (page != HEADER_PAGE)
> current = db_open (file_name, strlen (file_name));
> do
> {
> header = (HDR) db_read ((SLONG) page);
> if (current != tddba->files)
> current->fil_fudge = 1; /* ignore header page once read it */
> *file_name = '\0';
> for (vp = header->hdr_data, vend = vp + header->hdr_page_size;
> vp < vend && *vp != HDR_end; vp += 2 + vp [1])
> {
> if (*vp == HDR_file)
> {
> memcpy (file_name, vp + 2, vp [1]);
> *(file_name+vp[1]) = '\0';
> }
> if (*vp == HDR_last_page)
> memcpy (¤t->fil_max_page, vp + 2, sizeof
>(current->fil_max_page));
> }
> }
> while (page = header->hdr_next_page);
> page = current->fil_max_page + 1; /* first page of next file */
> }
>while (*file_name);
>
>/* Print header page */
>
>page = HEADER_PAGE;
>do
> {
> header = (HDR) db_read ((SLONG) page);
> PPG_print_header (header, page, sw_outfile);
> }
>while (page = header->hdr_next_page);
>
>if (sw_header)
> EXIT (FINI_OK);
>
>
>/* d b _ o p e n */
>
>static DBA_FIL db_open (
> UCHAR *file_name,
> USHORT file_length)
>{
>/**************************************
> *
> * d b _ o p e n ( W I N _ N T )
> *
> **************************************
> *
> * Functional description
> * Open a database file.
> *
> **************************************/
>DBA_FIL fil;
>TDBA tddba;
>
>tddba = GET_THREAD_DATA;
>
>if (tddba->files)
> {
> for (fil = tddba->files; fil->fil_next; fil = fil->fil_next)
> ;
> fil->fil_next = (DBA_FIL) ALLOC (sizeof (struct dba_fil) + strlen
>(file_name) + 1);
> fil->fil_next->fil_min_page = fil->fil_max_page+1;
> fil = fil->fil_next;
> }
>else /* empty list */
> {
> fil = tddba->files = (DBA_FIL) ALLOC (sizeof (struct dba_fil) + strlen
>(file_name) + 1);
> fil->fil_min_page = 0L;
> }
>
>fil->fil_next = NULL;
>strcpy (fil->fil_string, file_name);
>fil->fil_length = strlen (file_name);
>fil->fil_fudge = 0;
>fil->fil_max_page = 0L;
>
>if ((fil->fil_desc = CreateFile (file_name,
> GENERIC_READ,
> FILE_SHARE_READ | FILE_SHARE_WRITE,
> NULL,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
> 0)) == INVALID_HANDLE_VALUE)
> {
> db_error (GetLastError());
> }
>
>
>return fil;
>}
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________