Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
HPSeitz
Active Participant
As every few months an updated release of SAP HANA Express Edition is available (see Release Notes) a regular task is upgrading the own HANA Express to gain bug fixes and new features and simply stay up to date.

With the upgrade there is an easy way to improve memory usage of various XSA components to make development more stable and get ride of WebIDE crashes like the ones described in my question "WebIDE for SAP HANA 2.0 (SPS02) crashes frequently on Git Push" posted at the SAP Community. As you can see the solution goes back on a recommendation of lsubatin, which is working in SAP Developer Relations Team and is very active on HANA Express and HANA XSA topics.

Memory Usage before Optimization


Memory is a rare asset in the context of SAP HANA as you need plenty of it. Especially when you want to have HANA on your laptop and all the goodness from HANA XSA. So SAP tried to optimize memory consumption where ever possible to lower the entry barrier to run HANA Express Edition. They did a good job, at some point too good! As result at least with default settings in SPS 02 you had regular crashes in WebIDE and productive development was almost impossible.

Let's have a look on memory consumption before the optimization with the Application Monitor of the XS Advanced Administration (following screenshot was taken, after using WebIDE and deploying and starting some Node and HTML5 XSA applications):



You can see that especially di-core was sized too poor with 256MB as it actually already uses almost the double (504MB).

Memory Usage after Upgrade & Optimization


