Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2019, 07:13 AM   #1
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Sigil memory usage

v0.9.10 compiled on Linux Mint 19.1.

I have been working on a book for about a month and I noticed that every time I got back to Sigil it took plenty of seconds before it got "active". As in being swapped into RAM again.

Using top it showed that Sigil was using about 50% of the memory (of 12 GB).
I quit Sigil and restarted. It used pretty much "nothing" as expected.

Now, about 4-5 days later it uses 18,5%.

The epub is 2.5 MB (5 images).

I know top and ps are not completly accurate, but I'm guessing accurate enough in order to show that Sigil is using more than I would have thought.

Is this normal, or is there a memory leak?
patrik is offline   Reply With Quote
Old 02-13-2019, 08:43 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by patrik View Post
Is this normal, or is there a memory leak?
I've noticed a slight delay whenever launching Sigil before anything becomes active (menus, tabs, etc) on my Arch Linux system. But I don't think it's a memory leak. I've not been able to track down what's causing it, or when exactly it first manifested. My guess is it that it began with a certain version of Qt, rather than with Sigil itself. I've not tested in a while, but I'd be willing to bet the issue doesn't manifest if Sigil is built against the Qt5.6.x series.

The bottom line is: it's not just you. I'll keep looking.
DiapDealer is offline   Reply With Quote
Advert
Old 02-13-2019, 09:08 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
If the Sigil app is actually sleeping any memory leaking must be in the Qt event loop as Sigil proper code is doing nothing at that point. A search of memory leaks and Qt reveals quite a long list of issues, some even platform specific given Qt reference counting and its internal object memory management. Sigil is also linked to the python3 lib as well, which is also notorious for memory issues.

Not sure if this helps. Based on other gui toolkits over the years, leaving an app open for long long periods of time without at least saving your file and closing the app is probably not a good idea at all.

My 2 cents.
KevinH is online now   Reply With Quote
Old 02-13-2019, 09:26 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
By the way @patrik are you using the cinnamon desktop environment on Mint or something else?
DiapDealer is offline   Reply With Quote
Old 02-13-2019, 09:30 AM   #5
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
I'm using cinnamon.

I usually work on and off on various books, and some tend to be open for a fairly long time just by default. I always save (and backup) continously of course.

I guess I will start to quit Sigil more often, no biggie I suppose.

Please let me know if there is anything you would like me to test and/or keep an eye out for.

Thanks.
patrik is offline   Reply With Quote
Advert
Old 02-13-2019, 09:37 AM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Qt opens various worker threads alongside the main gui thread. Can you use ps to get a memory footprint breakdown by thread both before and after a long period of sleep. It would be interesting to see where the memory leak is biggest and what Sigil is doing in its idle state.

I have tried doing memory testing under Mac OSX but do not see huge memory leakage like you are.
KevinH is online now   Reply With Quote
Old 02-13-2019, 10:23 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm noticing a delay before things become active even when first launching Sigil (or when it regains focus after a short time away). I don't really notice any difference when Sigil is left open a long time. I'll try to do some testing in the next few days. There's been some issues lately on various Linux distros involving d-bus upgrades/configs that have been known to cause delays as well.
DiapDealer is offline   Reply With Quote
Old 02-13-2019, 02:10 PM   #8
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Hmm, it's been a while since I had to dig around the parameters of ps. It bugs me I can't seem to find some easy way to show memory usage for each thread.


Code:
ps -p 3060 -O pid,spid,pmem,vsz,rss,cmd -c -T
  PID   PID  SPID %MEM    VSZ   RSS CMD                         S TTY          TIME COMMAND
 3060  3060  3060 14.7 5647660 1770520 sigil                    S ?        00:08:30 sigil
Code:
$ ps -T -p 3060
  PID  SPID TTY          TIME CMD
 3060  3060 ?        00:07:00 sigil
 3060  3062 ?        00:00:04 sigil
 3060  3063 ?        00:00:14 QXcbEventReader
 3060  3064 ?        00:00:00 QDBusConnection
 3060  3065 ?        00:00:04 Qt bearer threa
 3060  3066 ?        00:00:01 Thread (pooled)
 3060  3067 ?        00:00:01 Thread (pooled)
 3060  3068 ?        00:00:01 Thread (pooled)
 3060  3069 ?        00:00:01 Thread (pooled)
 3060  3071 ?        00:00:00 sigil:disk$0
 3060  3076 ?        00:00:06 sigil
 3060  3079 ?        00:00:17 sigil
 3060  3080 ?        00:00:17 sigil
 3060  3081 ?        00:00:16 sigil
 3060  3120 ?        00:00:00 sigil
 3060  3121 ?        00:00:00 sigil
 3060  3122 ?        00:00:00 sigil
patrik is offline   Reply With Quote
Old 04-04-2019, 06:31 AM   #9
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Is this normal:

Private memory usage:1425060
Rss memory usage:1432816
Shared memory usage:7756
Swap memory usage:876320
Pss memory usage:1864591

