Memory Usage

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory Usage

Ben Clewett
Dear Sqlite,

I very much enjoy using Sqlite, it is extremely useful.

I have a memory usage query.

I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
find my programs data memory jumps by 16392 Kb.

This seems a lot.  The database I am opening is only 26K in size.

I have a similar process opening about 90 times.  This obviously
consumes a very large amount of memory, 1.4G with 90 processes.

May I ask if this is what would be expected, and whether there is
anything I can do to lower this loading?

Thanks for your help,

Ben.



-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Nuno Lucas-2
On 10/27/06, Ben Clewett <[hidden email]> wrote:
> I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
> find my programs data memory jumps by 16392 Kb.
>
> This seems a lot.  The database I am opening is only 26K in size.

There are many different ways of memory "jump" (like linking with a
lot of dynamic libraries), but one thing is certain: sqlite is not
responsible for that.

> I have a similar process opening about 90 times.  This obviously
> consumes a very large amount of memory, 1.4G with 90 processes.

It's a memory leak in your program, for sure. Run some memory leak
tool (e.g. valgrind).

> May I ask if this is what would be expected, and whether there is
> anything I can do to lower this loading?

Unless you decided to mess with sqlite internals, it's not expected in any way.

> Thanks for your help,
>
> Ben.

Best regards,
~Nuno Lucas

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Eduardo Morras
In reply to this post by Ben Clewett
At 18:00 27/10/2006, you wrote:

>Dear Sqlite,
>
>I very much enjoy using Sqlite, it is extremely useful.
>
>I have a memory usage query.
>
>I am linking to libsqlite3.so.0.8.6.  After calling
>sqlite3_open(...) I find my programs data memory jumps by 16392 Kb.
>
>This seems a lot.  The database I am opening is only 26K in size.
>
>I have a similar process opening about 90 times.  This obviously
>consumes a very large amount of memory, 1.4G with 90 processes.
>
>May I ask if this is what would be expected, and whether there is
>anything I can do to lower this loading?
>
>Thanks for your help,
>
>Ben.

Perhaps SQLite cache is taking that memory. Don't know if the cache
is pre-allocated or it takes memory as it needs. Also, if your temp
is memory any temporal table or similar takes more memory.

HTH


---------------------------------------------------------------------------
God is Real, but it can be declared as integer also...


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Lloyd K L
In reply to this post by Ben Clewett
Most probably it will be a memory leak in your program. We must release
the dynamically allocated memory ourselves. So check whether you are
forgetting to do that. Most probably that leak will be happening inside
some loops or repeatedly calling functions.


On Fri, 2006-10-27 at 17:00 +0100, Ben Clewett wrote:

> Dear Sqlite,
>
> I very much enjoy using Sqlite, it is extremely useful.
>
> I have a memory usage query.
>
> I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
> find my programs data memory jumps by 16392 Kb.
>
> This seems a lot.  The database I am opening is only 26K in size.
>
> I have a similar process opening about 90 times.  This obviously
> consumes a very large amount of memory, 1.4G with 90 processes.
>
> May I ask if this is what would be expected, and whether there is
> anything I can do to lower this loading?
>
> Thanks for your help,
>
> Ben.
>
>
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------


______________________________________
Scanned and protected by Email scanner

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Ben Clewett
In reply to this post by Nuno Lucas-2
Hi Numo and others,

I am very glad to hear the consensus is that there is nothing wrong with
  libsqlite3.so.0.8.6.

However the fact is that the 'open' still acquires 16MB of memory.

Immediately Before:

   VmSize:           8572 kB
   VmLck:               0 kB
   VmRSS:            2252 kB
   VmData:            484 kB
   VmStk:              88 kB
   VmExe:              20 kB
   VmLib:            6772 kB
   VmPTE:              20 kB

Immediately After:

sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)

   VmSize:          24960 kB
   VmLck:               0 kB
   VmRSS:            2368 kB
   VmData:          16872 kB
   VmStk:              88 kB
   VmExe:              20 kB
   VmLib:            6772 kB
   VmPTE:              24 kB

I can't use valgrind as this is a TCP daemon, so I will have to build
some form of simulator to investigate further....

Thanks,

Ben


Nuno Lucas wrote:

