Start a new topic

Battery drain & CPU usage.

Hello,


I'm experiencing an issue with Cafetran's resource use. I'm using a 2014 Retina Macbook Pro with i5 2,6 GHz, 8 GB of RAM and a solid state drive running the final build of El Capitan 10.11. The laptop is still pretty new and maintains a stable 8-9 hour battery life (~120 load cycles) while using Safari, MS Office and other simple, everyday tools.

However, using Cafetran decreases the battery life to approximately 2,5 - 3 hours, the fan fires up to more than 3,000 rpm (idle value = ~1,300), also the temperatures rise considerably. I've already tried changing the autosave setting value for glossaries, projects and memories to 10.
At the moment I'm using a single TMX memory consisting of little less than 12,000 entries and a couple of glossaries with several hundred terms.

I'm using the full version of Cafetran, revision 2015101301 released today and I have the newest java 8 installed.

The above happens regardless of the translated file's size. It makes no difference if the document contains five thousand characters or a hundred thousand.

I'm attaching a screenshot of the Activity Monitor's energy tab, with the second and third columns being Energy Impact and Average Energy Impact. That's after ten minutes of working in Cafetran. CPU Usage stays between 15 and 20%.

I had the same issue with older revisions of Cafetran on my old 2010 Macbook white running Mavericks and, later on, Yosemite. However, it wasn't that much of an issue since that laptop wouldn't last more than two hours on a single charge anyway.

As my hardware finally allows to spend more than a couple of hours away from the wall socket, it would be great to take advantage of it.


I would be very grateful for any help on this matter.

...or is it supposed to be like that?

png

 it would be an interesting mode.


This idea is similar to the one you suggested the other day to rewrite CT in Apple's own language (Swift). This would basically mean to write another CAT.

IK: ...but I would not turn off this feature as it is such a time-saver.


I think I can do without for English as the SL, not for German though.


H.

> Storing finished segments can't possibly be the problem.


It can be a problem hence the tip:


"Increase automatic background saving intervals for Project segments, Memories and Glossaries in Edit > Preferences > Workflow > Autosave project/memory/glossary fields (from 20 to 50 segments/entries). Then, make sure that you save the above resources manually when you stop the project and exit the program."

BTW, I envisage the perfect ultimate CAT as a sort of AI software/hardware combination guiding the translator, similar to what recently-hyped AlphaGo machine vs. Lee Sedol (Go player champion) match presented. Note that AlphaGo computer has 48 processors to engage with the human. And I don't think they run it in the battery-mode. :) 

IK: It can be a problem hence the tip


Yes, if all is set to 1 and in DropBox...


H.

IK: And I don't think they run it in the battery-mode.


The thing is, that the problem only seems to exist with MacBooks. Other Macs, and other laptops don't seem to show the problem. That makes it so intriguing. Plus the fact that I'm considering buying a  MacBook (or take my daughter's brand new MBA away).


H.

My post seems to have disappeared into the ether so here it goes:


Dear Igor,


I am aware of your article in the Solutions section. However, after loading a 250-word document and with TM containing a few hundred segments, and with several minutes of inactivity, CT is constantly clocking about 14-15% of the CPU usage according to Activity Monitor. Memory usage is fairly low. I haven't done any comparisons but this would suggest that your solution doesn't really work or does not help the issue sufficiently.


I don't mind turning off a lot of features and would be happy to accept the trade off between performance and energy consumption. However, I find it difficult to come to terms with something which saps the battery when I'm doing absolutely nothing. I won't indulge in fanciful (though interesting) discussions about re-writing the whole software or anything like that. You can only do so much and you've already got something that's pretty awesome. But clearly something more than limiting features is required, I think. 

with several minutes of inactivity, CT is constantly clocking about 14-15% of the CPU usage according to Activity Monitor


That's interesting. I will compare the CPU activity of my Dell laptop with the Mac Mini when CT is idle. There is no difference whatsoever in Java code between the PC and Mac version of CafeTran. The culprit may be the high initial Java memory heap size (-Xms) value set for CafeTran. I will experiment with the values and see if it makes any difference.



>This idea is similar to the one you suggested the other day to rewrite CT in Apple's own language (Swift). This would basically mean to write another CAT.


Yeah, I'm great in creating extra work for others.


Not to mention all the needless extra work that I create for myself :).


Like this morning, with this nice Trojan. Brrrrrr

>I won't indulge in fanciful (though interesting) discussions about re-writing the whole software or anything like that.


We have a special forum for that :).


Anyone coffee?

The culprit may be the high initial Java memory heap size (-Xms) value set for CafeTran.


I should rather say the low initial Java memory heap size. There is a Info.plist file inside CafeTran.app package which contains those values like this:


<string>-Xms1024m</string>

<string>-Xmx2048m</string>


The idea is to increase the Xms value such as it is the same as Xmx value (to -Xms2048m in the above example). This should reduce the Java memory management cycles called Garbage Collection) and thus relieve the processor.

>The idea is to increase the Xms value such as it is the same as Xmx value (to -Xms2048m in the above example). This should reduce the Java memory management cycles called Garbage Collection) and thus relieve the processor.


Is this a mental note to self or a clear instruction to those victims of too hot to handle?

Hi Igor.

I have set the Xmx value to 4GB but it has had no noticeable impact. The CPU usage went down by an average of about 1% (i.e. still 12-13% when idle).

Shouldn't you set both the Xms and Xmx values to the same amount?

I did some tests on my Mac Mini machine and the idle processor load for CafeTran dropped from around 10% to 2% after setting both Xms and Xmx values the same. For example:


<string>-Xms4096m</string>

<string>-Xmx4096m</string>


Login to post a comment