Well, I tried to do the O_DIRECT but its not so simple as just adding
and just using the posix_memalign.

Anyway, I was trying something else.
I disabled the swap file to make things easier.
then I allocate by trial and error around 120MB memory,
mlock()(not needed unless I use swap) it and see if the program is not
killed. 
Then, I run the query and its not using all the cache, around
half for a simple select query.
I think I can work with this.
Is there a way to remove this trial and error by knowing somehow
how much physical memory I have to allocate or at least
doing the trial and error inside the program and not getting it
killed?

Regards,
        tzahi.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Eran Tromer
> Sent: Friday, April 29, 2005 3:20 PM
> To: Tzahi Fadida
> Cc: Linux-IL mailing list
> Subject: Re: cleaning memory.
> 
> 
> On 29/04/05 17:11, Tzahi Fadida wrote:
> >>Note that O_DIRECT requires the buffers in read() and write()
> >>to be aligned (to 512-byte boundaries, in kernel 2.6.x).
> > 
> >>From my understanding of the buffer size they use, its 8192.
> > its multiple of 16 of 512. Is that what you mean?
> 
> The address must be aligned: ((long)bufptr) % 512 == 0.
> See posix_memalign().
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] 
> with the word "unsubscribe" in the message body, e.g., run 
> the command echo unsubscribe | mail [EMAIL PROTECTED]
> 
> 
> 



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to