> On 10/27/06, Ben Clewett <[hidden email]> wrote:
>> I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
>> find my programs data memory jumps by 16392 Kb.
>>
>> This seems a lot.  The database I am opening is only 26K in size.
>
> There are many different ways of memory "jump" (like linking with a
> lot of dynamic libraries), but one thing is certain: sqlite is not
> responsible for that.
>
>> I have a similar process opening about 90 times.  This obviously
>> consumes a very large amount of memory, 1.4G with 90 processes.
>
> It's a memory leak in your program, for sure. Run some memory leak
> tool (e.g. valgrind).
>
>> May I ask if this is what would be expected, and whether there is
>> anything I can do to lower this loading?
>
> Unless you decided to mess with sqlite internals, it's not expected in
> any way.
>
>> Thanks for your help,
>>
>> Ben.
>
> Best regards,
> ~Nuno Lucas
>
> -----------------------------------------------------------------------------
>
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------
>
>


--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage 2

Ben Clewett
Hi again Numo and others,

I am looking further into this problem.  I hope I am not asking stupid
questions.

I can confirm definitely that my program, when started by 'xinetd' still
give the following result:  (As previous email)

   sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)

Immediately Before:
   VmData:            484 kB
Immediately After:
   VmData:          16872 kB


The *same* code hacked to run from the command line shows this:

Immediately Before:
   VmData:            464 kB
Immediately After:
   VmData:           4584 kB


Sqlite acquires almost exactly four times less memory.

A run of valgrid reports:

==11969== malloc/free: in use at exit: 12789 bytes in 99 blocks.
==11969== malloc/free: 110 allocs, 11 frees, 14337 bytes allocated.
==11969==
==11969== searching for pointers to 99 not-freed blocks.
==11969== checked 5812648 bytes.
==11969==
==11969== LEAK SUMMARY:
==11969==    definitely lost: 0 bytes in 0 blocks.
==11969==      possibly lost: 136 bytes in 2 blocks.
==11969==    still reachable: 12653 bytes in 97 blocks.
==11969==         suppressed: 0 bytes in 0 blocks.



This brings up more questions that is answers:

Is the allocation of 4108 KB normal for Sqlite?
Why, then run from xined, is the memory allocation four times as much?
Why is just Sqlite effected by being run from xinetd?

Any inspiration from any users very welcome!

Ben



Ben Clewett wrote:

> Hi Numo and others,
>
> I am very glad to hear the consensus is that there is nothing wrong with
>  libsqlite3.so.0.8.6.
>
> However the fact is that the 'open' still acquires 16MB of memory.
>
> Immediately Before:
>
>   VmSize:           8572 kB
>   VmLck:               0 kB
>   VmRSS:            2252 kB
>   VmData:            484 kB
>   VmStk:              88 kB
>   VmExe:              20 kB
>   VmLib:            6772 kB
>   VmPTE:              20 kB
>
> Immediately After:
>
> sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)
>
>   VmSize:          24960 kB
>   VmLck:               0 kB
>   VmRSS:            2368 kB
>   VmData:          16872 kB
>   VmStk:              88 kB
>   VmExe:              20 kB
>   VmLib:            6772 kB
>   VmPTE:              24 kB
>
> I can't use valgrind as this is a TCP daemon, so I will have to build
> some form of simulator to investigate further....
>
> Thanks,
>
> Ben
>
>
> Nuno Lucas wrote:
>> On 10/27/06, Ben Clewett <[hidden email]> wrote:
>>> I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
>>> find my programs data memory jumps by 16392 Kb.
>>>
>>> This seems a lot.  The database I am opening is only 26K in size.
>>
>> There are many different ways of memory "jump" (like linking with a
>> lot of dynamic libraries), but one thing is certain: sqlite is not
>> responsible for that.
>>
>>> I have a similar process opening about 90 times.  This obviously
>>> consumes a very large amount of memory, 1.4G with 90 processes.
>>
>> It's a memory leak in your program, for sure. Run some memory leak
>> tool (e.g. valgrind).
>>
>>> May I ask if this is what would be expected, and whether there is
>>> anything I can do to lower this loading?
>>
>> Unless you decided to mess with sqlite internals, it's not expected in
>> any way.
>>
>>> Thanks for your help,
>>>
>>> Ben.
>>
>> Best regards,
>> ~Nuno Lucas
>>
>> -----------------------------------------------------------------------------
>>
>> To unsubscribe, send email to [hidden email]
>> -----------------------------------------------------------------------------
>>
>>
>
>


--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Nuno Lucas-2
In reply to this post by Ben Clewett
On 10/30/06, Ben Clewett <[hidden email]> wrote:

