LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-14-2018, 01:18 AM   #16
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
More information available here:


https://www.sololearn.com/Discuss/814671/?ref=app
 
Old 02-14-2018, 03:17 PM   #17
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,198

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
The columns that you cropped out show which specific programs in particular are using up your RAM and swap.

Obviously, start there.

Last edited by dugan; 02-14-2018 at 03:24 PM.
 
1 members found this post helpful.
Old 02-15-2018, 12:15 AM   #18
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by dugan View Post
The columns that you cropped out show which specific programs in particular are using up your RAM and swap.

Obviously, start there.
Cropping out is due to : picture size limit policy in LQ site
The similar full sizes are in my other post replies

Last edited by irajjs; 02-15-2018 at 12:17 AM.
 
Old 02-15-2018, 12:21 AM   #19
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Not cropped!

https://www.instagram.com/p/BepiKVnFTzK/
 
Old 02-16-2018, 09:27 AM   #20
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
I think that it is extremely likely that your programs contain a programming bug ... possibly caused by "circular memory references" or somesuch ... which are preventing their memory-manager's "garbage collector" from working properly.

This is causing a classic "memory leak."

Linux is responding by swapping-out the information, which will never again be referenced. But, in so doing, it is gradually consuming swap space. Eventually, it will "OOM-kill" your process for this offense, but it will be in fairly desperate straits by the time that it does so.

Your software has a bug in it. Find it and fix it.

In most high-level programming languages, the "garbage collector" periodically sweeps through memory to reclaim memory that is no longer used. But it cannot do this if a "chain" of data structures refer to one another and if none of those self-references have been so-called "weakened." The exact resolution to your problem varies by whatever language you happen to be using, but the principles are the same.

This is not a Linux problem at all. This is a memory leak ... a bug in your application(s).
 
Old 02-19-2018, 04:47 AM   #21
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by sundialsvcs View Post
I think that it is extremely likely that your programs contain a programming bug ... possibly caused by "circular memory references" or somesuch ... which are preventing their memory-manager's "garbage collector" from working properly.

This is causing a classic "memory leak."

Linux is responding by swapping-out the information, which will never again be referenced. But, in so doing, it is gradually consuming swap space. Eventually, it will "OOM-kill" your process for this offense, but it will be in fairly desperate straits by the time that it does so.

Your software has a bug in it. Find it and fix it.

In most high-level programming languages, the "garbage collector" periodically sweeps through memory to reclaim memory that is no longer used. But it cannot do this if a "chain" of data structures refer to one another and if none of those self-references have been so-called "weakened." The exact resolution to your problem varies by whatever language you happen to be using, but the principles are the same.

This is not a Linux problem at all. This is a memory leak ... a bug in your application(s).
The original OS had some bugs .. it had some problems too .. during these years i have fixed them.
My own software also are not complete or perfect! Not at all! I and my computer are evolving gradually! And i will monitor and test my software in the future too! But! I am not sure about memory leakage .. because:
Total memory usage is not more than few hundred mbs and swap has no values more than 2.7 mbs .. these values can not comprise such a huge values
I have posted this question in the general forum which is related to any software or hardware problem or question .. so may be it is not related to Linux! I am also not sure if my system is still Linux! This is because of a lot of changes and developments made ..
I use the code: using namespace std; in all my programs i also use clear and skipgarb functions in the beginning of my codes.. and i use g++ or make to compile .. my scripts are or were not in an orderly manner ..
Finally i do not consider it a problem .. i like high memory values even if virtual! So! This is just a question to add to my knowledge by getting answers
Thank you!
 
Old 02-19-2018, 05:11 PM   #22
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Another feature!

https://www.instagram.com/p/BfZRl2cl6r5/
 