After the upgrade with optimizations (let's call it Upgrade "Plus") the situation looks better and WebIDE crashes were gone (probably also because the updated version of WebIDE got many bugfixes). I was still somehow thrifty but from my experience 768MB for di-core, 144MB for devx-ui5 and 512MB for di-runner are doing well.


Upgrade "Plus" of HANA Express (here from SPS02 to SPS03 rev30)


The upgrade is a time consuming tasks. On my environment (IntelNUC with i7 core, 32 GB RAM, fast SSD) it's not a matter of minutes but of two hours. The normal upgrade process is shortly described in the tutorial "Updating SAP HANA, express edition (Virtual Machine)" (Link). I follow these procedure with few addons the change the memory setting for the components. So let's go step by step.

First you need to download the installation files for the binary installation  (despite you have the HANA Express running as VM!) with the HANA Express Download Manager. Transfer both archive files hxe.tgz and hxexsa.tgz on the VM's file system (I use as target  /usr/sap/HXE/home/Downloads):



Login as hxeadm user (e.g. with Putty) and extract both files. We got a new folder HANA_EXPRESS_20, which contains the software components, and a setup script for initially setting up HANA Express, which we will not use here as we assume you have HANA Express already installed:


The Plus - modify memory settings for some services of the WebIDE component


Now we come to the "Plus" by changing some memory settings for the WebIDE component services. Therefore we open the MTA deployment  extension descriptor (mtaext file extension) of the WebIDE component. For SPS03 (revision 30)  this file is located in folder XSAC_SAP_WEB_IDE_20 and is called sap-xsac-devx-4.3.23-hxe.mtaext. The version number will be different for newer revision:



With the extension descriptor you can define runtime properties/values for the services at deployment time. Such values are for example proxy information, user provided service credentials, URL's and also memory settings. So lets open this file with the vi editor by typing:
vi HANA_EXPRESS_20/DATA_UNITS/XSAC_SAP_WEB_IDE_20/sap-xsac-devx-4.3.23-hxe.mtaext

 

press I to go into edit modus and change the memory settings for services di-core to 768M, for service di-runner to 512MB and for service devx-ui5 to 144MB. I also change setting DI_BUILDER_MEMORY for resource di-builder-configuration to 312MB:



To save the changes press ESC to leave the edit modus and then :wq to write the changes and quit vi editor. Now we good to run the upgrade with the changed memory settings.

Run HANA Express Edition upgrade


Let's move in the HANA_EXPRESS_20 folder. Before we start the upgrade we  first run a garbage collection to free up memory. Run as sudo the script hxe_gc.sh:
sudo ./hxe_gc.sh

 



To start the upgrade run the script hxe_upgrade.sh:

 
sudo ./hxe_upgrade.sh

 

Enter all the necessary information and the passwords for hxeadm, SYSTEM and XSA_ADMIN. Be very carefully when entering the passwords, if you making this wrong, you could mess up you complete HANA installation.



Now cross fingers and after around 2 hours later you should finally see the success message "HDB is successfully upgraded."



Congratulations!! You have now a SAP HANA Express system with improved memory settings for productive XSA development.

Besides many bugfixes you presented also with new features. For example with SPS03 there is now the new SAP HANA XS Advanced Cockpit available which is basically the same as the Cockpit which is used in SAP Cloud for SAP Cloud Foundry:



With this new optimised environment you are now ready to develop full-stack HANA XSA applications. Have fun.



This post has been published first on my personal blog. (lars.breddemann style)

5 Comments
jmalla
Contributor
0 Kudos

Hi hpseitz – We have been developing on HANA Express for a while.  The new Express on HANA 2.0 SPS 3 (2.00.036) has been fairly stable compared to older releases.  But after developing on this for a while it starts becoming really unstable.

The WebIDE takes longer and longer to load and the run functionality takes really long.  I run the garbage collector regularly, and also restart HANA and even restart the Linux system but still having issues.  I had increased the WebIDE from 512 MB to 1 GB.  Not sure if that is helping or hurting.  Is there anything we can do to "clear/reset" the WebIDE?  This has been an issue from the start.

Any other things I can do to speed this up?  Also we installed SHINE and I think that also caused the system to slow down.

Thanks,

Jay

jmalla
Contributor
0 Kudos
Hi hpseitz - So after developing for a while and everything going smoothly, I started having issues with the WebIDE being really slow and the run for the nodeJS and web app slowing down. The garbage collector, restarting HANA and rebooting Linux did not help.

I then changed my di-core and di-runner from 512M to 1G.  I had already changed my webide from 512M to 1G before this.  Then everything started working really well again.  So I think there is a lot of "junk" files for these processes that is consuming memory and somehow not getting released it seems.  Not sure - but I think that it will run smoothly for a while until the 1G for these processes runs out and it will be back to the same behavior.  If this is the case, it would be nice to reset the di-core, di-runner and especially the workspace related files that maybe causing the issue on the server?

Thoughts?

 

lsubatin - maybe you can shed some light?

Regards,

Jay

 
jmalla
Contributor
0 Kudos

The main issue is that the /hana/shared/HXE/xs/controller_data/executionagent/executionroot is filling up and that is causing performance issues and filling up the hard drive:

I have listed the folders under this drive sorted by size.  There are folders that are over 2 GB and close to 1 GB.  So for a 70 GB hard drive, it's filling up so fast.

It would be good to mention how to clean up this folder as part of the maintenance and troubleshooting stability issues.

Thanks,

Jay

 

HPSeitz
Active Participant
Hi Jay,

I personally stopped using XSA for a while now (very little customer demand, SAP focus change on 6th of March). Revision 31 was the last release which I used productively for development. Performance was acceptable with this one.

Played around with Rev 35, but Rev 36 have not used at all so far.

I have no update info or experience with the current release. I think you raised a good point with the latest comment.

Perhaps lsubatin is able to help you.

I saw the discussion goes on here https://blogs.sap.com/2018/01/28/sap-hana-express-edition-on-aws-for-xsa-development-space-issues/co...

Sorry and good luck, HP

 
jmalla
Contributor
0 Kudos

Thanks HP,

Actually revision 36 has been working really well.  We have been doing extensive development on this.  I think we started having issues after I installed SHINE.  That’s when I first noticed the WebIDE acting up again.  Then after that, we are nothing the same issue as in versions in the past.  The WebIDE starts taking a super long time to load and running the applications seems to show an error in the console window because of the timeout issue even if most of the time it runs.

The I notice a ton of folders that are over a GB in the execution folder – and after inspecting this, I can see that the Node builds with the SAP modules are what is causing this.  What I don’t understand is why aren’t these deleted when the application is rerun instead of keeping the older builds and logs that is just consuming space.  I will create a ticket for SAP through my client account and hopefully they can come up with a work around and eventually a solution.

 

I just updated the discussion in https://blogs.sap.com/2018/01/28/sap-hana-express-edition-on-aws-for-xsa-development-space-issues/co...

 

Thanks,

Jay

Labels in this area