> Hi Numo and others,
>
> I am very glad to hear the consensus is that there is nothing wrong with
>   libsqlite3.so.0.8.6.
>
> However the fact is that the 'open' still acquires 16MB of memory.
>
> Immediately Before:
>
>    VmSize:           8572 kB
>    VmLck:               0 kB
>    VmRSS:            2252 kB
>    VmData:            484 kB
>    VmStk:              88 kB
>    VmExe:              20 kB
>    VmLib:            6772 kB
>    VmPTE:              20 kB
>
> Immediately After:
>
> sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)
>
>    VmSize:          24960 kB
>    VmLck:               0 kB
>    VmRSS:            2368 kB
>    VmData:          16872 kB
>    VmStk:              88 kB
>    VmExe:              20 kB
>    VmLib:            6772 kB
>    VmPTE:              24 kB

I guess that info is from /proc/<pid>/status (the nomeclature somewhat
differs for other programs).

The program actually only allocated 2368-2252=116 KB, but reserved
16MB of virtual addresses (which is different from actual allocated
memory, as you can check by running free or other tool). That is
normal if it's the first file you open, as the kernel and libc reserve
a bunch of addresses before for internal buffers (to speed up your
I/O).

RSS (the Resident Set Size), is the important one here (unless your
program had parts of it swaped out, which would make it less usefull
for what we want).


Regards,
~Nuno Lucas

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Ben Clewett
Nuno,

Thanks for the excelent description of my error.  I have learnt a little
more about Linux virtual memory model.  Very glad to hear Sqlite is as
perfect as ever :)

My problem, which is definitely my problem, is that 90 x 16MB of
reserved memory is still a loss of 1.4G.  Especially as I use hardly any
of it.

If you can drop me a hint about how to sort this, this would be
extremely useful.  Otherwise I'll close this thread and look elsewhere...

Kind regards,

Ben Clewett.


Nuno Lucas wrote:

> On 10/30/06, Ben Clewett <[hidden email]> wrote:
>> Hi Numo and others,
>>
>> I am very glad to hear the consensus is that there is nothing wrong with
>>   libsqlite3.so.0.8.6.
>>
>> However the fact is that the 'open' still acquires 16MB of memory.
>>
>> Immediately Before:
>>
>>    VmSize:           8572 kB
>>    VmLck:               0 kB
>>    VmRSS:            2252 kB
>>    VmData:            484 kB
>>    VmStk:              88 kB
>>    VmExe:              20 kB
>>    VmLib:            6772 kB
>>    VmPTE:              20 kB
>>
>> Immediately After:
>>
>> sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)
>>
>>    VmSize:          24960 kB
>>    VmLck:               0 kB
>>    VmRSS:            2368 kB
>>    VmData:          16872 kB
>>    VmStk:              88 kB
>>    VmExe:              20 kB
>>    VmLib:            6772 kB
>>    VmPTE:              24 kB
>
> I guess that info is from /proc/<pid>/status (the nomeclature somewhat
> differs for other programs).
>
> The program actually only allocated 2368-2252=116 KB, but reserved
> 16MB of virtual addresses (which is different from actual allocated
> memory, as you can check by running free or other tool). That is
> normal if it's the first file you open, as the kernel and libc reserve
> a bunch of addresses before for internal buffers (to speed up your
> I/O).
>
> RSS (the Resident Set Size), is the important one here (unless your
> program had parts of it swaped out, which would make it less usefull
> for what we want).
>
>
> Regards,
> ~Nuno Lucas
>
> -----------------------------------------------------------------------------
>
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------
>
>


--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage 2

D. Richard Hipp
In reply to this post by Ben Clewett
Ben Clewett <[hidden email]> wrote:
>
> Is the allocation of 4108 KB normal for Sqlite?

No.  Not for me.  If you open the same database using the
command-line client, how much memory does it use?

> Why, then run from xined, is the memory allocation four times as much?
> Why is just Sqlite effected by being run from xinetd?
>

What else does your program do?
--
D. Richard Hipp  <[hidden email]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Nuno Lucas-2
In reply to this post by Ben Clewett
On 10/30/06, Ben Clewett <[hidden email]> wrote:
> Nuno,
>
> Thanks for the excelent description of my error.  I have learnt a little
> more about Linux virtual memory model.  Very glad to hear Sqlite is as
> perfect as ever :)
>
> My problem, which is definitely my problem, is that 90 x 16MB of
> reserved memory is still a loss of 1.4G.  Especially as I use hardly any
> of it.

Each process has it's own virtual address space, so 16MB of reserved
virtual addresses (except when they are kernel addresses) for one
process doesn't do nothing to the ammount of virtual addresses free
for other processes. And as each process usually has 2/3GB of virtual
addresses for it's own use, 16MB is pretty low (it depends on the
system, but 2 GB is the most common minimum, on 32 bits).

