>
> On Sat, 30 Apr 2005, Tzahi Fadida wrote:
> 
> > Well, I tried to do the O_DIRECT but its not so simple as 
> just adding 
> > and just using the posix_memalign.
> 
> errr... why? cause the buffer sizes must also be multiples of 
> 512 bytes each?

well, 512 bytes aligned. But what they do is use one central
function to read and write and I changed it to O_DIRECT
and changed their method of allocation for file buffers
to posix_memalign(,512,), however all kinds of complications
jumps up and it needs long debugging to adjust it. I prefer
not to waste too much time on this.

> i don't realy see what you're trying to do here. the system 
> uses _all_ available ram for caching. there is no "cache 
> size" or "cache size limit".
> (almost) all the RAM is used for something, or else it is 
> just a waste.
> 
> if you lock up a lot of memory, you'll not have memory for 
> other programs that might need it (or you're locking the 
> memory inside the program that is doing the query? but 
> doesn't the database process itself require memory in order 
> to run the query? did you make it, too, pre-allocate and lock 
> memory somehow, without disrupting the workings of malloc() 
> and free()?).
> 
> so if you simply pre-allocate a lot of memory, it means 
> you're going to choke your own test programs. i don't see 
> where that leads you to.

lets see.
we have a fixed RAM. some memory goes to the programs
including postgresql and some to the cache.
In order to do the tests I need to keep the assumption
that the algorithm memory<relations input otherwise
theres a better algorithm for this.
True, my algorithm needs maximum memory under
production but for testing its just need to keep the assumption
and a fixed size memory allocation.
All I need to do is to downsize the cache so together
with my algorithm memory < input relation size.
My algorithm usually pass sequentialy on the relations
and that should defeat the cache all the time (LRU
has no protection). i.e. no cache will be used
in practice.

The problem is that I want to do the test automatically
and I can't mlock ram memory by trial and error all
the time. I have some ideas for an ad hoc program
but I want to put the cache defeating code in the 
db function so it will know how much mem to allocate
in the margins for the algorithm and I musn't
let the kernel kill my program if it got the memory numbers
wrong.
It's a tricky one.

btw, the cache does not seem to drop under 5mb for some
reason. I am interested to know why.



=================================================================
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