Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #16390 > unrolled thread
| Started by | gamo <gamo@telecable.es> |
|---|---|
| First post | 2015-11-29 14:51 +0100 |
| Last post | 2015-11-29 18:36 -0800 |
| Articles | 10 — 5 participants |
Back to article view | Back to comp.os.linux.misc
Memory released after running rsync gamo <gamo@telecable.es> - 2015-11-29 14:51 +0100
Re: Memory released after running rsync William Unruh <unruh@invalid.ca> - 2015-11-29 20:12 +0000
Re: Memory released after running rsync gamo <gamo@telecable.es> - 2015-11-29 21:56 +0100
Re: Memory released after running rsync William Unruh <unruh@invalid.ca> - 2015-11-29 21:16 +0000
Re: Memory released after running rsync gamo <gamo@telecable.es> - 2015-11-29 23:52 +0100
Re: Memory released after running rsync Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2015-11-30 00:33 +0100
Re: Memory released after running rsync gamo <gamo@telecable.es> - 2015-11-30 07:16 +0100
Re: Memory released after running rsync Teemu Likonen <tlikonen@iki.fi> - 2015-12-01 18:04 +0200
Re: Memory released after running rsync gamo <gamo@telecable.es> - 2015-12-01 23:49 +0100
Re: Memory released after running rsync Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2015-11-29 18:36 -0800
| From | gamo <gamo@telecable.es> |
|---|---|
| Date | 2015-11-29 14:51 +0100 |
| Subject | Memory released after running rsync |
| Message-ID | <n3evtg$7hi$1@speranza.aioe.org> |
Hello, I have a desktop machine with 32 GB RAM, and as expected most of the memory is used as a cache. Sometimes I have few memory free, less than 1 GB, and happens that after running 'rsync' the memory reported by 'free' as free is increased notably. So the question is: what kind of magic do the rsync program? Thanks. Regards. -- http://gamo.eu.pn/ The generation of random numbers is too important to be left to chance Actually, 360 degree hater.
[toc] | [next] | [standalone]
| From | William Unruh <unruh@invalid.ca> |
|---|---|
| Date | 2015-11-29 20:12 +0000 |
| Message-ID | <n3fm6o$eqm$2@dont-email.me> |
| In reply to | #16390 |
On 2015-11-29, gamo <gamo@telecable.es> wrote: > > Hello, > > I have a desktop machine with 32 GB RAM, and as expected most of > the memory is used as a cache. Sometimes I have few memory free, > less than 1 GB, and happens that after running 'rsync' the memory > reported by 'free' as free is increased notably. So the question > is: what kind of magic do the rsync program? memory which is unused is used by Linux as program chache. Instead of releasing the program memory, the program is kept in memory in case it is reused. HOwever, if some other program requires the memory, it is released. Thus probably rsync uses that memory, and then releases it before shutting down. Thus the memory is now free. It is no longer used for program cache because that use was supreceeded by rsync, and no longer used by rsync either. The above is just a guess. > > Thanks. Regards. >
[toc] | [prev] | [next] | [standalone]
| From | gamo <gamo@telecable.es> |
|---|---|
| Date | 2015-11-29 21:56 +0100 |
| Message-ID | <n3fora$107$1@speranza.aioe.org> |
| In reply to | #16395 |
El 29/11/15 a las 21:12, William Unruh escribió: > On 2015-11-29, gamo <gamo@telecable.es> wrote: >> >> Hello, >> >> I have a desktop machine with 32 GB RAM, and as expected most of >> the memory is used as a cache. Sometimes I have few memory free, >> less than 1 GB, and happens that after running 'rsync' the memory >> reported by 'free' as free is increased notably. So the question >> is: what kind of magic do the rsync program? > > memory which is unused is used by Linux as program chache. Instead of > releasing the program memory, the program is kept in memory in case it > is reused. HOwever, if some other program requires the memory, it is > released. Thus probably rsync uses that memory, and then releases it > before shutting down. Thus the memory is now free. It is no longer used > for program cache because that use was supreceeded by rsync, and no > longer used by rsync either. > > The above is just a guess. >> >> Thanks. Regards. >> I realized a test. One script to fill in the memory and get killed by the kernel or perl. First it takes a while. Then, the computer seems hanged. I pressed ^C and after a moment, the program exit and I have only 5 GB of memory occupied. So, I is a bit scary, but a 'releasemem' utility is factible. -- http://gamo.eu.pn/ The generation of random numbers is too important to be left to chance Actually, 360 degree hater.
[toc] | [prev] | [next] | [standalone]
| From | William Unruh <unruh@invalid.ca> |
|---|---|
| Date | 2015-11-29 21:16 +0000 |
| Message-ID | <n3fpuh$umb$1@dont-email.me> |
| In reply to | #16397 |
On 2015-11-29, gamo <gamo@telecable.es> wrote: > El 29/11/15 a las 21:12, William Unruh escribi?: >> On 2015-11-29, gamo <gamo@telecable.es> wrote: >>> >>> Hello, >>> >>> I have a desktop machine with 32 GB RAM, and as expected most of >>> the memory is used as a cache. Sometimes I have few memory free, >>> less than 1 GB, and happens that after running 'rsync' the memory >>> reported by 'free' as free is increased notably. So the question >>> is: what kind of magic do the rsync program? >> >> memory which is unused is used by Linux as program chache. Instead of >> releasing the program memory, the program is kept in memory in case it >> is reused. HOwever, if some other program requires the memory, it is >> released. Thus probably rsync uses that memory, and then releases it >> before shutting down. Thus the memory is now free. It is no longer used >> for program cache because that use was supreceeded by rsync, and no >> longer used by rsync either. >> >> The above is just a guess. >>> >>> Thanks. Regards. >>> > > I realized a test. One script to fill in the memory and get killed by > the kernel or perl. > > First it takes a while. Then, the computer seems hanged. I pressed ^C > and after a moment, the program exit and I have only 5 GB of memory > occupied. > > So, I is a bit scary, but a 'releasemem' utility is factible. factible? Anyway, in storing the programs, AFAIK the data is usually not stored as well. And a script would not work that way. It is a very small program. Try loading ooffice, xmaple, gimp, .... That should slowly fill up your memory as those programs ( not data) are stored for potential later use. (That is why the second time you open libreoffice is often so much faster than the first-- unless you have SATAIII and an SDDrive. Look at the free memory. Then use your script to fill up the memory, and see what happens when you close it. Note that the sysstem probably started swapping which would make it seem really really slow. But why do you care? The programs are cached only if that space is not needed. Why do you want empty memory sitting there doing nothing? >
[toc] | [prev] | [next] | [standalone]
| From | gamo <gamo@telecable.es> |
|---|---|
| Date | 2015-11-29 23:52 +0100 |
| Message-ID | <n3fvk0$fde$1@speranza.aioe.org> |
| In reply to | #16398 |
El 29/11/15 a las 22:16, William Unruh escribió: > But why do you care? The programs are cached only if that space is not > needed. Why do you want empty memory sitting there doing nothing? You are right. It's a mania to see how many memory free I have. -- http://gamo.eu.pn/ The generation of random numbers is too important to be left to chance Actually, 360 degree hater.
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> |
|---|---|
| Date | 2015-11-30 00:33 +0100 |
| Message-ID | <n3g1vm$2muu$1@saria.nerim.net> |
| In reply to | #16397 |
gamo a écrit : > > So, I is a bit scary, but a 'releasemem' utility is factible. And useless. /proc/sys/vm/drop_cache is already available.
[toc] | [prev] | [next] | [standalone]
| From | gamo <gamo@telecable.es> |
|---|---|
| Date | 2015-11-30 07:16 +0100 |
| Message-ID | <n3gpka$p8c$1@speranza.aioe.org> |
| In reply to | #16401 |
El 30/11/15 a las 00:33, Pascal Hambourg escribió: > gamo a écrit : >> >> So, I is a bit scary, but a 'releasemem' utility is factible. > > And useless. /proc/sys/vm/drop_cache is already available. > Ok, the 'file' is 'drop_caches' in my version. Thanks. -- http://gamo.eu.pn/ The generation of random numbers is too important to be left to chance Actually, 360 degree hater.
[toc] | [prev] | [next] | [standalone]
| From | Teemu Likonen <tlikonen@iki.fi> |
|---|---|
| Date | 2015-12-01 18:04 +0200 |
| Message-ID | <87wpsy6tpg.fsf@mithlond.arda> |
| In reply to | #16408 |
[Multipart message — attachments visible in raw view] — view raw
gamo@telecable.es [2015-11-30 07:16:25+01] wrote: > El 30/11/15 a las 00:33, Pascal Hambourg escribió: >> And useless. /proc/sys/vm/drop_cache is already available. > > Ok, the 'file' is 'drop_caches' in my version. To release cached memory (as root): sync; echo 3 >/proc/sys/vm/drop_caches See: https://www.kernel.org/doc/Documentation/sysctl/vm.txt -- /// Teemu Likonen - .-.. <https://github.com/tlikonen> // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///
[toc] | [prev] | [next] | [standalone]
| From | gamo <gamo@telecable.es> |
|---|---|
| Date | 2015-12-01 23:49 +0100 |
| Message-ID | <n3l871$847$1@speranza.aioe.org> |
| In reply to | #16422 |
El 01/12/15 a las 17:04, Teemu Likonen escribió: > gamo@telecable.es [2015-11-30 07:16:25+01] wrote: > >> El 30/11/15 a las 00:33, Pascal Hambourg escribió: >>> And useless. /proc/sys/vm/drop_cache is already available. >> >> Ok, the 'file' is 'drop_caches' in my version. > > To release cached memory (as root): > > sync; echo 3 >/proc/sys/vm/drop_caches > > See: https://www.kernel.org/doc/Documentation/sysctl/vm.txt > Thanks, that doccumentation is very clear in not recommend that usage for performance reasons. -- http://gamo.eu.pn/ The generation of random numbers is too important to be left to chance Actually, 360 degree hater.
[toc] | [prev] | [next] | [standalone]
| From | Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> |
|---|---|
| Date | 2015-11-29 18:36 -0800 |
| Message-ID | <6bpsicxhkn.ln2@goaway.wombat.san-francisco.ca.us> |
| In reply to | #16390 |
On 2015-11-29, gamo <gamo@telecable.es> wrote:
>
> I have a desktop machine with 32 GB RAM, and as expected most of
> the memory is used as a cache. Sometimes I have few memory free,
> less than 1 GB, and happens that after running 'rsync' the memory
> reported by 'free' as free is increased notably. So the question
> is: what kind of magic do the rsync program?
The kernel keeps files needed by rsync in cache. It's nothing to worry
about. Make sure you're looking at the second line in the free output
("-/+ buffers/cache"), which reports the memory actually available for
programs to use.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.linux.misc
csiph-web