I still find strange that your program uses so much virtual addresses,
but you didn't specify (or I don't recall) what language you are using
and what libraries you are linking to. You may want to investigate
this further.


Regards,
~Nuno Lucas

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Lloyd K L
I don't know whether I am right in this perspective. Just to know
whether sqlite is causing the high memory usage, comment the commands
(statements)  related to sqlite and check the memory status.  

Thanks,
  Lloyd.

On Mon, 2006-10-30 at 12:45 +0000, Nuno Lucas wrote:

> On 10/30/06, Ben Clewett <[hidden email]> wrote:
> > Nuno,
> >
> > Thanks for the excelent description of my error.  I have learnt a little
> > more about Linux virtual memory model.  Very glad to hear Sqlite is as
> > perfect as ever :)
> >
> > My problem, which is definitely my problem, is that 90 x 16MB of
> > reserved memory is still a loss of 1.4G.  Especially as I use hardly any
> > of it.
>
> Each process has it's own virtual address space, so 16MB of reserved
> virtual addresses (except when they are kernel addresses) for one
> process doesn't do nothing to the ammount of virtual addresses free
> for other processes. And as each process usually has 2/3GB of virtual
> addresses for it's own use, 16MB is pretty low (it depends on the
> system, but 2 GB is the most common minimum, on 32 bits).
>
> I still find strange that your program uses so much virtual addresses,
> but you didn't specify (or I don't recall) what language you are using
> and what libraries you are linking to. You may want to investigate
> this further.
>
>
> Regards,
> ~Nuno Lucas
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------


______________________________________
Scanned and protected by Email scanner

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Ben Clewett
In reply to this post by Nuno Lucas-2
Hi Nuno,

Sqlite is one mailing list I have consistently found absolutely excelent
knowledge, thanks again for your information.  I don't know whether this
should be off-thread now, but I don't have your email address.

I'll have to research memory allocation further.  But I'm glad to know
that the 16MB 'VmData' is not reserved per-process.  If you know a good
URL on Linux virtual memory and allocation, I would be extremely interested.

My code is c++, it's a manifold for many TCP remote mobile devices, like
GPS tracking equipment.  Therefore it's evolved to link to half the
libraries on the system.

If I am to correctly account for data used by a collection of processes,
would this be the sum of VmRSS?

I am suffering a 4GB memory 64-bit Zeon Linux box, which keeps crashing
with 'No available memory'.  I'm finding it quite hard to break down the
memory into what processes are paged-in and using what's available.
Sqlite seemed to be the smoking gun, so although I'm glad it was not the
case, it means I must start again on my search...

Thanks for the advise,

Ben




Nuno Lucas wrote:

> On 10/30/06, Ben Clewett <[hidden email]> wrote:
>> Nuno,
>>
>> Thanks for the excelent description of my error.  I have learnt a little
>> more about Linux virtual memory model.  Very glad to hear Sqlite is as
>> perfect as ever :)
>>
>> My problem, which is definitely my problem, is that 90 x 16MB of
>> reserved memory is still a loss of 1.4G.  Especially as I use hardly any
>> of it.
>
> Each process has it's own virtual address space, so 16MB of reserved
> virtual addresses (except when they are kernel addresses) for one
> process doesn't do nothing to the ammount of virtual addresses free
> for other processes. And as each process usually has 2/3GB of virtual
> addresses for it's own use, 16MB is pretty low (it depends on the
> system, but 2 GB is the most common minimum, on 32 bits).
>
> I still find strange that your program uses so much virtual addresses,
> but you didn't specify (or I don't recall) what language you are using
> and what libraries you are linking to. You may want to investigate
> this further.
>
>
> Regards,
> ~Nuno Lucas
>
> -----------------------------------------------------------------------------
>
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------
>
>


--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Martin Jenkins-2
Ben Clewett wrote:
> If you know a good URL on Linux virtual memory and allocation, I
> would be extremely interested.

You could try:

http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html

The next two link to pages with links to a PDF of the "gorman" book
"Understanding the Linux Virtual Memory Manager", which looks like a
good read.

http://www.skynet.ie/~mel/projects/vm/
http://www.phptr.com/promotions/promotion.asp?promo=1484&redir=1&rl=1

Martin

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Ben Clewett
Martin,

Excellent, thanks for the reference.

I can now very clearly see that sqlite3 is in fact one of the smaller
memory users.  In fact 7.5 times less than MySQL client I am also linked
to, and that's just a client not an entire database...