Old 02-20-2018, 08:15 AM   #23
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Irajjs, all you're really doing here is showing to the world (and to your boss) that you've had a memory-leak problem on your system for nearly a month and that you've done nothing to figure out how to solve it yet. All that you can think to do is to take pictures of it and to post them for viewing by people who really don't have any reason to care. (And, we've seen it before – and we fixed it.)

If you can't figure it out for yourself, ask your boss to assign a more-experienced co-worker to help you. This software has probably been buggy in this way for a very long time. C++ has a very different approach to memory allocation and programmers who are used to other languages often make mistakes that cause leaks. If you see that the virtual memory space is continuously growing, but that the working-set size is not continuously growing, then, "you have a leak."

I regret having said this entire post.

Last edited by sundialsvcs; 02-20-2018 at 07:00 PM.
 
Old 02-20-2018, 10:51 AM   #24
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Explanation

Quote:
Originally Posted by sundialsvcs View Post
Irajjs, all you're really doing here is showing to the world (and to your boss) that you've had a memory-leak problem on your system for nearly a month and that you've done nothing to figure out how to solve it yet. All that you can think to do is to take pictures of it and to post them for viewing by people who really don't have any reason to care. (And, we've seen it before – and we fixed it.)

If you can't figure it out for yourself, ask your boss to assign a more-experienced co-worker to help you. This software has probably been buggy in this way for a very long time. C++ has a very different approach to memory allocation and programmers who are used to other languages often make mistakes that cause leaks. If you see that the virtual memory space is continuously growing, but that the working-set size is not continuously growing, then, "you have a leak."
I do not want to argue but i have to explain because i do not want to be considered as ignorant!
I think your judgement and understanding about me or my software is based on wrong or incomplete data and information and being hasty!
Anyhow i am not employed anywhere ..
Subject is related to my PC ..
I am just interested in computer and programming ..
Even if i accept your idea about that being a memory leakage it is no problem at all! Because i am not connecting to Internet this leakage will not harm anyone!
Even it is an advantage because i think nearly all programs in a computer should share their memory to enhance integration and i am intentionally trying to get to a point where all my software are integrated!
Unfortunately whenever type command "free" i get this output too! :
Shared memory 0
So if you do not care as you said just forget it! Otherwise you may study my recent posts in: LQ and in SL and in instagram
I do not expect any one to spend their time unless they are interested!
Regards
 
Old 02-20-2018, 06:43 PM   #25
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,198

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
Quote:
Originally Posted by irajjs View Post
Anyhow i am not employed anywhere ..
I think what you mean is "I'm not doing this for work".
 
Old 02-20-2018, 07:01 PM   #26
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Quote:
Originally Posted by irajjs View Post
So if you do not care as you said just forget it! Otherwise you may study my recent posts in: LQ and in SL and in instagram
I do not expect any one to spend their time unless they are interested!
Regards
All right, Irajjs, I'm going to own up to my ill-considered and insufferably-snarky words in the previous post, and herewith officially eat them.

I owe you a sincere and public apology, and, here it is.
 
Old 02-20-2018, 07:09 PM   #27
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
I maintain my suspicion that the root cause of the problem is that your software is not releasing all of the memory that it dynamically allocates. Debugging tools might be able to assist you in finding them, especially if they can point out "abandoned" memory blocks having content that your recognize.

This is not the same as "shared memory."

All memory used by a user-side process is virtual: the process perceives that it has memory all to itself, and that it can even request ... and, obtain ... more "memory" than the underlying machine actually has. The operating system manages this trick in-part by recognizing what portions of memory are actively being used right now, and which are not. (It will commit physical resources to the instantaneously-active areas, the so-called "working set." The rest will be swapped-out, there to be forgotten unless referenced again.) A process can run for a very long time, with its "virtual memory size" growing bigger and bigger, when there is a "leak."

The C++ language does not have a "garbage collector," as many other languages do. You are responsible for cleaning up everything. The most likely culprit just might be an omission in the destructor of some class that your program instantiates and uses constantly. Start with the most-often used class and carefully desk-check the source-code of its constructor and destructor.
 
Old 02-20-2018, 11:52 PM   #28
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Respect you!

Quote:
Originally Posted by sundialsvcs View Post
All right, Irajjs, I'm going to own up to my ill-considered and insufferably-snarky words in the previous post, and herewith officially eat them.

I owe you a sincere and public apology, and, here it is.
I admire and respect you for your sincere manner
Regards
 
Old 02-21-2018, 12:37 AM   #29
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Wh-at i want to say:

Quote:
Originally Posted by sundialsvcs View Post
I maintain my suspicion that the root cause of the problem is that your software is not releasing all of the memory that it dynamically allocates. Debugging tools might be able to assist you in finding them, especially if they can point out "abandoned" memory blocks having content that your recognize.

This is not the same as "shared memory."

All memory used by a user-side process is virtual: the process perceives that it has memory all to itself, and that it can even request ... and, obtain ... more "memory" than the underlying machine actually has. The operating system manages this trick in-part by recognizing what portions of memory are actively being used right now, and which are not. (It will commit physical resources to the instantaneously-active areas, the so-called "working set." The rest will be swapped-out, there to be forgotten unless referenced again.) A process can run for a very long time, with its "virtual memory size" growing bigger and bigger, when there is a "leak."

The C++ language does not have a "garbage collector," as many other languages do. You are responsible for cleaning up everything. The most likely culprit just might be an omission in the destructor of some class that your program instantiates and uses constantly. Start with the most-often used class and carefully desk-check the source-code of its constructor and destructor.
-i do not consider that a problem
-i do not think about that as being bug
- i just do not fully understand that because neither system nor my software do not explain about whatever they are doing!
I do not expect you to refer me to pre-made tools .. i think real programmers should solve their own problem by creating and using their own codes!
The situation is a little more complicated .. maybe!
Possibly my software are acting independently!
Because they are not supported or understood by the original OS software .. which are fully dependent on parental sites!
Now i can not talk more clearly because the situation is not clear enough!
I will not clean everything but i will try to develop my work!
And i welcome any helping suggestion in this direction
 
Old 02-21-2018, 01:37 PM   #30
irajjs
Member
 
Registered: Jan 2010
Location: Karaj , Iran
Distribution: Mandriva 2012
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: 15
You are right but ..

Quote:
Originally Posted by dugan View Post
I think what you mean is "I'm not doing this for work".
I meant exactly what i said!
 
  


Reply

Tags
irajjs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HUGE load, no apparent activity suprstar Linux - Newbie 4 08-20-2010 06:49 AM
How to convert the values displayed by sar -r with top rajaniyer123 Solaris / OpenSolaris 9 07-05-2010 02:48 PM
Mysql logging for specific table activity mycoolwater Linux - Software 1 09-21-2009 08:17 PM
access paging table memory using another page table via MMU? valpa Linux - Kernel 8 08-26-2008 03:26 PM
Monitoring disk activity with vmstat gives strange values. Why? tobikars Linux - Software 0 12-07-2005 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration