Parameter lxc.cgroup doesn't work after copy lxc from ubuntu 16 to 18 or on new container on ubuntu 18

We use LXC on Ubuntu 16.04.5 LTS, in config of containers we use parameter

lxc.cgroup.memory.memsw.limit_in_bytes = 3246612494 - it’s work, we use many different lxc.cgroup - parameters also, and they work good.

On Ubuntu 18.04.1 LTS new created container or old copied container from Ubuntu 16.04.5 LTS -server with parameter lxc.cgroup.memory.memsw.limit_in_bytes = 21474836480 - fault:

Failed to setup cgroup limits for container “ContainerName”
lxc-start: in: start.c: __lxc_start: 1910 Failed to spawn container

Log with trace:

lxc-start test_upd 20181101090647.818 TRACE start - start.c:lxc_init:864 - Initialized cgroup driver
lxc-start test_upd 20181101090647.818 INFO start - start.c:lxc_init:866 - Container “test_upd” is initialized
lxc-start test_upd 20181101090647.820 INFO network - network.c:instantiate_veth:146 - Retrieved mtu 1500 from br0
lxc-start test_upd 20181101090647.821 INFO network - network.c:instantiate_veth:174 - Attached “vethOYFK9A” to bridge “br0”
lxc-start test_upd 20181101090647.821 DEBUG network - network.c:instantiate_veth:200 - Instantiated veth “vethOYFK9A/vethOAHS6M”, index is “62”
lxc-start test_upd 20181101090647.823 TRACE cgfsng - cgroups/cgfsng.c:cg_legacy_filter_and_set_cpus:427 - No isolated cpus detected
lxc-start test_upd 20181101090647.823 DEBUG cgfsng - cgroups/cgfsng.c:cg_legacy_handle_cpuset_hierarchy:613 - “cgroup.clone_children” was already set to “1”
lxc-start test_upd 20181101090647.826 TRACE start - start.c:lxc_spawn:1653 - Cloned child process 12909
lxc-start test_upd 20181101090647.826 INFO start - start.c:lxc_spawn:1657 - Cloned CLONE_NEWNS
lxc-start test_upd 20181101090647.826 INFO start - start.c:lxc_spawn:1657 - Cloned CLONE_NEWPID
lxc-start test_upd 20181101090647.826 INFO start - start.c:lxc_spawn:1657 - Cloned CLONE_NEWUTS
lxc-start test_upd 20181101090647.826 INFO start - start.c:lxc_spawn:1657 - Cloned CLONE_NEWIPC
lxc-start test_upd 20181101090647.826 INFO start - start.c:lxc_spawn:1657 - Cloned CLONE_NEWNET
lxc-start test_upd 20181101090647.826 DEBUG start - start.c:lxc_try_preserve_namespaces:205 - Preserved mnt namespace via fd 17
lxc-start test_upd 20181101090647.826 DEBUG start - start.c:lxc_try_preserve_namespaces:205 - Preserved pid namespace via fd 18
lxc-start test_upd 20181101090647.826 DEBUG start - start.c:lxc_try_preserve_namespaces:205 - Preserved uts namespace via fd 19
lxc-start test_upd 20181101090647.826 DEBUG start - start.c:lxc_try_preserve_namespaces:205 - Preserved ipc namespace via fd 20
lxc-start test_upd 20181101090647.826 DEBUG start - start.c:lxc_try_preserve_namespaces:205 - Preserved net namespace via fd 21
lxc-start test_upd 20181101090647.826 DEBUG cgfsng - cgroups/cgfsng.c:__cg_legacy_setup_limits:2191 - Set controller “memory.limit_in_bytes” set to “12884901888”
lxc-start test_upd 20181101090647.826 WARN cgfsng - cgroups/cgfsng.c:__cg_legacy_setup_limits:2187 - Failed to set “memory.memsw.limit_in_bytes” to “21474836480”

I see there is no memory.memsw.limit_in_bytes in Ubuntu 18:

cat /sys/fs/cgroup/memory/memory.memsw.max_usage_in_bytes
cat: /sys/fs/cgroup/memory/memory.memsw.max_usage_in_bytes: No such file or directory

All options on both ubuntu 16 and ubuntu 18 servers with no differentions

a. Enable CONFIG_CGROUPS
b. Enable CONFIG_MEMCG
c. Enable CONFIG_MEMCG_SWAP (to use swap extension)
d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)

Ubuntu 16.04.5 LTS kernel 4.4.0-137-generic
Ubuntu 18.04.1 LTS kernel 4.15.0-38-generic

GRUB_CMDLINE_LINUX_DEFAULT = “cgroup_enable=memory swapaccount=1” - we do