Thanks,

Martin Jenkins wrote:

> Ben Clewett wrote:
>> If you know a good URL on Linux virtual memory and allocation, I
>> would be extremely interested.
>
> You could try:
>
> http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html 
>
>
> The next two link to pages with links to a PDF of the "gorman" book
> "Understanding the Linux Virtual Memory Manager", which looks like a
> good read.
>
> http://www.skynet.ie/~mel/projects/vm/
> http://www.phptr.com/promotions/promotion.asp?promo=1484&redir=1&rl=1
>
> Martin
>
> -----------------------------------------------------------------------------
>
> To unsubscribe, send email to [hidden email]
> -----------------------------------------------------------------------------
>
>


--
Ben Clewett
+44(0)1923 460000
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

John Stanton-3
In reply to this post by Ben Clewett
What happens when you write a simple test program to open the DB?  You
can certainly run Valgrind on that or even put in your own debug
statements to examine the heap usage.

This would be the first thing to do in indentifying the problem.  It
will tell you whether to look at Sqlite or your application.

Ben Clewett wrote:

> Hi Numo and others,
>
> I am very glad to hear the consensus is that there is nothing wrong with
>  libsqlite3.so.0.8.6.
>
> However the fact is that the 'open' still acquires 16MB of memory.
>
> Immediately Before:
>
>   VmSize:           8572 kB
>   VmLck:               0 kB
>   VmRSS:            2252 kB
>   VmData:            484 kB
>   VmStk:              88 kB
>   VmExe:              20 kB
>   VmLib:            6772 kB
>   VmPTE:              20 kB
>
> Immediately After:
>
> sqlite3_open(sDatabaseFile, &hSqlite) (= SQLITE_OK)
>
>   VmSize:          24960 kB
>   VmLck:               0 kB
>   VmRSS:            2368 kB
>   VmData:          16872 kB
>   VmStk:              88 kB
>   VmExe:              20 kB
>   VmLib:            6772 kB
>   VmPTE:              24 kB
>
> I can't use valgrind as this is a TCP daemon, so I will have to build
> some form of simulator to investigate further....
>
> Thanks,
>
> Ben
>
>
> Nuno Lucas wrote:
>
>> On 10/27/06, Ben Clewett <[hidden email]> wrote:
>>
>>> I am linking to libsqlite3.so.0.8.6.  After calling sqlite3_open(...) I
>>> find my programs data memory jumps by 16392 Kb.
>>>
>>> This seems a lot.  The database I am opening is only 26K in size.
>>
>>
>> There are many different ways of memory "jump" (like linking with a
>> lot of dynamic libraries), but one thing is certain: sqlite is not
>> responsible for that.
>>
>>> I have a similar process opening about 90 times.  This obviously
>>> consumes a very large amount of memory, 1.4G with 90 processes.
>>
>>
>> It's a memory leak in your program, for sure. Run some memory leak
>> tool (e.g. valgrind).
>>
>>> May I ask if this is what would be expected, and whether there is
>>> anything I can do to lower this loading?
>>
>>
>> Unless you decided to mess with sqlite internals, it's not expected in
>> any way.
>>
>>> Thanks for your help,
>>>
>>> Ben.
>>
>>
>> Best regards,
>> ~Nuno Lucas
>>
>> -----------------------------------------------------------------------------
>>
>> To unsubscribe, send email to [hidden email]
>> -----------------------------------------------------------------------------
>>
>>
>
>


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Dennis Jenkins
    If you are seeing different memory usage patterns for identical code
based on if it is run from xinetd or on your command line, then I would
check the process environment that xinetd creates.  Maybe some component
that sqlite uses is acting differently based on environment variables?

    I don't know with any certainty, but I'm fairly sure that sqlite
doesn't use env vars for anything.  It's just a thought...



-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Memory Usage

Eduardo Morras
In reply to this post by Ben Clewett
At 14:40 30/10/2006, you wrote:

>I am suffering a 4GB memory 64-bit Zeon Linux box, which keeps
>crashing with 'No available memory'.  I'm finding it quite hard to
>break down the memory into what processes are paged-in and using
>what's available. Sqlite seemed to be the smoking gun, so although
>I'm glad it was not the case, it means I must start again on my search...

Perhaps it's begining to be a bit offtopic, but, what's your swap
partition size? Could you check it for physical damage? Or make another swap?


-----------------------------------------------------------------------------
To unsubscribe, send email to [hidden email]
-----------------------------------------------------------------------------