Working on the epub on and off for a couple of days.
(Sigil 0.9.13)
patrik is offline   Reply With Quote
Old 04-04-2019, 08:26 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by patrik View Post
Is this normal:

Private memory usage:1425060
Rss memory usage:1432816
Shared memory usage:7756
Swap memory usage:876320
Pss memory usage:1864591

Working on the epub on and off for a couple of days.
(Sigil 0.9.13)
No idea. Are those cumulative numbers? Is that the total amount of memory that's been used by Sigil over a period of days? If so, then it certainly doesn't look abnormal to me.

There is no across-the-board "normal" when it comes to memory/swap usage. Depends on your hardware, your distro (the version of your distro), the choices you made when when setting up your O.S. (the choices your distro gave you when you set up your O.S.) and countless other things.

What I DO know is there have been a countless number of small memory-leaks plugged, several patches to Qt/QtWebkit itself to fix leaks, heap-corruption and general UI flakiness, and a ton of things other things done to reduce Sigil's memory foot-print altogether in 0.9.13. Sigil itself is as lean as it has been in a very long time thanks to to Kevin's tireless work.

The question should be "how is Sigil performing?" not "what do these numbers show?" And also ... why on earth do people leave epubs open in Sigil for DAYS?!?!

I do a lot of Sigil debugging, but if someone finds a bug that only seems to manifest after cumulative days of Sigil uptime/usage, then I'm probably not going to be able to replicate it (let alone fix it). What do people have against saving and closing, anyway?
DiapDealer is offline   Reply With Quote
Old 04-04-2019, 08:59 AM   #11
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
It's what currently is being used by the Sigil process.

If you work on something, why would you "quit" it before it's finished? In a world of bugs and memory leaks, I get that there may be reasons for restarting programs, but that's a work-around, not a good workflow.

If it makes it too hard to find any bugs, ok, you guys are doing a fantastic job and you choose what you work on. Nemas problemas

I took the chance that it may give you any clues.
patrik is offline   Reply With Quote
Old 04-04-2019, 09:35 AM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by patrik View Post
If you work on something, why would you "quit" it before it's finished?
Because it's time for dinner, or it's time to go bed. When I'm working on my car and it gets dark on me, I don't leave all of my tools scattered around the driveway. I put them away for the night and start over in the morning.


Quote:
Originally Posted by patrik View Post
In a world of bugs and memory leaks, I get that there may be reasons for restarting programs, but that's a work-around, not a good workflow.
I get what you're saying. But in reality, what we're talking about is one extra mouse click when wrapping up, and two (or one depending on personal settings) to fire things back up again. Not exactly a productivity suck. What you call a "workaround" I call "normal." Leaving programs and documents open for days at a time doesn't sound like "good workflow" to me. It sounds like an invitation for accidents and issues. By the same logic, why would someone ever close a program? Why not just leave multiple instances of every program installed on your computer running at all times? Surely that would be the most efficient workflow?

Quote:
Originally Posted by patrik View Post
If it makes it too hard to find any bugs, ok, you guys are doing a fantastic job and you choose what you work on. Nemas problemas

I took the chance that it may give you any clues.
I DO appreciate it (even if it doesn't always sound like it). Thanks

Last edited by DiapDealer; 04-04-2019 at 09:37 AM.
DiapDealer is offline   Reply With Quote
Old 04-04-2019, 09:48 AM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Is it affecting performance?
KevinH is online now   Reply With Quote
Old 04-04-2019, 10:54 AM   #14
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Quote:
Originally Posted by KevinH View Post
Is it affecting performance?
Well, yes, but I'm not sure Sigil is to blame directly. Probably just normal memory-swap. (But I only notice it after the memory has increased.)

What happens is that it every now and then takes a short time (like 5-10 sec) until it executes the input. Typically mouse inputs.
patrik is offline   Reply With Quote
Old 04-04-2019, 11:03 AM   #15
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Restarted Sigil.

Days old process:

2051.59MB 2268 patrik /usr/local/lib/sigil/sigil file.epub

Private memory usage:2093920
Rss memory usage:2103368
Shared memory usage:9448
Swap memory usage:1020576
Pss memory usage:2605221


Brand new:

184.957MB 32244 patrik /usr/local/lib/sigil/sigil file.epub

Private memory usage:171792
Rss memory usage:190636
Shared memory usage:18852
Swap memory usage:0
Pss memory usage:178090
patrik is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre memory usage - Linux Dapper Calibre 11 03-07-2016 11:03 PM
n2a card memory usage jvik Android Devices 1 04-10-2015 02:28 PM
Memory usage jessie102 Calibre 4 01-29-2015 12:44 PM
Extreme memory usage MJBoa Calibre 1 02-12-2010 11:37 AM
Memory Usage BCCISProf Sony Reader 15 05-16-2007 08:11 PM


All times are GMT -4. The time now is 11:38 AM.


MobileRead.com is a privately owned, operated and funded community.